rubyneat 0.3.5.alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. checksums.yaml +7 -0
  2. data/.directory +4 -0
  3. data/.gitignore.orig +20 -0
  4. data/.idea/.name +1 -0
  5. data/.idea/.rakeTasks +7 -0
  6. data/.idea/dictionaries/trader.xml +3 -0
  7. data/.idea/encodings.xml +5 -0
  8. data/.idea/misc.xml +5 -0
  9. data/.idea/modules.xml +9 -0
  10. data/.idea/rubyneat.iml +197 -0
  11. data/.idea/runConfigurations/invpend_neat.xml +26 -0
  12. data/.idea/runConfigurations/sigdebug_neat.xml +24 -0
  13. data/.idea/runConfigurations/xor_neat.xml +26 -0
  14. data/.idea/runConfigurations/xordebug_neat.xml +24 -0
  15. data/.idea/runConfigurations/xorsin_neat.xml +24 -0
  16. data/.idea/scopes/scope_settings.xml +5 -0
  17. data/.idea/vcs.xml +7 -0
  18. data/.idea/workspace.xml +1124 -0
  19. data/.semver +5 -0
  20. data/.yardoc/checksums +11 -0
  21. data/.yardoc/object_types +0 -0
  22. data/.yardoc/objects/root.dat +0 -0
  23. data/.yardoc/proxy_types +0 -0
  24. data/Gemfile +32 -0
  25. data/Gemfile.lock +135 -0
  26. data/Gemfile.lock.orig +147 -0
  27. data/Guardfile +8 -0
  28. data/Rakefile +61 -0
  29. data/bin/neat +83 -0
  30. data/config/application.rb +5 -0
  31. data/doc/ControllerPoint.html +125 -0
  32. data/doc/CuteA.html +286 -0
  33. data/doc/CuteB.html +297 -0
  34. data/doc/DSL.html +883 -0
  35. data/doc/NEAT/BasicNeuronTypes/BiasNeuron.html +518 -0
  36. data/doc/NEAT/BasicNeuronTypes/CosineNeuron.html +274 -0
  37. data/doc/NEAT/BasicNeuronTypes/InputNeuron.html +366 -0
  38. data/doc/NEAT/BasicNeuronTypes/SigmoidNeuron.html +275 -0
  39. data/doc/NEAT/BasicNeuronTypes/SineNeuron.html +274 -0
  40. data/doc/NEAT/BasicNeuronTypes/TanhNeuron.html +274 -0
  41. data/doc/NEAT/BasicNeuronTypes.html +136 -0
  42. data/doc/NEAT/Controller/NeatSettings.html +3985 -0
  43. data/doc/NEAT/Controller.html +2490 -0
  44. data/doc/NEAT/Critter/Genotype/Gene.html +979 -0
  45. data/doc/NEAT/Critter/Genotype.html +1601 -0
  46. data/doc/NEAT/Critter/Phenotype.html +603 -0
  47. data/doc/NEAT/Critter.html +1037 -0
  48. data/doc/NEAT/DSL.html +1255 -0
  49. data/doc/NEAT/Evaluator.html +420 -0
  50. data/doc/NEAT/Evolver/CritterOp.html +551 -0
  51. data/doc/NEAT/Evolver.html +602 -0
  52. data/doc/NEAT/Expressor.html +327 -0
  53. data/doc/NEAT/Graph/DependencyResolver.html +478 -0
  54. data/doc/NEAT/Graph/GraphException.html +123 -0
  55. data/doc/NEAT/Graph.html +402 -0
  56. data/doc/NEAT/NeatException.html +123 -0
  57. data/doc/NEAT/NeatOb.html +567 -0
  58. data/doc/NEAT/Neuron.html +1067 -0
  59. data/doc/NEAT/Operator.html +162 -0
  60. data/doc/NEAT/Population.html +1961 -0
  61. data/doc/NEAT/Trait.html +169 -0
  62. data/doc/NEAT.html +588 -0
  63. data/doc/_index.html +373 -0
  64. data/doc/class_list.html +54 -0
  65. data/doc/css/common.css +1 -0
  66. data/doc/css/full_list.css +57 -0
  67. data/doc/css/style.css +339 -0
  68. data/doc/file_list.html +53 -0
  69. data/doc/frames.html +26 -0
  70. data/doc/index.html +373 -0
  71. data/doc/js/app.js +219 -0
  72. data/doc/js/full_list.js +178 -0
  73. data/doc/js/jquery.js +4 -0
  74. data/doc/method_list.html +1415 -0
  75. data/doc/top-level-namespace.html +164 -0
  76. data/foo/foo_aquarium_example.rb +38 -0
  77. data/foo/foo_gosu.rb +99 -0
  78. data/foo/foo_rubygoo.rb +104 -0
  79. data/foo/foo_sdl.rb +34 -0
  80. data/foo/icon.png +0 -0
  81. data/lib/rubyneat/critter.rb +374 -0
  82. data/lib/rubyneat/default_neat.rb +10 -0
  83. data/lib/rubyneat/dsl.rb +130 -0
  84. data/lib/rubyneat/evaluator.rb +51 -0
  85. data/lib/rubyneat/evolver.rb +315 -0
  86. data/lib/rubyneat/expressor.rb +110 -0
  87. data/lib/rubyneat/graph.rb +95 -0
  88. data/lib/rubyneat/neuron.rb +152 -0
  89. data/lib/rubyneat/population.rb +227 -0
  90. data/lib/rubyneat/rubyneat.rb +429 -0
  91. data/lib/rubyneat.rb +8 -0
  92. data/neater/invpend_neat.rb +150 -0
  93. data/neater/rnlib/inverted_pendulum.rb +380 -0
  94. data/neater/rnlib/xor.rb +10 -0
  95. data/neater/sigdebug_neat.rb +136 -0
  96. data/neater/xor_neat.rb +137 -0
  97. data/neater/xoranalog_neat.rb +138 -0
  98. data/neater/xorsin_neat.rb +143 -0
  99. data/projectFilesBackup/.idea/rubyneat.iml +180 -0
  100. data/public/.directory +4 -0
  101. data/public/background.png +0 -0
  102. data/public/background.xcf +0 -0
  103. data/public/cart.png +0 -0
  104. data/public/cart.xcf +0 -0
  105. data/public/metalpoles_molton_ball_l.jpg +0 -0
  106. data/public/old_background.png +0 -0
  107. data/public/pointer.png +0 -0
  108. data/public/pointer.xcf +0 -0
  109. data/public/pole.kra +0 -0
  110. data/public/pole.png +0 -0
  111. data/public/pole.xcf +0 -0
  112. data/public/wheel-of-year-stone-DD-131-WOYS.jpg +0 -0
  113. data/public/wheel.png +0 -0
  114. data/public/wheel.xcf +0 -0
  115. data/public/wood-planks-texture.jpg +0 -0
  116. data/rdoc/ControllerPoint.html +116 -0
  117. data/rdoc/CuteA.html +177 -0
  118. data/rdoc/CuteB.html +178 -0
  119. data/rdoc/DSLSetup.html +177 -0
  120. data/rdoc/GameTestWindow.html +242 -0
  121. data/rdoc/GameWindow.html +292 -0
  122. data/rdoc/Gemfile.html +215 -0
  123. data/rdoc/Gemfile_lock.html +327 -0
  124. data/rdoc/GraphTest.html +210 -0
  125. data/rdoc/Guardfile.html +198 -0
  126. data/rdoc/InvertedPendulum/Cart.html +668 -0
  127. data/rdoc/InvertedPendulum/DSL.html +259 -0
  128. data/rdoc/InvertedPendulum/InvPendWindow.html +402 -0
  129. data/rdoc/InvertedPendulum.html +198 -0
  130. data/rdoc/Logger.html +98 -0
  131. data/rdoc/NEAT/BasicNeuronTypes/BiasNeuron.html +265 -0
  132. data/rdoc/NEAT/BasicNeuronTypes/CosineNeuron.html +162 -0
  133. data/rdoc/NEAT/BasicNeuronTypes/InputNeuron.html +206 -0
  134. data/rdoc/NEAT/BasicNeuronTypes/SigmoidNeuron.html +162 -0
  135. data/rdoc/NEAT/BasicNeuronTypes/SineNeuron.html +162 -0
  136. data/rdoc/NEAT/BasicNeuronTypes/TanhNeuron.html +161 -0
  137. data/rdoc/NEAT/BasicNeuronTypes.html +107 -0
  138. data/rdoc/NEAT/Controller/NeatSettings.html +880 -0
  139. data/rdoc/NEAT/Controller.html +729 -0
  140. data/rdoc/NEAT/Critter/Genotype/Gene.html +457 -0
  141. data/rdoc/NEAT/Critter/Genotype.html +735 -0
  142. data/rdoc/NEAT/Critter/Phenotype.html +330 -0
  143. data/rdoc/NEAT/Critter.html +489 -0
  144. data/rdoc/NEAT/DSL.html +729 -0
  145. data/rdoc/NEAT/Evaluator.html +256 -0
  146. data/rdoc/NEAT/Evolver/CritterOp.html +349 -0
  147. data/rdoc/NEAT/Evolver.html +891 -0
  148. data/rdoc/NEAT/Expressor.html +402 -0
  149. data/rdoc/NEAT/Graph/DependencyResolver.html +291 -0
  150. data/rdoc/NEAT/Graph/GraphException.html +105 -0
  151. data/rdoc/NEAT/Graph.html +263 -0
  152. data/rdoc/NEAT/NeatException.html +105 -0
  153. data/rdoc/NEAT/NeatOb.html +325 -0
  154. data/rdoc/NEAT/Neuron.html +481 -0
  155. data/rdoc/NEAT/Operator.html +109 -0
  156. data/rdoc/NEAT/Population.html +935 -0
  157. data/rdoc/NEAT/Trait.html +117 -0
  158. data/rdoc/NEAT.html +422 -0
  159. data/rdoc/Object.html +384 -0
  160. data/rdoc/Phi.html +98 -0
  161. data/rdoc/Player.html +383 -0
  162. data/rdoc/Rakefile.html +254 -0
  163. data/rdoc/RubyNEAT/Application.html +105 -0
  164. data/rdoc/RubyNEAT.html +98 -0
  165. data/rdoc/SDL/Event2.html +98 -0
  166. data/rdoc/SDL.html +98 -0
  167. data/rdoc/Vector.html +195 -0
  168. data/rdoc/created.rid +125 -0
  169. data/rdoc/doc/ControllerPoint_html.html +299 -0
  170. data/rdoc/doc/CuteA_html.html +438 -0
  171. data/rdoc/doc/CuteB_html.html +436 -0
  172. data/rdoc/doc/DSL_html.html +992 -0
  173. data/rdoc/doc/NEAT/BasicNeuronTypes/BiasNeuron_html.html +617 -0
  174. data/rdoc/doc/NEAT/BasicNeuronTypes/CosineNeuron_html.html +413 -0
  175. data/rdoc/doc/NEAT/BasicNeuronTypes/InputNeuron_html.html +498 -0
  176. data/rdoc/doc/NEAT/BasicNeuronTypes/SigmoidNeuron_html.html +413 -0
  177. data/rdoc/doc/NEAT/BasicNeuronTypes/SineNeuron_html.html +413 -0
  178. data/rdoc/doc/NEAT/BasicNeuronTypes/TanhNeuron_html.html +412 -0
  179. data/rdoc/doc/NEAT/BasicNeuronTypes_html.html +310 -0
  180. data/rdoc/doc/NEAT/Controller/NeatSettings_html.html +3324 -0
  181. data/rdoc/doc/NEAT/Controller_html.html +2212 -0
  182. data/rdoc/doc/NEAT/Critter/Genotype/Gene_html.html +997 -0
  183. data/rdoc/doc/NEAT/Critter/Genotype_html.html +1556 -0
  184. data/rdoc/doc/NEAT/Critter/Phenotype_html.html +687 -0
  185. data/rdoc/doc/NEAT/Critter_html.html +1037 -0
  186. data/rdoc/doc/NEAT/DSL_html.html +1349 -0
  187. data/rdoc/doc/NEAT/Evaluator_html.html +556 -0
  188. data/rdoc/doc/NEAT/Evolver/CritterOp_html.html +690 -0
  189. data/rdoc/doc/NEAT/Evolver_html.html +677 -0
  190. data/rdoc/doc/NEAT/Expressor_html.html +468 -0
  191. data/rdoc/doc/NEAT/Graph/DependencyResolver_html.html +598 -0
  192. data/rdoc/doc/NEAT/Graph/GraphException_html.html +299 -0
  193. data/rdoc/doc/NEAT/Graph_html.html +527 -0
  194. data/rdoc/doc/NEAT/NeatException_html.html +299 -0
  195. data/rdoc/doc/NEAT/NeatOb_html.html +671 -0
  196. data/rdoc/doc/NEAT/Neuron_html.html +1095 -0
  197. data/rdoc/doc/NEAT/Operator_html.html +337 -0
  198. data/rdoc/doc/NEAT/Population_html.html +1795 -0
  199. data/rdoc/doc/NEAT/Trait_html.html +344 -0
  200. data/rdoc/doc/NEAT_html.html +736 -0
  201. data/rdoc/doc/_index_html.html +559 -0
  202. data/rdoc/doc/class_list_html.html +369 -0
  203. data/rdoc/doc/css/common_css.html +188 -0
  204. data/rdoc/doc/css/full_list_css.html +243 -0
  205. data/rdoc/doc/css/style_css.html +530 -0
  206. data/rdoc/doc/file_list_html.html +240 -0
  207. data/rdoc/doc/frames_html.html +217 -0
  208. data/rdoc/doc/index_html.html +559 -0
  209. data/rdoc/doc/js/app_js.html +423 -0
  210. data/rdoc/doc/js/full_list_js.html +372 -0
  211. data/rdoc/doc/js/jquery_js.html +1536 -0
  212. data/rdoc/doc/method_list_html.html +1375 -0
  213. data/rdoc/doc/top-level-namespace_html.html +317 -0
  214. data/rdoc/fonts/Lato-Light.ttf +0 -0
  215. data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
  216. data/rdoc/fonts/Lato-Regular.ttf +0 -0
  217. data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
  218. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  219. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  220. data/rdoc/fonts.css +167 -0
  221. data/rdoc/images/add.png +0 -0
  222. data/rdoc/images/arrow_up.png +0 -0
  223. data/rdoc/images/brick.png +0 -0
  224. data/rdoc/images/brick_link.png +0 -0
  225. data/rdoc/images/bug.png +0 -0
  226. data/rdoc/images/bullet_black.png +0 -0
  227. data/rdoc/images/bullet_toggle_minus.png +0 -0
  228. data/rdoc/images/bullet_toggle_plus.png +0 -0
  229. data/rdoc/images/date.png +0 -0
  230. data/rdoc/images/delete.png +0 -0
  231. data/rdoc/images/find.png +0 -0
  232. data/rdoc/images/loadingAnimation.gif +0 -0
  233. data/rdoc/images/macFFBgHack.png +0 -0
  234. data/rdoc/images/package.png +0 -0
  235. data/rdoc/images/page_green.png +0 -0
  236. data/rdoc/images/page_white_text.png +0 -0
  237. data/rdoc/images/page_white_width.png +0 -0
  238. data/rdoc/images/plugin.png +0 -0
  239. data/rdoc/images/ruby.png +0 -0
  240. data/rdoc/images/tag_blue.png +0 -0
  241. data/rdoc/images/tag_green.png +0 -0
  242. data/rdoc/images/transparent.png +0 -0
  243. data/rdoc/images/wrench.png +0 -0
  244. data/rdoc/images/wrench_orange.png +0 -0
  245. data/rdoc/images/zoom.png +0 -0
  246. data/rdoc/index.html +282 -0
  247. data/rdoc/js/darkfish.js +140 -0
  248. data/rdoc/js/jquery.js +18 -0
  249. data/rdoc/js/navigation.js +142 -0
  250. data/rdoc/js/search.js +109 -0
  251. data/rdoc/js/search_index.js +1 -0
  252. data/rdoc/js/searcher.js +228 -0
  253. data/rdoc/rdoc.css +580 -0
  254. data/rdoc/rubyneat_gemspec.html +387 -0
  255. data/rdoc/table_of_contents.html +2502 -0
  256. data/rdoc/xordebug_log.html +170598 -0
  257. data/rdoc/xorsin_log.html +22569 -0
  258. data/rubyneat.gemspec +347 -0
  259. data/rubyneat.gemspec.orig +375 -0
  260. data/spec/lib/rubyneat/rubyneat_spec.rb +132 -0
  261. metadata +555 -0
@@ -0,0 +1,2490 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: NEAT::Controller
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!NEAT/Controller.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (C)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../NEAT.html" title="NEAT (module)">NEAT</a></span></span>
36
+ &raquo;
37
+ <span class="title">Controller</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: NEAT::Controller
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName"><span class='object_link'><a href="NeatOb.html" title="NEAT::NeatOb (class)">NeatOb</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="NeatOb.html" title="NEAT::NeatOb (class)">NeatOb</a></span></li>
82
+
83
+ <li class="next">NEAT::Controller</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/rubyneat/rubyneat.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <h1 id="label-Controller+for+all+operations+of+RubyNEAT">Controller for all operations of RubyNEAT</h1>
108
+
109
+ <p>This object contains all the specifications and details for evolving and
110
+ evaluation of the RubyNEAT system. It is a type of “World”, if you will,
111
+ for the entire enterprise.</p>
112
+
113
+ <p>Your application shall only have one Controller.</p>
114
+
115
+
116
+ </div>
117
+ </div>
118
+ <div class="tags">
119
+
120
+
121
+ </div><h2>Defined Under Namespace</h2>
122
+ <p class="children">
123
+
124
+
125
+
126
+
127
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Controller/NeatSettings.html" title="NEAT::Controller::NeatSettings (class)">NeatSettings</a></span>
128
+
129
+
130
+ </p>
131
+
132
+
133
+
134
+
135
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
136
+ <ul class="summary">
137
+
138
+ <li class="public ">
139
+ <span class="summary_signature">
140
+
141
+ <a href="#compare_func-instance_method" title="#compare_func (instance method)">- (Object) <strong>compare_func</strong> </a>
142
+
143
+
144
+
145
+ </span>
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <span class="summary_desc"><div class='inline'>
159
+ <p>Compare function for fitness Cost function for integrating in the cost to
160
+ the fitness scalar.</p>
161
+ </div></span>
162
+
163
+ </li>
164
+
165
+
166
+ <li class="public ">
167
+ <span class="summary_signature">
168
+
169
+ <a href="#cost_func-instance_method" title="#cost_func (instance method)">- (Object) <strong>cost_func</strong> </a>
170
+
171
+
172
+
173
+ </span>
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+ <span class="summary_desc"><div class='inline'>
187
+ <p>Compare function for fitness Cost function for integrating in the cost to
188
+ the fitness scalar.</p>
189
+ </div></span>
190
+
191
+ </li>
192
+
193
+
194
+ <li class="public ">
195
+ <span class="summary_signature">
196
+
197
+ <a href="#end_run_func-instance_method" title="#end_run_func (instance method)">- (Object) <strong>end_run_func</strong> </a>
198
+
199
+
200
+
201
+ </span>
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+ <span class="summary_desc"><div class='inline'>
215
+ <p>End run function to call at the end of each generational run Also
216
+ report_hook to dump reports for the user, etc.</p>
217
+ </div></span>
218
+
219
+ </li>
220
+
221
+
222
+ <li class="public ">
223
+ <span class="summary_signature">
224
+
225
+ <a href="#evaluator-instance_method" title="#evaluator (instance method)">- (Object) <strong>evaluator</strong> </a>
226
+
227
+
228
+
229
+ </span>
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+ <span class="summary_desc"><div class='inline'>
243
+ <p>Returns the value of attribute evaluator.</p>
244
+ </div></span>
245
+
246
+ </li>
247
+
248
+
249
+ <li class="public ">
250
+ <span class="summary_signature">
251
+
252
+ <a href="#evaluator_class-instance_method" title="#evaluator_class (instance method)">- (Object) <strong>evaluator_class</strong> </a>
253
+
254
+
255
+
256
+ </span>
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+ <span class="summary_desc"><div class='inline'>
270
+ <p>Returns the value of attribute evaluator_class.</p>
271
+ </div></span>
272
+
273
+ </li>
274
+
275
+
276
+ <li class="public ">
277
+ <span class="summary_signature">
278
+
279
+ <a href="#evolver-instance_method" title="#evolver (instance method)">- (Object) <strong>evolver</strong> </a>
280
+
281
+
282
+
283
+ </span>
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+ <span class="summary_desc"><div class='inline'>
297
+ <p>Returns the value of attribute evolver.</p>
298
+ </div></span>
299
+
300
+ </li>
301
+
302
+
303
+ <li class="public ">
304
+ <span class="summary_signature">
305
+
306
+ <a href="#evolver_class-instance_method" title="#evolver_class (instance method)">- (Object) <strong>evolver_class</strong> </a>
307
+
308
+
309
+
310
+ </span>
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+ <span class="summary_desc"><div class='inline'>
324
+ <p>Returns the value of attribute evolver_class.</p>
325
+ </div></span>
326
+
327
+ </li>
328
+
329
+
330
+ <li class="public ">
331
+ <span class="summary_signature">
332
+
333
+ <a href="#expressor-instance_method" title="#expressor (instance method)">- (Object) <strong>expressor</strong> </a>
334
+
335
+
336
+
337
+ </span>
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+ <span class="summary_desc"><div class='inline'>
351
+ <p>Returns the value of attribute expressor.</p>
352
+ </div></span>
353
+
354
+ </li>
355
+
356
+
357
+ <li class="public ">
358
+ <span class="summary_signature">
359
+
360
+ <a href="#expressor_class-instance_method" title="#expressor_class (instance method)">- (Object) <strong>expressor_class</strong> </a>
361
+
362
+
363
+
364
+ </span>
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+ <span class="summary_desc"><div class='inline'>
378
+ <p>Returns the value of attribute expressor_class.</p>
379
+ </div></span>
380
+
381
+ </li>
382
+
383
+
384
+ <li class="public ">
385
+ <span class="summary_signature">
386
+
387
+ <a href="#fitness_func-instance_method" title="#fitness_func (instance method)">- (Object) <strong>fitness_func</strong> </a>
388
+
389
+
390
+
391
+ </span>
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+ <span class="summary_desc"><div class='inline'>
405
+ <p>Fitness function that Critters shall be rated on.</p>
406
+ </div></span>
407
+
408
+ </li>
409
+
410
+
411
+ <li class="public ">
412
+ <span class="summary_signature">
413
+
414
+ <a href="#generation_num-instance_method" title="#generation_num (instance method)">- (Object) <strong>generation_num</strong> </a>
415
+
416
+
417
+
418
+ </span>
419
+
420
+
421
+
422
+
423
+ <span class="note title readonly">readonly</span>
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+ <span class="summary_desc"><div class='inline'>
434
+ <p>Current generation count.</p>
435
+ </div></span>
436
+
437
+ </li>
438
+
439
+
440
+ <li class="public ">
441
+ <span class="summary_signature">
442
+
443
+ <a href="#glob_innov_num-instance_method" title="#glob_innov_num (instance method)">- (Object) <strong>glob_innov_num</strong> </a>
444
+
445
+
446
+
447
+ </span>
448
+
449
+
450
+
451
+
452
+ <span class="note title readonly">readonly</span>
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+ <span class="summary_desc"><div class='inline'>
463
+ <p>global innovation number.</p>
464
+ </div></span>
465
+
466
+ </li>
467
+
468
+
469
+ <li class="public ">
470
+ <span class="summary_signature">
471
+
472
+ <a href="#log-instance_method" title="#log (instance method)">- (Object) <strong>log</strong> </a>
473
+
474
+
475
+
476
+ </span>
477
+
478
+
479
+
480
+
481
+ <span class="note title readonly">readonly</span>
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+ <span class="summary_desc"><div class='inline'>
492
+ <p>Logger object for all of RubyNEAT.</p>
493
+ </div></span>
494
+
495
+ </li>
496
+
497
+
498
+ <li class="public ">
499
+ <span class="summary_signature">
500
+
501
+ <a href="#neural_hidden-instance_method" title="#neural_hidden (instance method)">- (Object) <strong>neural_hidden</strong> </a>
502
+
503
+
504
+
505
+ </span>
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+ <span class="summary_desc"><div class='inline'>
519
+ <p>Class map of named input and output neurons (each critter will have
520
+ instantiations of these) name: InputNeuralClass (usually InputNeuron).</p>
521
+ </div></span>
522
+
523
+ </li>
524
+
525
+
526
+ <li class="public ">
527
+ <span class="summary_signature">
528
+
529
+ <a href="#neural_inputs-instance_method" title="#neural_inputs (instance method)">- (Object) <strong>neural_inputs</strong> </a>
530
+
531
+
532
+
533
+ </span>
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+
544
+
545
+
546
+ <span class="summary_desc"><div class='inline'>
547
+ <p>Class map of named input and output neurons (each critter will have
548
+ instantiations of these) name: InputNeuralClass (usually InputNeuron).</p>
549
+ </div></span>
550
+
551
+ </li>
552
+
553
+
554
+ <li class="public ">
555
+ <span class="summary_signature">
556
+
557
+ <a href="#neural_outputs-instance_method" title="#neural_outputs (instance method)">- (Object) <strong>neural_outputs</strong> </a>
558
+
559
+
560
+
561
+ </span>
562
+
563
+
564
+
565
+
566
+
567
+
568
+
569
+
570
+
571
+
572
+
573
+
574
+ <span class="summary_desc"><div class='inline'>
575
+ <p>Class map of named input and output neurons (each critter will have
576
+ instantiations of these) name: InputNeuralClass (usually InputNeuron).</p>
577
+ </div></span>
578
+
579
+ </li>
580
+
581
+
582
+ <li class="public ">
583
+ <span class="summary_signature">
584
+
585
+ <a href="#neuron_catalog-instance_method" title="#neuron_catalog (instance method)">- (Object) <strong>neuron_catalog</strong> </a>
586
+
587
+
588
+
589
+ </span>
590
+
591
+
592
+
593
+
594
+
595
+
596
+
597
+
598
+
599
+
600
+
601
+
602
+ <span class="summary_desc"><div class='inline'>
603
+ <p>catalog of neurons classes to use { weight =&gt; nclass, … }.</p>
604
+ </div></span>
605
+
606
+ </li>
607
+
608
+
609
+ <li class="public ">
610
+ <span class="summary_signature">
611
+
612
+ <a href="#parms-instance_method" title="#parms (instance method)">- (Object) <strong>parms</strong> </a>
613
+
614
+
615
+
616
+ </span>
617
+
618
+
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+ <span class="summary_desc"><div class='inline'>
630
+ <p>Parameters for evolution (NeatParameters).</p>
631
+ </div></span>
632
+
633
+ </li>
634
+
635
+
636
+ <li class="public ">
637
+ <span class="summary_signature">
638
+
639
+ <a href="#population-instance_method" title="#population (instance method)">- (Object) <strong>population</strong> </a>
640
+
641
+
642
+
643
+ </span>
644
+
645
+
646
+
647
+
648
+ <span class="note title readonly">readonly</span>
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+
658
+ <span class="summary_desc"><div class='inline'>
659
+ <p>population object and class specification.</p>
660
+ </div></span>
661
+
662
+ </li>
663
+
664
+
665
+ <li class="public ">
666
+ <span class="summary_signature">
667
+
668
+ <a href="#population_class-instance_method" title="#population_class (instance method)">- (Object) <strong>population_class</strong> </a>
669
+
670
+
671
+
672
+ </span>
673
+
674
+
675
+
676
+
677
+ <span class="note title readonly">readonly</span>
678
+
679
+
680
+
681
+
682
+
683
+
684
+
685
+
686
+
687
+ <span class="summary_desc"><div class='inline'>
688
+ <p>population object and class specification.</p>
689
+ </div></span>
690
+
691
+ </li>
692
+
693
+
694
+ <li class="public ">
695
+ <span class="summary_signature">
696
+
697
+ <a href="#population_history-instance_method" title="#population_history (instance method)">- (Object) <strong>population_history</strong> </a>
698
+
699
+
700
+
701
+ </span>
702
+
703
+
704
+
705
+
706
+ <span class="note title readonly">readonly</span>
707
+
708
+
709
+
710
+
711
+
712
+
713
+
714
+
715
+
716
+ <span class="summary_desc"><div class='inline'>
717
+ <p>population object and class specification.</p>
718
+ </div></span>
719
+
720
+ </li>
721
+
722
+
723
+ <li class="public ">
724
+ <span class="summary_signature">
725
+
726
+ <a href="#query_func-instance_method" title="#query_func (instance method)">- (Object) <strong>query_func</strong> </a>
727
+
728
+
729
+
730
+ </span>
731
+
732
+
733
+
734
+
735
+
736
+
737
+
738
+
739
+
740
+
741
+
742
+
743
+ <span class="summary_desc"><div class='inline'>
744
+ <p>Query function that Critters shall call.</p>
745
+ </div></span>
746
+
747
+ </li>
748
+
749
+
750
+ <li class="public ">
751
+ <span class="summary_signature">
752
+
753
+ <a href="#recurrence_func-instance_method" title="#recurrence_func (instance method)">- (Object) <strong>recurrence_func</strong> </a>
754
+
755
+
756
+
757
+ </span>
758
+
759
+
760
+
761
+
762
+
763
+
764
+
765
+
766
+
767
+
768
+
769
+
770
+ <span class="summary_desc"><div class='inline'>
771
+ <p>Recurrence function that Critters will yield to.</p>
772
+ </div></span>
773
+
774
+ </li>
775
+
776
+
777
+ <li class="public ">
778
+ <span class="summary_signature">
779
+
780
+ <a href="#report_hook-instance_method" title="#report_hook (instance method)">- (Object) <strong>report_hook</strong> </a>
781
+
782
+
783
+
784
+ </span>
785
+
786
+
787
+
788
+
789
+
790
+
791
+
792
+
793
+
794
+
795
+
796
+
797
+ <span class="summary_desc"><div class='inline'>
798
+ <p>End run function to call at the end of each generational run Also
799
+ report_hook to dump reports for the user, etc.</p>
800
+ </div></span>
801
+
802
+ </li>
803
+
804
+
805
+ <li class="public ">
806
+ <span class="summary_signature">
807
+
808
+ <a href="#seq_num-instance_method" title="#seq_num (instance method)">- (Object) <strong>seq_num</strong> </a>
809
+
810
+
811
+
812
+ </span>
813
+
814
+
815
+
816
+
817
+ <span class="note title readonly">readonly</span>
818
+
819
+
820
+
821
+
822
+
823
+
824
+
825
+
826
+
827
+ <span class="summary_desc"><div class='inline'>
828
+ <p>current sequence number being evaluated.</p>
829
+ </div></span>
830
+
831
+ </li>
832
+
833
+
834
+ <li class="public ">
835
+ <span class="summary_signature">
836
+
837
+ <a href="#stop_on_fit_func-instance_method" title="#stop_on_fit_func (instance method)">- (Object) <strong>stop_on_fit_func</strong> </a>
838
+
839
+
840
+
841
+ </span>
842
+
843
+
844
+
845
+
846
+
847
+
848
+
849
+
850
+
851
+
852
+
853
+
854
+ <span class="summary_desc"><div class='inline'>
855
+ <p>Compare function for fitness Cost function for integrating in the cost to
856
+ the fitness scalar.</p>
857
+ </div></span>
858
+
859
+ </li>
860
+
861
+
862
+ <li class="public ">
863
+ <span class="summary_signature">
864
+
865
+ <a href="#verbosity-instance_method" title="#verbosity (instance method)">- (Object) <strong>verbosity</strong> </a>
866
+
867
+
868
+
869
+ </span>
870
+
871
+
872
+
873
+
874
+
875
+
876
+
877
+
878
+
879
+
880
+
881
+
882
+ <span class="summary_desc"><div class='inline'>
883
+ <p>Global verbosity level: 1 - normal (the default) 2 - really verbose 3 -
884
+ maximally verbose Use in conjunction with log.debug.</p>
885
+ </div></span>
886
+
887
+ </li>
888
+
889
+
890
+ </ul>
891
+
892
+
893
+
894
+
895
+
896
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="NeatOb.html" title="NEAT::NeatOb (class)">NeatOb</a></span></h3>
897
+ <p class="inherited"><span class='object_link'><a href="NeatOb.html#controller-instance_method" title="NEAT::NeatOb#controller (method)">#controller</a></span>, <span class='object_link'><a href="NeatOb.html#name-instance_method" title="NEAT::NeatOb#name (method)">#name</a></span></p>
898
+
899
+
900
+
901
+ <h2>
902
+ Instance Method Summary
903
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
904
+ </h2>
905
+
906
+ <ul class="summary">
907
+
908
+ <li class="public ">
909
+ <span class="summary_signature">
910
+
911
+ <a href="#gaussian-instance_method" title="#gaussian (instance method)">- (Object) <strong>gaussian</strong> </a>
912
+
913
+
914
+
915
+ </span>
916
+
917
+
918
+
919
+
920
+
921
+
922
+
923
+
924
+
925
+ <span class="summary_desc"><div class='inline'></div></span>
926
+
927
+ </li>
928
+
929
+
930
+ <li class="public ">
931
+ <span class="summary_signature">
932
+
933
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Controller) <strong>initialize</strong>(neural_inputs: nil, neural_outputs: nil, neural_hidden: nil, parameters: NeatSettings.new, &amp;block) </a>
934
+
935
+
936
+
937
+ </span>
938
+
939
+
940
+ <span class="note title constructor">constructor</span>
941
+
942
+
943
+
944
+
945
+
946
+
947
+
948
+
949
+ <span class="summary_desc"><div class='inline'><ul><li>
950
+ <p>neural_inputs – array of input classes - neural_outputs – array of output
951
+ classes - parameters – NeatParameters object, or a path to a YAML file to
952
+ create this.</p>
953
+ </li></ul>
954
+ </div></span>
955
+
956
+ </li>
957
+
958
+
959
+ <li class="public ">
960
+ <span class="summary_signature">
961
+
962
+ <a href="#new_innovation-instance_method" title="#new_innovation (instance method)">- (Object) <strong>new_innovation</strong> </a>
963
+
964
+
965
+
966
+ </span>
967
+
968
+
969
+
970
+
971
+
972
+
973
+
974
+
975
+
976
+ <span class="summary_desc"><div class='inline'></div></span>
977
+
978
+ </li>
979
+
980
+
981
+ <li class="public ">
982
+ <span class="summary_signature">
983
+
984
+ <a href="#run-instance_method" title="#run (instance method)">- (Object) <strong>run</strong> </a>
985
+
986
+
987
+
988
+ </span>
989
+
990
+
991
+
992
+
993
+
994
+
995
+
996
+
997
+
998
+ <span class="summary_desc"><div class='inline'>
999
+ <p>Run this evolution.</p>
1000
+ </div></span>
1001
+
1002
+ </li>
1003
+
1004
+
1005
+ </ul>
1006
+
1007
+
1008
+
1009
+
1010
+
1011
+
1012
+
1013
+
1014
+
1015
+
1016
+
1017
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="NeatOb.html" title="NEAT::NeatOb (class)">NeatOb</a></span></h3>
1018
+ <p class="inherited"><span class='object_link'><a href="NeatOb.html#log-class_method" title="NEAT::NeatOb.log (method)">log</a></span>, <span class='object_link'><a href="NeatOb.html#to_s-instance_method" title="NEAT::NeatOb#to_s (method)">#to_s</a></span></p>
1019
+
1020
+ <div id="constructor_details" class="method_details_list">
1021
+ <h2>Constructor Details</h2>
1022
+
1023
+ <div class="method_details first">
1024
+ <h3 class="signature first" id="initialize-instance_method">
1025
+
1026
+ - (<tt><span class='object_link'><a href="" title="NEAT::Controller (class)">Controller</a></span></tt>) <strong>initialize</strong>(neural_inputs: nil, neural_outputs: nil, neural_hidden: nil, parameters: NeatSettings.new, &amp;block)
1027
+
1028
+
1029
+
1030
+
1031
+
1032
+ </h3><div class="docstring">
1033
+ <div class="discussion">
1034
+ <ul><li>
1035
+ <p>neural_inputs – array of input classes</p>
1036
+ </li><li>
1037
+ <p>neural_outputs – array of output classes</p>
1038
+ </li><li>
1039
+ <p>parameters – NeatParameters object, or a path to a YAML file to create
1040
+ this.</p>
1041
+ </li></ul>
1042
+
1043
+
1044
+ </div>
1045
+ </div>
1046
+ <div class="tags">
1047
+
1048
+
1049
+ </div><table class="source_code">
1050
+ <tr>
1051
+ <td>
1052
+ <pre class="lines">
1053
+
1054
+
1055
+ 334
1056
+ 335
1057
+ 336
1058
+ 337
1059
+ 338
1060
+ 339
1061
+ 340
1062
+ 341
1063
+ 342
1064
+ 343
1065
+ 344
1066
+ 345
1067
+ 346
1068
+ 347
1069
+ 348
1070
+ 349
1071
+ 350
1072
+ 351
1073
+ 352
1074
+ 353
1075
+ 354
1076
+ 355
1077
+ 356
1078
+ 357
1079
+ 358
1080
+ 359
1081
+ 360
1082
+ 361
1083
+ 362
1084
+ 363
1085
+ 364
1086
+ 365</pre>
1087
+ </td>
1088
+ <td>
1089
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 334</span>
1090
+
1091
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>neural_inputs:</span> <span class='kw'>nil</span><span class='comma'>,</span>
1092
+ <span class='label'>neural_outputs:</span> <span class='kw'>nil</span><span class='comma'>,</span>
1093
+ <span class='label'>neural_hidden:</span> <span class='kw'>nil</span><span class='comma'>,</span>
1094
+ <span class='label'>parameters:</span> <span class='const'>NeatSettings</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span>
1095
+ <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1096
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
1097
+ <span class='ivar'>@verbosity</span> <span class='op'>=</span> <span class='int'>1</span>
1098
+ <span class='ivar'>@glob_innov_num</span> <span class='op'>=</span> <span class='int'>0</span>
1099
+ <span class='ivar'>@gaussian</span> <span class='op'>=</span> <span class='const'>Distribution</span><span class='op'>::</span><span class='const'>Normal</span><span class='period'>.</span><span class='id identifier rubyid_rng'>rng</span>
1100
+ <span class='ivar'>@population_history</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1101
+ <span class='ivar'>@evolver</span> <span class='op'>=</span> <span class='const'>Evolver</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>self</span>
1102
+ <span class='ivar'>@expressor</span> <span class='op'>=</span> <span class='const'>Expressor</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>self</span>
1103
+
1104
+ <span class='ivar'>@neuron_catalog</span> <span class='op'>=</span> <span class='const'>Neuron</span><span class='op'>::</span><span class='id identifier rubyid_neuron_types'>neuron_types</span><span class='period'>.</span><span class='id identifier rubyid_clone'>clone</span>
1105
+ <span class='ivar'>@neural_inputs</span> <span class='op'>=</span> <span class='id identifier rubyid_neural_inputs'>neural_inputs</span>
1106
+ <span class='ivar'>@neural_outputs</span> <span class='op'>=</span> <span class='id identifier rubyid_neural_outputs'>neural_outputs</span>
1107
+ <span class='ivar'>@neural_hidden</span> <span class='op'>=</span> <span class='id identifier rubyid_neural_hidden'>neural_hidden</span>
1108
+
1109
+ <span class='comment'># Default classes for population and operators, etc.
1110
+ </span> <span class='ivar'>@population_class</span> <span class='op'>=</span> <span class='const'>NEAT</span><span class='op'>::</span><span class='const'>Population</span>
1111
+ <span class='ivar'>@evaluator_class</span> <span class='op'>=</span> <span class='const'>NEAT</span><span class='op'>::</span><span class='const'>Evaluator</span>
1112
+ <span class='ivar'>@expressor_class</span> <span class='op'>=</span> <span class='const'>NEAT</span><span class='op'>::</span><span class='const'>Expressor</span>
1113
+ <span class='ivar'>@evolver_class</span> <span class='op'>=</span> <span class='const'>NEAT</span><span class='op'>::</span><span class='const'>Evolver</span>
1114
+
1115
+ <span class='comment'># Handle the parameters parameter. :-)
1116
+ </span> <span class='ivar'>@parms</span> <span class='op'>=</span> <span class='kw'>unless</span> <span class='id identifier rubyid_parameters'>parameters</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='const'>String</span>
1117
+ <span class='id identifier rubyid_parameters'>parameters</span>
1118
+ <span class='kw'>else</span> <span class='comment'># load it from a file
1119
+ </span> <span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_parameters'>parameters</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>r</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_fd'>fd</span><span class='op'>|</span> <span class='const'>YAML</span><span class='op'>::</span><span class='id identifier rubyid_load'>load</span> <span class='id identifier rubyid_fd'>fd</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span> <span class='rbrace'>}</span>
1120
+ <span class='kw'>end</span>
1121
+ <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1122
+ <span class='kw'>end</span></pre>
1123
+ </td>
1124
+ </tr>
1125
+ </table>
1126
+ </div>
1127
+
1128
+ </div>
1129
+
1130
+ <div id="instance_attr_details" class="attr_details">
1131
+ <h2>Instance Attribute Details</h2>
1132
+
1133
+
1134
+ <span id="compare_func=-instance_method"></span>
1135
+ <div class="method_details first">
1136
+ <h3 class="signature first" id="compare_func-instance_method">
1137
+
1138
+ - (<tt>Object</tt>) <strong>compare_func</strong>
1139
+
1140
+
1141
+
1142
+
1143
+
1144
+ </h3><div class="docstring">
1145
+ <div class="discussion">
1146
+
1147
+ <p>Compare function for fitness Cost function for integrating in the cost to
1148
+ the fitness scalar.</p>
1149
+
1150
+
1151
+ </div>
1152
+ </div>
1153
+ <div class="tags">
1154
+
1155
+
1156
+ </div><table class="source_code">
1157
+ <tr>
1158
+ <td>
1159
+ <pre class="lines">
1160
+
1161
+
1162
+ 197
1163
+ 198
1164
+ 199</pre>
1165
+ </td>
1166
+ <td>
1167
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 197</span>
1168
+
1169
+ <span class='kw'>def</span> <span class='id identifier rubyid_compare_func'>compare_func</span>
1170
+ <span class='ivar'>@compare_func</span>
1171
+ <span class='kw'>end</span></pre>
1172
+ </td>
1173
+ </tr>
1174
+ </table>
1175
+ </div>
1176
+
1177
+
1178
+ <span id="cost_func=-instance_method"></span>
1179
+ <div class="method_details ">
1180
+ <h3 class="signature " id="cost_func-instance_method">
1181
+
1182
+ - (<tt>Object</tt>) <strong>cost_func</strong>
1183
+
1184
+
1185
+
1186
+
1187
+
1188
+ </h3><div class="docstring">
1189
+ <div class="discussion">
1190
+
1191
+ <p>Compare function for fitness Cost function for integrating in the cost to
1192
+ the fitness scalar.</p>
1193
+
1194
+
1195
+ </div>
1196
+ </div>
1197
+ <div class="tags">
1198
+
1199
+
1200
+ </div><table class="source_code">
1201
+ <tr>
1202
+ <td>
1203
+ <pre class="lines">
1204
+
1205
+
1206
+ 197
1207
+ 198
1208
+ 199</pre>
1209
+ </td>
1210
+ <td>
1211
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 197</span>
1212
+
1213
+ <span class='kw'>def</span> <span class='id identifier rubyid_cost_func'>cost_func</span>
1214
+ <span class='ivar'>@cost_func</span>
1215
+ <span class='kw'>end</span></pre>
1216
+ </td>
1217
+ </tr>
1218
+ </table>
1219
+ </div>
1220
+
1221
+
1222
+ <span id="end_run_func=-instance_method"></span>
1223
+ <div class="method_details ">
1224
+ <h3 class="signature " id="end_run_func-instance_method">
1225
+
1226
+ - (<tt>Object</tt>) <strong>end_run_func</strong>
1227
+
1228
+
1229
+
1230
+
1231
+
1232
+ </h3><div class="docstring">
1233
+ <div class="discussion">
1234
+
1235
+ <p>End run function to call at the end of each generational run Also
1236
+ report_hook to dump reports for the user, etc.</p>
1237
+
1238
+
1239
+ </div>
1240
+ </div>
1241
+ <div class="tags">
1242
+
1243
+
1244
+ </div><table class="source_code">
1245
+ <tr>
1246
+ <td>
1247
+ <pre class="lines">
1248
+
1249
+
1250
+ 201
1251
+ 202
1252
+ 203</pre>
1253
+ </td>
1254
+ <td>
1255
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 201</span>
1256
+
1257
+ <span class='kw'>def</span> <span class='id identifier rubyid_end_run_func'>end_run_func</span>
1258
+ <span class='ivar'>@end_run_func</span>
1259
+ <span class='kw'>end</span></pre>
1260
+ </td>
1261
+ </tr>
1262
+ </table>
1263
+ </div>
1264
+
1265
+
1266
+ <span id="evaluator=-instance_method"></span>
1267
+ <div class="method_details ">
1268
+ <h3 class="signature " id="evaluator-instance_method">
1269
+
1270
+ - (<tt>Object</tt>) <strong>evaluator</strong>
1271
+
1272
+
1273
+
1274
+
1275
+
1276
+ </h3><div class="docstring">
1277
+ <div class="discussion">
1278
+
1279
+ <p>Returns the value of attribute evaluator</p>
1280
+
1281
+
1282
+ </div>
1283
+ </div>
1284
+ <div class="tags">
1285
+
1286
+
1287
+ </div><table class="source_code">
1288
+ <tr>
1289
+ <td>
1290
+ <pre class="lines">
1291
+
1292
+
1293
+ 176
1294
+ 177
1295
+ 178</pre>
1296
+ </td>
1297
+ <td>
1298
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 176</span>
1299
+
1300
+ <span class='kw'>def</span> <span class='id identifier rubyid_evaluator'>evaluator</span>
1301
+ <span class='ivar'>@evaluator</span>
1302
+ <span class='kw'>end</span></pre>
1303
+ </td>
1304
+ </tr>
1305
+ </table>
1306
+ </div>
1307
+
1308
+
1309
+ <span id="evaluator_class=-instance_method"></span>
1310
+ <div class="method_details ">
1311
+ <h3 class="signature " id="evaluator_class-instance_method">
1312
+
1313
+ - (<tt>Object</tt>) <strong>evaluator_class</strong>
1314
+
1315
+
1316
+
1317
+
1318
+
1319
+ </h3><div class="docstring">
1320
+ <div class="discussion">
1321
+
1322
+ <p>Returns the value of attribute evaluator_class</p>
1323
+
1324
+
1325
+ </div>
1326
+ </div>
1327
+ <div class="tags">
1328
+
1329
+
1330
+ </div><table class="source_code">
1331
+ <tr>
1332
+ <td>
1333
+ <pre class="lines">
1334
+
1335
+
1336
+ 176
1337
+ 177
1338
+ 178</pre>
1339
+ </td>
1340
+ <td>
1341
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 176</span>
1342
+
1343
+ <span class='kw'>def</span> <span class='id identifier rubyid_evaluator_class'>evaluator_class</span>
1344
+ <span class='ivar'>@evaluator_class</span>
1345
+ <span class='kw'>end</span></pre>
1346
+ </td>
1347
+ </tr>
1348
+ </table>
1349
+ </div>
1350
+
1351
+
1352
+ <span id="evolver=-instance_method"></span>
1353
+ <div class="method_details ">
1354
+ <h3 class="signature " id="evolver-instance_method">
1355
+
1356
+ - (<tt>Object</tt>) <strong>evolver</strong>
1357
+
1358
+
1359
+
1360
+
1361
+
1362
+ </h3><div class="docstring">
1363
+ <div class="discussion">
1364
+
1365
+ <p>Returns the value of attribute evolver</p>
1366
+
1367
+
1368
+ </div>
1369
+ </div>
1370
+ <div class="tags">
1371
+
1372
+
1373
+ </div><table class="source_code">
1374
+ <tr>
1375
+ <td>
1376
+ <pre class="lines">
1377
+
1378
+
1379
+ 177
1380
+ 178
1381
+ 179</pre>
1382
+ </td>
1383
+ <td>
1384
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 177</span>
1385
+
1386
+ <span class='kw'>def</span> <span class='id identifier rubyid_evolver'>evolver</span>
1387
+ <span class='ivar'>@evolver</span>
1388
+ <span class='kw'>end</span></pre>
1389
+ </td>
1390
+ </tr>
1391
+ </table>
1392
+ </div>
1393
+
1394
+
1395
+ <span id="evolver_class=-instance_method"></span>
1396
+ <div class="method_details ">
1397
+ <h3 class="signature " id="evolver_class-instance_method">
1398
+
1399
+ - (<tt>Object</tt>) <strong>evolver_class</strong>
1400
+
1401
+
1402
+
1403
+
1404
+
1405
+ </h3><div class="docstring">
1406
+ <div class="discussion">
1407
+
1408
+ <p>Returns the value of attribute evolver_class</p>
1409
+
1410
+
1411
+ </div>
1412
+ </div>
1413
+ <div class="tags">
1414
+
1415
+
1416
+ </div><table class="source_code">
1417
+ <tr>
1418
+ <td>
1419
+ <pre class="lines">
1420
+
1421
+
1422
+ 177
1423
+ 178
1424
+ 179</pre>
1425
+ </td>
1426
+ <td>
1427
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 177</span>
1428
+
1429
+ <span class='kw'>def</span> <span class='id identifier rubyid_evolver_class'>evolver_class</span>
1430
+ <span class='ivar'>@evolver_class</span>
1431
+ <span class='kw'>end</span></pre>
1432
+ </td>
1433
+ </tr>
1434
+ </table>
1435
+ </div>
1436
+
1437
+
1438
+ <span id="expressor=-instance_method"></span>
1439
+ <div class="method_details ">
1440
+ <h3 class="signature " id="expressor-instance_method">
1441
+
1442
+ - (<tt>Object</tt>) <strong>expressor</strong>
1443
+
1444
+
1445
+
1446
+
1447
+
1448
+ </h3><div class="docstring">
1449
+ <div class="discussion">
1450
+
1451
+ <p>Returns the value of attribute expressor</p>
1452
+
1453
+
1454
+ </div>
1455
+ </div>
1456
+ <div class="tags">
1457
+
1458
+
1459
+ </div><table class="source_code">
1460
+ <tr>
1461
+ <td>
1462
+ <pre class="lines">
1463
+
1464
+
1465
+ 175
1466
+ 176
1467
+ 177</pre>
1468
+ </td>
1469
+ <td>
1470
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 175</span>
1471
+
1472
+ <span class='kw'>def</span> <span class='id identifier rubyid_expressor'>expressor</span>
1473
+ <span class='ivar'>@expressor</span>
1474
+ <span class='kw'>end</span></pre>
1475
+ </td>
1476
+ </tr>
1477
+ </table>
1478
+ </div>
1479
+
1480
+
1481
+ <span id="expressor_class=-instance_method"></span>
1482
+ <div class="method_details ">
1483
+ <h3 class="signature " id="expressor_class-instance_method">
1484
+
1485
+ - (<tt>Object</tt>) <strong>expressor_class</strong>
1486
+
1487
+
1488
+
1489
+
1490
+
1491
+ </h3><div class="docstring">
1492
+ <div class="discussion">
1493
+
1494
+ <p>Returns the value of attribute expressor_class</p>
1495
+
1496
+
1497
+ </div>
1498
+ </div>
1499
+ <div class="tags">
1500
+
1501
+
1502
+ </div><table class="source_code">
1503
+ <tr>
1504
+ <td>
1505
+ <pre class="lines">
1506
+
1507
+
1508
+ 175
1509
+ 176
1510
+ 177</pre>
1511
+ </td>
1512
+ <td>
1513
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 175</span>
1514
+
1515
+ <span class='kw'>def</span> <span class='id identifier rubyid_expressor_class'>expressor_class</span>
1516
+ <span class='ivar'>@expressor_class</span>
1517
+ <span class='kw'>end</span></pre>
1518
+ </td>
1519
+ </tr>
1520
+ </table>
1521
+ </div>
1522
+
1523
+
1524
+ <span id="fitness_func=-instance_method"></span>
1525
+ <div class="method_details ">
1526
+ <h3 class="signature " id="fitness_func-instance_method">
1527
+
1528
+ - (<tt>Object</tt>) <strong>fitness_func</strong>
1529
+
1530
+
1531
+
1532
+
1533
+
1534
+ </h3><div class="docstring">
1535
+ <div class="discussion">
1536
+
1537
+ <p>Fitness function that Critters shall be rated on.</p>
1538
+
1539
+
1540
+ </div>
1541
+ </div>
1542
+ <div class="tags">
1543
+
1544
+
1545
+ </div><table class="source_code">
1546
+ <tr>
1547
+ <td>
1548
+ <pre class="lines">
1549
+
1550
+
1551
+ 190
1552
+ 191
1553
+ 192</pre>
1554
+ </td>
1555
+ <td>
1556
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 190</span>
1557
+
1558
+ <span class='kw'>def</span> <span class='id identifier rubyid_fitness_func'>fitness_func</span>
1559
+ <span class='ivar'>@fitness_func</span>
1560
+ <span class='kw'>end</span></pre>
1561
+ </td>
1562
+ </tr>
1563
+ </table>
1564
+ </div>
1565
+
1566
+
1567
+ <span id=""></span>
1568
+ <div class="method_details ">
1569
+ <h3 class="signature " id="generation_num-instance_method">
1570
+
1571
+ - (<tt>Object</tt>) <strong>generation_num</strong> <span class="extras">(readonly)</span>
1572
+
1573
+
1574
+
1575
+
1576
+
1577
+ </h3><div class="docstring">
1578
+ <div class="discussion">
1579
+
1580
+ <p>Current generation count</p>
1581
+
1582
+
1583
+ </div>
1584
+ </div>
1585
+ <div class="tags">
1586
+
1587
+
1588
+ </div><table class="source_code">
1589
+ <tr>
1590
+ <td>
1591
+ <pre class="lines">
1592
+
1593
+
1594
+ 160
1595
+ 161
1596
+ 162</pre>
1597
+ </td>
1598
+ <td>
1599
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 160</span>
1600
+
1601
+ <span class='kw'>def</span> <span class='id identifier rubyid_generation_num'>generation_num</span>
1602
+ <span class='ivar'>@generation_num</span>
1603
+ <span class='kw'>end</span></pre>
1604
+ </td>
1605
+ </tr>
1606
+ </table>
1607
+ </div>
1608
+
1609
+
1610
+ <span id=""></span>
1611
+ <div class="method_details ">
1612
+ <h3 class="signature " id="glob_innov_num-instance_method">
1613
+
1614
+ - (<tt>Object</tt>) <strong>glob_innov_num</strong> <span class="extras">(readonly)</span>
1615
+
1616
+
1617
+
1618
+
1619
+
1620
+ </h3><div class="docstring">
1621
+ <div class="discussion">
1622
+
1623
+ <p>global innovation number</p>
1624
+
1625
+
1626
+ </div>
1627
+ </div>
1628
+ <div class="tags">
1629
+
1630
+
1631
+ </div><table class="source_code">
1632
+ <tr>
1633
+ <td>
1634
+ <pre class="lines">
1635
+
1636
+
1637
+ 154
1638
+ 155
1639
+ 156</pre>
1640
+ </td>
1641
+ <td>
1642
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 154</span>
1643
+
1644
+ <span class='kw'>def</span> <span class='id identifier rubyid_glob_innov_num'>glob_innov_num</span>
1645
+ <span class='ivar'>@glob_innov_num</span>
1646
+ <span class='kw'>end</span></pre>
1647
+ </td>
1648
+ </tr>
1649
+ </table>
1650
+ </div>
1651
+
1652
+
1653
+ <span id=""></span>
1654
+ <div class="method_details ">
1655
+ <h3 class="signature " id="log-instance_method">
1656
+
1657
+ - (<tt>Object</tt>) <strong>log</strong> <span class="extras">(readonly)</span>
1658
+
1659
+
1660
+
1661
+
1662
+
1663
+ </h3><div class="docstring">
1664
+ <div class="discussion">
1665
+
1666
+ <p>Logger object for all of RubyNEAT</p>
1667
+
1668
+
1669
+ </div>
1670
+ </div>
1671
+ <div class="tags">
1672
+
1673
+
1674
+ </div><table class="source_code">
1675
+ <tr>
1676
+ <td>
1677
+ <pre class="lines">
1678
+
1679
+
1680
+ 204
1681
+ 205
1682
+ 206</pre>
1683
+ </td>
1684
+ <td>
1685
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 204</span>
1686
+
1687
+ <span class='kw'>def</span> <span class='id identifier rubyid_log'>log</span>
1688
+ <span class='ivar'>@log</span>
1689
+ <span class='kw'>end</span></pre>
1690
+ </td>
1691
+ </tr>
1692
+ </table>
1693
+ </div>
1694
+
1695
+
1696
+ <span id="neural_hidden=-instance_method"></span>
1697
+ <div class="method_details ">
1698
+ <h3 class="signature " id="neural_hidden-instance_method">
1699
+
1700
+ - (<tt>Object</tt>) <strong>neural_hidden</strong>
1701
+
1702
+
1703
+
1704
+
1705
+
1706
+ </h3><div class="docstring">
1707
+ <div class="discussion">
1708
+
1709
+ <p>Class map of named input and output neurons (each critter will have
1710
+ instantiations of these) name: InputNeuralClass (usually InputNeuron)</p>
1711
+
1712
+
1713
+ </div>
1714
+ </div>
1715
+ <div class="tags">
1716
+
1717
+
1718
+ </div><table class="source_code">
1719
+ <tr>
1720
+ <td>
1721
+ <pre class="lines">
1722
+
1723
+
1724
+ 167
1725
+ 168
1726
+ 169</pre>
1727
+ </td>
1728
+ <td>
1729
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 167</span>
1730
+
1731
+ <span class='kw'>def</span> <span class='id identifier rubyid_neural_hidden'>neural_hidden</span>
1732
+ <span class='ivar'>@neural_hidden</span>
1733
+ <span class='kw'>end</span></pre>
1734
+ </td>
1735
+ </tr>
1736
+ </table>
1737
+ </div>
1738
+
1739
+
1740
+ <span id="neural_inputs=-instance_method"></span>
1741
+ <div class="method_details ">
1742
+ <h3 class="signature " id="neural_inputs-instance_method">
1743
+
1744
+ - (<tt>Object</tt>) <strong>neural_inputs</strong>
1745
+
1746
+
1747
+
1748
+
1749
+
1750
+ </h3><div class="docstring">
1751
+ <div class="discussion">
1752
+
1753
+ <p>Class map of named input and output neurons (each critter will have
1754
+ instantiations of these) name: InputNeuralClass (usually InputNeuron)</p>
1755
+
1756
+
1757
+ </div>
1758
+ </div>
1759
+ <div class="tags">
1760
+
1761
+
1762
+ </div><table class="source_code">
1763
+ <tr>
1764
+ <td>
1765
+ <pre class="lines">
1766
+
1767
+
1768
+ 167
1769
+ 168
1770
+ 169</pre>
1771
+ </td>
1772
+ <td>
1773
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 167</span>
1774
+
1775
+ <span class='kw'>def</span> <span class='id identifier rubyid_neural_inputs'>neural_inputs</span>
1776
+ <span class='ivar'>@neural_inputs</span>
1777
+ <span class='kw'>end</span></pre>
1778
+ </td>
1779
+ </tr>
1780
+ </table>
1781
+ </div>
1782
+
1783
+
1784
+ <span id="neural_outputs=-instance_method"></span>
1785
+ <div class="method_details ">
1786
+ <h3 class="signature " id="neural_outputs-instance_method">
1787
+
1788
+ - (<tt>Object</tt>) <strong>neural_outputs</strong>
1789
+
1790
+
1791
+
1792
+
1793
+
1794
+ </h3><div class="docstring">
1795
+ <div class="discussion">
1796
+
1797
+ <p>Class map of named input and output neurons (each critter will have
1798
+ instantiations of these) name: InputNeuralClass (usually InputNeuron)</p>
1799
+
1800
+
1801
+ </div>
1802
+ </div>
1803
+ <div class="tags">
1804
+
1805
+
1806
+ </div><table class="source_code">
1807
+ <tr>
1808
+ <td>
1809
+ <pre class="lines">
1810
+
1811
+
1812
+ 167
1813
+ 168
1814
+ 169</pre>
1815
+ </td>
1816
+ <td>
1817
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 167</span>
1818
+
1819
+ <span class='kw'>def</span> <span class='id identifier rubyid_neural_outputs'>neural_outputs</span>
1820
+ <span class='ivar'>@neural_outputs</span>
1821
+ <span class='kw'>end</span></pre>
1822
+ </td>
1823
+ </tr>
1824
+ </table>
1825
+ </div>
1826
+
1827
+
1828
+ <span id="neuron_catalog=-instance_method"></span>
1829
+ <div class="method_details ">
1830
+ <h3 class="signature " id="neuron_catalog-instance_method">
1831
+
1832
+ - (<tt>Object</tt>) <strong>neuron_catalog</strong>
1833
+
1834
+
1835
+
1836
+
1837
+
1838
+ </h3><div class="docstring">
1839
+ <div class="discussion">
1840
+
1841
+ <p>catalog of neurons classes to use { weight =&gt; nclass, … }</p>
1842
+
1843
+
1844
+ </div>
1845
+ </div>
1846
+ <div class="tags">
1847
+
1848
+
1849
+ </div><table class="source_code">
1850
+ <tr>
1851
+ <td>
1852
+ <pre class="lines">
1853
+
1854
+
1855
+ 163
1856
+ 164
1857
+ 165</pre>
1858
+ </td>
1859
+ <td>
1860
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 163</span>
1861
+
1862
+ <span class='kw'>def</span> <span class='id identifier rubyid_neuron_catalog'>neuron_catalog</span>
1863
+ <span class='ivar'>@neuron_catalog</span>
1864
+ <span class='kw'>end</span></pre>
1865
+ </td>
1866
+ </tr>
1867
+ </table>
1868
+ </div>
1869
+
1870
+
1871
+ <span id="parms=-instance_method"></span>
1872
+ <div class="method_details ">
1873
+ <h3 class="signature " id="parms-instance_method">
1874
+
1875
+ - (<tt>Object</tt>) <strong>parms</strong>
1876
+
1877
+
1878
+
1879
+
1880
+
1881
+ </h3><div class="docstring">
1882
+ <div class="discussion">
1883
+
1884
+ <p>Parameters for evolution (NeatParameters)</p>
1885
+
1886
+
1887
+ </div>
1888
+ </div>
1889
+ <div class="tags">
1890
+
1891
+
1892
+ </div><table class="source_code">
1893
+ <tr>
1894
+ <td>
1895
+ <pre class="lines">
1896
+
1897
+
1898
+ 170
1899
+ 171
1900
+ 172</pre>
1901
+ </td>
1902
+ <td>
1903
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 170</span>
1904
+
1905
+ <span class='kw'>def</span> <span class='id identifier rubyid_parms'>parms</span>
1906
+ <span class='ivar'>@parms</span>
1907
+ <span class='kw'>end</span></pre>
1908
+ </td>
1909
+ </tr>
1910
+ </table>
1911
+ </div>
1912
+
1913
+
1914
+ <span id=""></span>
1915
+ <div class="method_details ">
1916
+ <h3 class="signature " id="population-instance_method">
1917
+
1918
+ - (<tt>Object</tt>) <strong>population</strong> <span class="extras">(readonly)</span>
1919
+
1920
+
1921
+
1922
+
1923
+
1924
+ </h3><div class="docstring">
1925
+ <div class="discussion">
1926
+
1927
+ <p>population object and class specification</p>
1928
+
1929
+
1930
+ </div>
1931
+ </div>
1932
+ <div class="tags">
1933
+
1934
+
1935
+ </div><table class="source_code">
1936
+ <tr>
1937
+ <td>
1938
+ <pre class="lines">
1939
+
1940
+
1941
+ 173
1942
+ 174
1943
+ 175</pre>
1944
+ </td>
1945
+ <td>
1946
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 173</span>
1947
+
1948
+ <span class='kw'>def</span> <span class='id identifier rubyid_population'>population</span>
1949
+ <span class='ivar'>@population</span>
1950
+ <span class='kw'>end</span></pre>
1951
+ </td>
1952
+ </tr>
1953
+ </table>
1954
+ </div>
1955
+
1956
+
1957
+ <span id=""></span>
1958
+ <div class="method_details ">
1959
+ <h3 class="signature " id="population_class-instance_method">
1960
+
1961
+ - (<tt>Object</tt>) <strong>population_class</strong> <span class="extras">(readonly)</span>
1962
+
1963
+
1964
+
1965
+
1966
+
1967
+ </h3><div class="docstring">
1968
+ <div class="discussion">
1969
+
1970
+ <p>population object and class specification</p>
1971
+
1972
+
1973
+ </div>
1974
+ </div>
1975
+ <div class="tags">
1976
+
1977
+
1978
+ </div><table class="source_code">
1979
+ <tr>
1980
+ <td>
1981
+ <pre class="lines">
1982
+
1983
+
1984
+ 173
1985
+ 174
1986
+ 175</pre>
1987
+ </td>
1988
+ <td>
1989
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 173</span>
1990
+
1991
+ <span class='kw'>def</span> <span class='id identifier rubyid_population_class'>population_class</span>
1992
+ <span class='ivar'>@population_class</span>
1993
+ <span class='kw'>end</span></pre>
1994
+ </td>
1995
+ </tr>
1996
+ </table>
1997
+ </div>
1998
+
1999
+
2000
+ <span id=""></span>
2001
+ <div class="method_details ">
2002
+ <h3 class="signature " id="population_history-instance_method">
2003
+
2004
+ - (<tt>Object</tt>) <strong>population_history</strong> <span class="extras">(readonly)</span>
2005
+
2006
+
2007
+
2008
+
2009
+
2010
+ </h3><div class="docstring">
2011
+ <div class="discussion">
2012
+
2013
+ <p>population object and class specification</p>
2014
+
2015
+
2016
+ </div>
2017
+ </div>
2018
+ <div class="tags">
2019
+
2020
+
2021
+ </div><table class="source_code">
2022
+ <tr>
2023
+ <td>
2024
+ <pre class="lines">
2025
+
2026
+
2027
+ 173
2028
+ 174
2029
+ 175</pre>
2030
+ </td>
2031
+ <td>
2032
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 173</span>
2033
+
2034
+ <span class='kw'>def</span> <span class='id identifier rubyid_population_history'>population_history</span>
2035
+ <span class='ivar'>@population_history</span>
2036
+ <span class='kw'>end</span></pre>
2037
+ </td>
2038
+ </tr>
2039
+ </table>
2040
+ </div>
2041
+
2042
+
2043
+ <span id="query_func=-instance_method"></span>
2044
+ <div class="method_details ">
2045
+ <h3 class="signature " id="query_func-instance_method">
2046
+
2047
+ - (<tt>Object</tt>) <strong>query_func</strong>
2048
+
2049
+
2050
+
2051
+
2052
+
2053
+ </h3><div class="docstring">
2054
+ <div class="discussion">
2055
+
2056
+ <p>Query function that Critters shall call.</p>
2057
+
2058
+
2059
+ </div>
2060
+ </div>
2061
+ <div class="tags">
2062
+
2063
+
2064
+ </div><table class="source_code">
2065
+ <tr>
2066
+ <td>
2067
+ <pre class="lines">
2068
+
2069
+
2070
+ 187
2071
+ 188
2072
+ 189</pre>
2073
+ </td>
2074
+ <td>
2075
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 187</span>
2076
+
2077
+ <span class='kw'>def</span> <span class='id identifier rubyid_query_func'>query_func</span>
2078
+ <span class='ivar'>@query_func</span>
2079
+ <span class='kw'>end</span></pre>
2080
+ </td>
2081
+ </tr>
2082
+ </table>
2083
+ </div>
2084
+
2085
+
2086
+ <span id="recurrence_func=-instance_method"></span>
2087
+ <div class="method_details ">
2088
+ <h3 class="signature " id="recurrence_func-instance_method">
2089
+
2090
+ - (<tt>Object</tt>) <strong>recurrence_func</strong>
2091
+
2092
+
2093
+
2094
+
2095
+
2096
+ </h3><div class="docstring">
2097
+ <div class="discussion">
2098
+
2099
+ <p>Recurrence function that Critters will yield to.</p>
2100
+
2101
+
2102
+ </div>
2103
+ </div>
2104
+ <div class="tags">
2105
+
2106
+
2107
+ </div><table class="source_code">
2108
+ <tr>
2109
+ <td>
2110
+ <pre class="lines">
2111
+
2112
+
2113
+ 193
2114
+ 194
2115
+ 195</pre>
2116
+ </td>
2117
+ <td>
2118
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 193</span>
2119
+
2120
+ <span class='kw'>def</span> <span class='id identifier rubyid_recurrence_func'>recurrence_func</span>
2121
+ <span class='ivar'>@recurrence_func</span>
2122
+ <span class='kw'>end</span></pre>
2123
+ </td>
2124
+ </tr>
2125
+ </table>
2126
+ </div>
2127
+
2128
+
2129
+ <span id="report_hook=-instance_method"></span>
2130
+ <div class="method_details ">
2131
+ <h3 class="signature " id="report_hook-instance_method">
2132
+
2133
+ - (<tt>Object</tt>) <strong>report_hook</strong>
2134
+
2135
+
2136
+
2137
+
2138
+
2139
+ </h3><div class="docstring">
2140
+ <div class="discussion">
2141
+
2142
+ <p>End run function to call at the end of each generational run Also
2143
+ report_hook to dump reports for the user, etc.</p>
2144
+
2145
+
2146
+ </div>
2147
+ </div>
2148
+ <div class="tags">
2149
+
2150
+
2151
+ </div><table class="source_code">
2152
+ <tr>
2153
+ <td>
2154
+ <pre class="lines">
2155
+
2156
+
2157
+ 201
2158
+ 202
2159
+ 203</pre>
2160
+ </td>
2161
+ <td>
2162
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 201</span>
2163
+
2164
+ <span class='kw'>def</span> <span class='id identifier rubyid_report_hook'>report_hook</span>
2165
+ <span class='ivar'>@report_hook</span>
2166
+ <span class='kw'>end</span></pre>
2167
+ </td>
2168
+ </tr>
2169
+ </table>
2170
+ </div>
2171
+
2172
+
2173
+ <span id=""></span>
2174
+ <div class="method_details ">
2175
+ <h3 class="signature " id="seq_num-instance_method">
2176
+
2177
+ - (<tt>Object</tt>) <strong>seq_num</strong> <span class="extras">(readonly)</span>
2178
+
2179
+
2180
+
2181
+
2182
+
2183
+ </h3><div class="docstring">
2184
+ <div class="discussion">
2185
+
2186
+ <p>current sequence number being evaluated</p>
2187
+
2188
+
2189
+ </div>
2190
+ </div>
2191
+ <div class="tags">
2192
+
2193
+
2194
+ </div><table class="source_code">
2195
+ <tr>
2196
+ <td>
2197
+ <pre class="lines">
2198
+
2199
+
2200
+ 157
2201
+ 158
2202
+ 159</pre>
2203
+ </td>
2204
+ <td>
2205
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 157</span>
2206
+
2207
+ <span class='kw'>def</span> <span class='id identifier rubyid_seq_num'>seq_num</span>
2208
+ <span class='ivar'>@seq_num</span>
2209
+ <span class='kw'>end</span></pre>
2210
+ </td>
2211
+ </tr>
2212
+ </table>
2213
+ </div>
2214
+
2215
+
2216
+ <span id="stop_on_fit_func=-instance_method"></span>
2217
+ <div class="method_details ">
2218
+ <h3 class="signature " id="stop_on_fit_func-instance_method">
2219
+
2220
+ - (<tt>Object</tt>) <strong>stop_on_fit_func</strong>
2221
+
2222
+
2223
+
2224
+
2225
+
2226
+ </h3><div class="docstring">
2227
+ <div class="discussion">
2228
+
2229
+ <p>Compare function for fitness Cost function for integrating in the cost to
2230
+ the fitness scalar.</p>
2231
+
2232
+
2233
+ </div>
2234
+ </div>
2235
+ <div class="tags">
2236
+
2237
+
2238
+ </div><table class="source_code">
2239
+ <tr>
2240
+ <td>
2241
+ <pre class="lines">
2242
+
2243
+
2244
+ 197
2245
+ 198
2246
+ 199</pre>
2247
+ </td>
2248
+ <td>
2249
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 197</span>
2250
+
2251
+ <span class='kw'>def</span> <span class='id identifier rubyid_stop_on_fit_func'>stop_on_fit_func</span>
2252
+ <span class='ivar'>@stop_on_fit_func</span>
2253
+ <span class='kw'>end</span></pre>
2254
+ </td>
2255
+ </tr>
2256
+ </table>
2257
+ </div>
2258
+
2259
+
2260
+ <span id="verbosity=-instance_method"></span>
2261
+ <div class="method_details ">
2262
+ <h3 class="signature " id="verbosity-instance_method">
2263
+
2264
+ - (<tt>Object</tt>) <strong>verbosity</strong>
2265
+
2266
+
2267
+
2268
+
2269
+
2270
+ </h3><div class="docstring">
2271
+ <div class="discussion">
2272
+
2273
+ <p>Global verbosity level: 1 - normal (the default) 2 - really verbose 3 -
2274
+ maximally verbose Use in conjunction with log.debug</p>
2275
+
2276
+
2277
+ </div>
2278
+ </div>
2279
+ <div class="tags">
2280
+
2281
+
2282
+ </div><table class="source_code">
2283
+ <tr>
2284
+ <td>
2285
+ <pre class="lines">
2286
+
2287
+
2288
+ 184
2289
+ 185
2290
+ 186</pre>
2291
+ </td>
2292
+ <td>
2293
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 184</span>
2294
+
2295
+ <span class='kw'>def</span> <span class='id identifier rubyid_verbosity'>verbosity</span>
2296
+ <span class='ivar'>@verbosity</span>
2297
+ <span class='kw'>end</span></pre>
2298
+ </td>
2299
+ </tr>
2300
+ </table>
2301
+ </div>
2302
+
2303
+ </div>
2304
+
2305
+
2306
+ <div id="instance_method_details" class="method_details_list">
2307
+ <h2>Instance Method Details</h2>
2308
+
2309
+
2310
+ <div class="method_details first">
2311
+ <h3 class="signature first" id="gaussian-instance_method">
2312
+
2313
+ - (<tt>Object</tt>) <strong>gaussian</strong>
2314
+
2315
+
2316
+
2317
+
2318
+
2319
+ </h3><table class="source_code">
2320
+ <tr>
2321
+ <td>
2322
+ <pre class="lines">
2323
+
2324
+
2325
+ 368</pre>
2326
+ </td>
2327
+ <td>
2328
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 368</span>
2329
+
2330
+ <span class='kw'>def</span> <span class='id identifier rubyid_gaussian'>gaussian</span> <span class='semicolon'>;</span> <span class='ivar'>@gaussian</span><span class='period'>.</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
2331
+ </td>
2332
+ </tr>
2333
+ </table>
2334
+ </div>
2335
+
2336
+ <div class="method_details ">
2337
+ <h3 class="signature " id="new_innovation-instance_method">
2338
+
2339
+ - (<tt>Object</tt>) <strong>new_innovation</strong>
2340
+
2341
+
2342
+
2343
+
2344
+
2345
+ </h3><table class="source_code">
2346
+ <tr>
2347
+ <td>
2348
+ <pre class="lines">
2349
+
2350
+
2351
+ 367</pre>
2352
+ </td>
2353
+ <td>
2354
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 367</span>
2355
+
2356
+ <span class='kw'>def</span> <span class='id identifier rubyid_new_innovation'>new_innovation</span> <span class='semicolon'>;</span> <span class='ivar'>@glob_innov_num</span> <span class='op'>+=</span> <span class='int'>1</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
2357
+ </td>
2358
+ </tr>
2359
+ </table>
2360
+ </div>
2361
+
2362
+ <div class="method_details ">
2363
+ <h3 class="signature " id="run-instance_method">
2364
+
2365
+ - (<tt>Object</tt>) <strong>run</strong>
2366
+
2367
+
2368
+
2369
+
2370
+
2371
+ </h3><div class="docstring">
2372
+ <div class="discussion">
2373
+
2374
+ <p>Run this evolution.</p>
2375
+
2376
+
2377
+ </div>
2378
+ </div>
2379
+ <div class="tags">
2380
+
2381
+
2382
+ </div><table class="source_code">
2383
+ <tr>
2384
+ <td>
2385
+ <pre class="lines">
2386
+
2387
+
2388
+ 371
2389
+ 372
2390
+ 373
2391
+ 374
2392
+ 375
2393
+ 376
2394
+ 377
2395
+ 378
2396
+ 379
2397
+ 380
2398
+ 381
2399
+ 382
2400
+ 383
2401
+ 384
2402
+ 385
2403
+ 386
2404
+ 387
2405
+ 388
2406
+ 389
2407
+ 390
2408
+ 391
2409
+ 392
2410
+ 393
2411
+ 394
2412
+ 395
2413
+ 396
2414
+ 397
2415
+ 398
2416
+ 399
2417
+ 400
2418
+ 401
2419
+ 402
2420
+ 403
2421
+ 404
2422
+ 405
2423
+ 406
2424
+ 407
2425
+ 408
2426
+ 409
2427
+ 410
2428
+ 411</pre>
2429
+ </td>
2430
+ <td>
2431
+ <pre class="code"><span class="info file"># File 'lib/rubyneat/rubyneat.rb', line 371</span>
2432
+
2433
+ <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span>
2434
+ <span class='id identifier rubyid_pre_run_initialize'>pre_run_initialize</span>
2435
+ <span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='ivar'>@parms</span><span class='period'>.</span><span class='id identifier rubyid_max_generations'>max_generations</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_gen_number'>gen_number</span><span class='op'>|</span>
2436
+ <span class='ivar'>@generation_num</span> <span class='op'>=</span> <span class='id identifier rubyid_gen_number'>gen_number</span>
2437
+ <span class='ivar'>@population_history</span> <span class='op'>&lt;&lt;</span> <span class='kw'>unless</span> <span class='ivar'>@population</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2438
+ <span class='ivar'>@population</span>
2439
+ <span class='kw'>else</span>
2440
+ <span class='ivar'>@population</span> <span class='op'>=</span> <span class='ivar'>@population_class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
2441
+ <span class='kw'>end</span>
2442
+ <span class='ivar'>@population_history</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span> <span class='kw'>unless</span> <span class='ivar'>@population_history</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&lt;=</span> <span class='ivar'>@parms</span><span class='period'>.</span><span class='id identifier rubyid_max_population_history'>max_population_history</span>
2443
+ <span class='ivar'>@population</span><span class='period'>.</span><span class='id identifier rubyid_mutate!'>mutate!</span>
2444
+ <span class='ivar'>@population</span><span class='period'>.</span><span class='id identifier rubyid_express!'>express!</span>
2445
+
2446
+ <span class='comment'>## Evaluate population
2447
+ </span> <span class='ivar'>@evaluator</span><span class='period'>.</span><span class='id identifier rubyid_ready_for_evaluation'>ready_for_evaluation</span> <span class='ivar'>@population</span>
2448
+ <span class='lparen'>(</span><span class='ivar'>@parms</span><span class='period'>.</span><span class='id identifier rubyid_start_sequence_at'>start_sequence_at</span> <span class='op'>..</span> <span class='ivar'>@parms</span><span class='period'>.</span><span class='id identifier rubyid_end_sequence_at'>end_sequence_at</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_snum'>snum</span><span class='op'>|</span>
2449
+ <span class='ivar'>@seq_num</span> <span class='op'>=</span> <span class='id identifier rubyid_snum'>snum</span>
2450
+ <span class='ivar'>@population</span><span class='period'>.</span><span class='id identifier rubyid_evaluate!'>evaluate!</span>
2451
+ <span class='kw'>end</span>
2452
+
2453
+ <span class='ivar'>@population</span><span class='period'>.</span><span class='id identifier rubyid_analyze!'>analyze!</span>
2454
+ <span class='ivar'>@population</span><span class='period'>.</span><span class='id identifier rubyid_speciate!'>speciate!</span>
2455
+
2456
+ <span class='gvar'>$log</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span> <span class='ivar'>@population</span><span class='period'>.</span><span class='id identifier rubyid_dump_s'>dump_s</span> <span class='kw'>unless</span> <span class='ivar'>@verbosity</span> <span class='op'>&lt;</span> <span class='int'>3</span>
2457
+
2458
+ <span class='id identifier rubyid_new_pop'>new_pop</span> <span class='op'>=</span> <span class='ivar'>@population</span><span class='period'>.</span><span class='id identifier rubyid_evolve'>evolve</span>
2459
+
2460
+ <span class='comment'>## Report hook for evaluation
2461
+ </span> <span class='ivar'>@report_hook</span><span class='period'>.</span><span class='lparen'>(</span><span class='ivar'>@population</span><span class='period'>.</span><span class='id identifier rubyid_report'>report</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@report_hook</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2462
+
2463
+ <span class='comment'>## Exit if fitness criteria is reached
2464
+ </span> <span class='comment'>#FIXME handle this exit condition better!!!!!
2465
+ </span> <span class='id identifier rubyid_exit'>exit</span> <span class='kw'>if</span> <span class='ivar'>@stop_on_fit_func</span><span class='period'>.</span><span class='lparen'>(</span><span class='ivar'>@population</span><span class='period'>.</span><span class='id identifier rubyid_report'>report</span><span class='lbracket'>[</span><span class='symbol'>:fitness</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@stop_on_fit_func</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2466
+
2467
+ <span class='comment'>## Evolve population
2468
+ </span> <span class='ivar'>@population</span> <span class='op'>=</span> <span class='id identifier rubyid_new_pop'>new_pop</span>
2469
+
2470
+ <span class='comment'>## Finish up this run
2471
+ </span> <span class='ivar'>@end_run_func</span><span class='period'>.</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@end_run_func</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2472
+ <span class='kw'>end</span>
2473
+ <span class='kw'>end</span></pre>
2474
+ </td>
2475
+ </tr>
2476
+ </table>
2477
+ </div>
2478
+
2479
+ </div>
2480
+
2481
+ </div>
2482
+
2483
+ <div id="footer">
2484
+ Generated on Sun Apr 13 15:54:03 2014 by
2485
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2486
+ 0.8.7.4 (ruby-2.1.1).
2487
+ </div>
2488
+
2489
+ </body>
2490
+ </html>