rubyneat 0.3.5.alpha.3 → 0.3.5.alpha.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. checksums.yaml +4 -4
  2. data/.semver +1 -1
  3. data/Gemfile +19 -19
  4. data/Gemfile.lock +39 -33
  5. data/README.md +66 -0
  6. data/Rakefile +19 -2
  7. data/bin/neat +4 -60
  8. data/lib/rubyneat/cli.rb +5 -0
  9. data/lib/rubyneat/cli/generate.rb +131 -0
  10. data/lib/rubyneat/cli/main.rb +54 -0
  11. data/lib/rubyneat/cli/templates/generate/Gemfile.tt +17 -0
  12. data/lib/rubyneat/cli/templates/generate/README.md.tt +1 -0
  13. data/lib/rubyneat/cli/templates/generate/bin/neat.tt +14 -0
  14. data/{neater/xor_neat.rb → lib/rubyneat/cli/templates/generate/neater.tt} +7 -22
  15. data/rubyneat.gemspec +73 -297
  16. data/rubyneat.gemspec.orig +384 -0
  17. metadata +76 -292
  18. data/.idea/.name +0 -1
  19. data/.idea/.rakeTasks +0 -7
  20. data/.idea/dictionaries/trader.xml +0 -3
  21. data/.idea/encodings.xml +0 -5
  22. data/.idea/misc.xml +0 -5
  23. data/.idea/modules.xml +0 -9
  24. data/.idea/rubyneat.iml +0 -198
  25. data/.idea/runConfigurations/invpend_neat.xml +0 -26
  26. data/.idea/runConfigurations/sigdebug_neat.xml +0 -24
  27. data/.idea/runConfigurations/xor_neat.xml +0 -26
  28. data/.idea/runConfigurations/xordebug_neat.xml +0 -24
  29. data/.idea/runConfigurations/xorsin_neat.xml +0 -24
  30. data/.idea/scopes/scope_settings.xml +0 -5
  31. data/.idea/vcs.xml +0 -7
  32. data/.idea/workspace.xml +0 -1151
  33. data/.yardoc/checksums +0 -11
  34. data/.yardoc/object_types +0 -0
  35. data/.yardoc/objects/root.dat +0 -0
  36. data/.yardoc/proxy_types +0 -0
  37. data/Guardfile +0 -8
  38. data/doc/ControllerPoint.html +0 -125
  39. data/doc/CuteA.html +0 -286
  40. data/doc/CuteB.html +0 -297
  41. data/doc/DSL.html +0 -883
  42. data/doc/NEAT.html +0 -588
  43. data/doc/NEAT/BasicNeuronTypes.html +0 -136
  44. data/doc/NEAT/BasicNeuronTypes/BiasNeuron.html +0 -518
  45. data/doc/NEAT/BasicNeuronTypes/CosineNeuron.html +0 -274
  46. data/doc/NEAT/BasicNeuronTypes/InputNeuron.html +0 -366
  47. data/doc/NEAT/BasicNeuronTypes/SigmoidNeuron.html +0 -275
  48. data/doc/NEAT/BasicNeuronTypes/SineNeuron.html +0 -274
  49. data/doc/NEAT/BasicNeuronTypes/TanhNeuron.html +0 -274
  50. data/doc/NEAT/Controller.html +0 -2490
  51. data/doc/NEAT/Controller/NeatSettings.html +0 -3985
  52. data/doc/NEAT/Critter.html +0 -1037
  53. data/doc/NEAT/Critter/Genotype.html +0 -1601
  54. data/doc/NEAT/Critter/Genotype/Gene.html +0 -979
  55. data/doc/NEAT/Critter/Phenotype.html +0 -603
  56. data/doc/NEAT/DSL.html +0 -1255
  57. data/doc/NEAT/Evaluator.html +0 -420
  58. data/doc/NEAT/Evolver.html +0 -602
  59. data/doc/NEAT/Evolver/CritterOp.html +0 -551
  60. data/doc/NEAT/Expressor.html +0 -327
  61. data/doc/NEAT/Graph.html +0 -402
  62. data/doc/NEAT/Graph/DependencyResolver.html +0 -478
  63. data/doc/NEAT/Graph/GraphException.html +0 -123
  64. data/doc/NEAT/NeatException.html +0 -123
  65. data/doc/NEAT/NeatOb.html +0 -567
  66. data/doc/NEAT/Neuron.html +0 -1067
  67. data/doc/NEAT/Operator.html +0 -162
  68. data/doc/NEAT/Population.html +0 -1961
  69. data/doc/NEAT/Trait.html +0 -169
  70. data/doc/_index.html +0 -373
  71. data/doc/class_list.html +0 -54
  72. data/doc/css/common.css +0 -1
  73. data/doc/css/full_list.css +0 -57
  74. data/doc/css/style.css +0 -339
  75. data/doc/file_list.html +0 -53
  76. data/doc/frames.html +0 -26
  77. data/doc/index.html +0 -373
  78. data/doc/js/app.js +0 -219
  79. data/doc/js/full_list.js +0 -178
  80. data/doc/js/jquery.js +0 -4
  81. data/doc/method_list.html +0 -1415
  82. data/doc/top-level-namespace.html +0 -164
  83. data/foo/foo_aquarium_example.rb +0 -38
  84. data/foo/foo_gosu.rb +0 -99
  85. data/foo/foo_rubygoo.rb +0 -104
  86. data/foo/foo_sdl.rb +0 -34
  87. data/foo/icon.png +0 -0
  88. data/neater/invpend_neat.rb +0 -150
  89. data/neater/rnlib/inverted_pendulum.rb +0 -380
  90. data/neater/rnlib/xor.rb +0 -10
  91. data/neater/sigdebug_neat.rb +0 -136
  92. data/neater/xoranalog_neat.rb +0 -138
  93. data/neater/xorsin_neat.rb +0 -143
  94. data/projectFilesBackup/.idea/rubyneat.iml +0 -180
  95. data/public/.directory +0 -4
  96. data/public/background.png +0 -0
  97. data/public/background.xcf +0 -0
  98. data/public/cart.png +0 -0
  99. data/public/cart.xcf +0 -0
  100. data/public/metalpoles_molton_ball_l.jpg +0 -0
  101. data/public/old_background.png +0 -0
  102. data/public/pointer.png +0 -0
  103. data/public/pointer.xcf +0 -0
  104. data/public/pole.kra +0 -0
  105. data/public/pole.png +0 -0
  106. data/public/pole.xcf +0 -0
  107. data/public/wheel-of-year-stone-DD-131-WOYS.jpg +0 -0
  108. data/public/wheel.png +0 -0
  109. data/public/wheel.xcf +0 -0
  110. data/public/wood-planks-texture.jpg +0 -0
  111. data/rdoc/ControllerPoint.html +0 -116
  112. data/rdoc/CuteA.html +0 -177
  113. data/rdoc/CuteB.html +0 -178
  114. data/rdoc/DSLSetup.html +0 -177
  115. data/rdoc/GameTestWindow.html +0 -242
  116. data/rdoc/GameWindow.html +0 -292
  117. data/rdoc/Gemfile.html +0 -215
  118. data/rdoc/Gemfile_lock.html +0 -327
  119. data/rdoc/GraphTest.html +0 -210
  120. data/rdoc/Guardfile.html +0 -198
  121. data/rdoc/InvertedPendulum.html +0 -198
  122. data/rdoc/InvertedPendulum/Cart.html +0 -668
  123. data/rdoc/InvertedPendulum/DSL.html +0 -259
  124. data/rdoc/InvertedPendulum/InvPendWindow.html +0 -402
  125. data/rdoc/Logger.html +0 -98
  126. data/rdoc/NEAT.html +0 -422
  127. data/rdoc/NEAT/BasicNeuronTypes.html +0 -107
  128. data/rdoc/NEAT/BasicNeuronTypes/BiasNeuron.html +0 -265
  129. data/rdoc/NEAT/BasicNeuronTypes/CosineNeuron.html +0 -162
  130. data/rdoc/NEAT/BasicNeuronTypes/InputNeuron.html +0 -206
  131. data/rdoc/NEAT/BasicNeuronTypes/SigmoidNeuron.html +0 -162
  132. data/rdoc/NEAT/BasicNeuronTypes/SineNeuron.html +0 -162
  133. data/rdoc/NEAT/BasicNeuronTypes/TanhNeuron.html +0 -161
  134. data/rdoc/NEAT/Controller.html +0 -729
  135. data/rdoc/NEAT/Controller/NeatSettings.html +0 -880
  136. data/rdoc/NEAT/Critter.html +0 -489
  137. data/rdoc/NEAT/Critter/Genotype.html +0 -735
  138. data/rdoc/NEAT/Critter/Genotype/Gene.html +0 -457
  139. data/rdoc/NEAT/Critter/Phenotype.html +0 -330
  140. data/rdoc/NEAT/DSL.html +0 -729
  141. data/rdoc/NEAT/Evaluator.html +0 -256
  142. data/rdoc/NEAT/Evolver.html +0 -891
  143. data/rdoc/NEAT/Evolver/CritterOp.html +0 -349
  144. data/rdoc/NEAT/Expressor.html +0 -402
  145. data/rdoc/NEAT/Graph.html +0 -263
  146. data/rdoc/NEAT/Graph/DependencyResolver.html +0 -291
  147. data/rdoc/NEAT/Graph/GraphException.html +0 -105
  148. data/rdoc/NEAT/NeatException.html +0 -105
  149. data/rdoc/NEAT/NeatOb.html +0 -325
  150. data/rdoc/NEAT/Neuron.html +0 -481
  151. data/rdoc/NEAT/Operator.html +0 -109
  152. data/rdoc/NEAT/Population.html +0 -935
  153. data/rdoc/NEAT/Trait.html +0 -117
  154. data/rdoc/Object.html +0 -384
  155. data/rdoc/Phi.html +0 -98
  156. data/rdoc/Player.html +0 -383
  157. data/rdoc/Rakefile.html +0 -254
  158. data/rdoc/RubyNEAT.html +0 -98
  159. data/rdoc/RubyNEAT/Application.html +0 -105
  160. data/rdoc/SDL.html +0 -98
  161. data/rdoc/SDL/Event2.html +0 -98
  162. data/rdoc/Vector.html +0 -195
  163. data/rdoc/created.rid +0 -125
  164. data/rdoc/doc/ControllerPoint_html.html +0 -299
  165. data/rdoc/doc/CuteA_html.html +0 -438
  166. data/rdoc/doc/CuteB_html.html +0 -436
  167. data/rdoc/doc/DSL_html.html +0 -992
  168. data/rdoc/doc/NEAT/BasicNeuronTypes/BiasNeuron_html.html +0 -617
  169. data/rdoc/doc/NEAT/BasicNeuronTypes/CosineNeuron_html.html +0 -413
  170. data/rdoc/doc/NEAT/BasicNeuronTypes/InputNeuron_html.html +0 -498
  171. data/rdoc/doc/NEAT/BasicNeuronTypes/SigmoidNeuron_html.html +0 -413
  172. data/rdoc/doc/NEAT/BasicNeuronTypes/SineNeuron_html.html +0 -413
  173. data/rdoc/doc/NEAT/BasicNeuronTypes/TanhNeuron_html.html +0 -412
  174. data/rdoc/doc/NEAT/BasicNeuronTypes_html.html +0 -310
  175. data/rdoc/doc/NEAT/Controller/NeatSettings_html.html +0 -3324
  176. data/rdoc/doc/NEAT/Controller_html.html +0 -2212
  177. data/rdoc/doc/NEAT/Critter/Genotype/Gene_html.html +0 -997
  178. data/rdoc/doc/NEAT/Critter/Genotype_html.html +0 -1556
  179. data/rdoc/doc/NEAT/Critter/Phenotype_html.html +0 -687
  180. data/rdoc/doc/NEAT/Critter_html.html +0 -1037
  181. data/rdoc/doc/NEAT/DSL_html.html +0 -1349
  182. data/rdoc/doc/NEAT/Evaluator_html.html +0 -556
  183. data/rdoc/doc/NEAT/Evolver/CritterOp_html.html +0 -690
  184. data/rdoc/doc/NEAT/Evolver_html.html +0 -677
  185. data/rdoc/doc/NEAT/Expressor_html.html +0 -468
  186. data/rdoc/doc/NEAT/Graph/DependencyResolver_html.html +0 -598
  187. data/rdoc/doc/NEAT/Graph/GraphException_html.html +0 -299
  188. data/rdoc/doc/NEAT/Graph_html.html +0 -527
  189. data/rdoc/doc/NEAT/NeatException_html.html +0 -299
  190. data/rdoc/doc/NEAT/NeatOb_html.html +0 -671
  191. data/rdoc/doc/NEAT/Neuron_html.html +0 -1095
  192. data/rdoc/doc/NEAT/Operator_html.html +0 -337
  193. data/rdoc/doc/NEAT/Population_html.html +0 -1795
  194. data/rdoc/doc/NEAT/Trait_html.html +0 -344
  195. data/rdoc/doc/NEAT_html.html +0 -736
  196. data/rdoc/doc/_index_html.html +0 -559
  197. data/rdoc/doc/class_list_html.html +0 -369
  198. data/rdoc/doc/css/common_css.html +0 -188
  199. data/rdoc/doc/css/full_list_css.html +0 -243
  200. data/rdoc/doc/css/style_css.html +0 -530
  201. data/rdoc/doc/file_list_html.html +0 -240
  202. data/rdoc/doc/frames_html.html +0 -217
  203. data/rdoc/doc/index_html.html +0 -559
  204. data/rdoc/doc/js/app_js.html +0 -423
  205. data/rdoc/doc/js/full_list_js.html +0 -372
  206. data/rdoc/doc/js/jquery_js.html +0 -1536
  207. data/rdoc/doc/method_list_html.html +0 -1375
  208. data/rdoc/doc/top-level-namespace_html.html +0 -317
  209. data/rdoc/fonts.css +0 -167
  210. data/rdoc/fonts/Lato-Light.ttf +0 -0
  211. data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
  212. data/rdoc/fonts/Lato-Regular.ttf +0 -0
  213. data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
  214. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  215. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  216. data/rdoc/images/add.png +0 -0
  217. data/rdoc/images/arrow_up.png +0 -0
  218. data/rdoc/images/brick.png +0 -0
  219. data/rdoc/images/brick_link.png +0 -0
  220. data/rdoc/images/bug.png +0 -0
  221. data/rdoc/images/bullet_black.png +0 -0
  222. data/rdoc/images/bullet_toggle_minus.png +0 -0
  223. data/rdoc/images/bullet_toggle_plus.png +0 -0
  224. data/rdoc/images/date.png +0 -0
  225. data/rdoc/images/delete.png +0 -0
  226. data/rdoc/images/find.png +0 -0
  227. data/rdoc/images/loadingAnimation.gif +0 -0
  228. data/rdoc/images/macFFBgHack.png +0 -0
  229. data/rdoc/images/package.png +0 -0
  230. data/rdoc/images/page_green.png +0 -0
  231. data/rdoc/images/page_white_text.png +0 -0
  232. data/rdoc/images/page_white_width.png +0 -0
  233. data/rdoc/images/plugin.png +0 -0
  234. data/rdoc/images/ruby.png +0 -0
  235. data/rdoc/images/tag_blue.png +0 -0
  236. data/rdoc/images/tag_green.png +0 -0
  237. data/rdoc/images/transparent.png +0 -0
  238. data/rdoc/images/wrench.png +0 -0
  239. data/rdoc/images/wrench_orange.png +0 -0
  240. data/rdoc/images/zoom.png +0 -0
  241. data/rdoc/index.html +0 -282
  242. data/rdoc/js/darkfish.js +0 -140
  243. data/rdoc/js/jquery.js +0 -18
  244. data/rdoc/js/navigation.js +0 -142
  245. data/rdoc/js/search.js +0 -109
  246. data/rdoc/js/search_index.js +0 -1
  247. data/rdoc/js/searcher.js +0 -228
  248. data/rdoc/rdoc.css +0 -580
  249. data/rdoc/rubyneat_gemspec.html +0 -387
  250. data/rdoc/table_of_contents.html +0 -2502
  251. data/rdoc/xordebug_log.html +0 -170598
  252. data/rdoc/xorsin_log.html +0 -22569
@@ -1,274 +0,0 @@
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::BasicNeuronTypes::TanhNeuron
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/BasicNeuronTypes/TanhNeuron.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 (T)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../../NEAT.html" title="NEAT (module)">NEAT</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../BasicNeuronTypes.html" title="NEAT::BasicNeuronTypes (module)">BasicNeuronTypes</a></span></span>
36
- &raquo;
37
- <span class="title">TanhNeuron</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::BasicNeuronTypes::TanhNeuron
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="../Neuron.html" title="NEAT::Neuron (class)">Neuron</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"><span class='object_link'><a href="../Neuron.html" title="NEAT::Neuron (class)">Neuron</a></span></li>
84
-
85
- <li class="next">NEAT::BasicNeuronTypes::TanhNeuron</li>
86
-
87
- </ul>
88
- <a href="#" class="inheritanceTree">show all</a>
89
-
90
- </dd>
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <dt class="r2 last">Defined in:</dt>
101
- <dd class="r2 last">lib/rubyneat/neuron.rb</dd>
102
-
103
- </dl>
104
- <div class="clear"></div>
105
-
106
- <h2>Overview</h2><div class="docstring">
107
- <div class="discussion">
108
-
109
- <p>An alternative Sigmoid Function, but ranges -1 to +1</p>
110
-
111
-
112
- </div>
113
- </div>
114
- <div class="tags">
115
-
116
-
117
- </div>
118
-
119
-
120
-
121
-
122
-
123
- <h2>Instance Attribute Summary</h2>
124
-
125
- <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../Neuron.html" title="NEAT::Neuron (class)">Neuron</a></span></h3>
126
- <p class="inherited"><span class='object_link'><a href="../Neuron.html#genotype-instance_method" title="NEAT::Neuron#genotype (method)">#genotype</a></span>, <span class='object_link'><a href="../Neuron.html#heirarchy_number-instance_method" title="NEAT::Neuron#heirarchy_number (method)">#heirarchy_number</a></span>, <span class='object_link'><a href="../Neuron.html#output-instance_method" title="NEAT::Neuron#output (method)">#output</a></span>, <span class='object_link'><a href="../Neuron.html#trait-instance_method" title="NEAT::Neuron#trait (method)">#trait</a></span></p>
127
-
128
-
129
-
130
- <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../NeatOb.html" title="NEAT::NeatOb (class)">NeatOb</a></span></h3>
131
- <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>
132
-
133
-
134
-
135
- <h2>
136
- Instance Method Summary
137
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
138
- </h2>
139
-
140
- <ul class="summary">
141
-
142
- <li class="public ">
143
- <span class="summary_signature">
144
-
145
- <a href="#express-instance_method" title="#express (instance method)">- (Object) <strong>express</strong>(instance) </a>
146
-
147
-
148
-
149
- </span>
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
- <span class="summary_desc"><div class='inline'>
160
- <p>create a function on the instance with our name that sums all inputs and
161
- produce a sigmoid output (using tanh).</p>
162
- </div></span>
163
-
164
- </li>
165
-
166
-
167
- </ul>
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Neuron.html" title="NEAT::Neuron (class)">Neuron</a></span></h3>
180
- <p class="inherited"><span class='object_link'><a href="../Neuron.html#bias%3F-instance_method" title="NEAT::Neuron#bias? (method)">#bias?</a></span>, <span class='object_link'><a href="../Neuron.html#bias%3F-class_method" title="NEAT::Neuron.bias? (method)">bias?</a></span>, <span class='object_link'><a href="../Neuron.html#inherited-class_method" title="NEAT::Neuron.inherited (method)">inherited</a></span>, <span class='object_link'><a href="../Neuron.html#input%3F-class_method" title="NEAT::Neuron.input? (method)">input?</a></span>, <span class='object_link'><a href="../Neuron.html#input%3F-instance_method" title="NEAT::Neuron#input? (method)">#input?</a></span>, <span class='object_link'><a href="../Neuron.html#neuron_types-class_method" title="NEAT::Neuron.neuron_types (method)">neuron_types</a></span>, <span class='object_link'><a href="../Neuron.html#output%3F-instance_method" title="NEAT::Neuron#output? (method)">#output?</a></span></p>
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
- <h3 class="inherited">Methods included from <span class='object_link'><a href="../Graph.html" title="NEAT::Graph (module)">Graph</a></span></h3>
191
- <p class="inherited"><span class='object_link'><a href="../Graph.html#%3C%3C-instance_method" title="NEAT::Graph#&lt;&lt; (method)">#<<</a></span>, <span class='object_link'><a href="../Graph.html#add-instance_method" title="NEAT::Graph#add (method)">#add</a></span>, <span class='object_link'><a href="../Graph.html#clear_graph-instance_method" title="NEAT::Graph#clear_graph (method)">#clear_graph</a></span>, <span class='object_link'><a href="../Graph.html#inputs-instance_method" title="NEAT::Graph#inputs (method)">#inputs</a></span></p>
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../NeatOb.html" title="NEAT::NeatOb (class)">NeatOb</a></span></h3>
203
- <p class="inherited"><span class='object_link'><a href="../NeatOb.html#initialize-instance_method" title="NEAT::NeatOb#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../NeatOb.html#log-instance_method" title="NEAT::NeatOb#log (method)">#log</a></span>, <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>
204
-
205
- <div id="constructor_details" class="method_details_list">
206
- <h2>Constructor Details</h2>
207
-
208
- <p class="notice">This class inherits a constructor from <span class='object_link'><a href="../NeatOb.html#initialize-instance_method" title="NEAT::NeatOb#initialize (method)">NEAT::NeatOb</a></span></p>
209
-
210
- </div>
211
-
212
-
213
- <div id="instance_method_details" class="method_details_list">
214
- <h2>Instance Method Details</h2>
215
-
216
-
217
- <div class="method_details first">
218
- <h3 class="signature first" id="express-instance_method">
219
-
220
- - (<tt>Object</tt>) <strong>express</strong>(instance)
221
-
222
-
223
-
224
-
225
-
226
- </h3><div class="docstring">
227
- <div class="discussion">
228
-
229
- <p>create a function on the instance with our name that sums all inputs and
230
- produce a sigmoid output (using tanh)</p>
231
-
232
-
233
- </div>
234
- </div>
235
- <div class="tags">
236
-
237
-
238
- </div><table class="source_code">
239
- <tr>
240
- <td>
241
- <pre class="lines">
242
-
243
-
244
- 122
245
- 123
246
- 124
247
- 125
248
- 126</pre>
249
- </td>
250
- <td>
251
- <pre class="code"><span class="info file"># File 'lib/rubyneat/neuron.rb', line 122</span>
252
-
253
- <span class='kw'>def</span> <span class='id identifier rubyid_express'>express</span><span class='lparen'>(</span><span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span>
254
- <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_define_singleton_method'>define_singleton_method</span><span class='lparen'>(</span><span class='ivar'>@name</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='op'>*</span><span class='id identifier rubyid_inputs'>inputs</span><span class='op'>|</span>
255
- <span class='id identifier rubyid_tanh'>tanh</span><span class='lparen'>(</span><span class='float'>2.4</span> <span class='op'>*</span> <span class='id identifier rubyid_inputs'>inputs</span><span class='period'>.</span><span class='id identifier rubyid_reduce'>reduce</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='comma'>,</span> <span class='id identifier rubyid_q'>q</span><span class='op'>|</span> <span class='id identifier rubyid_p'>p</span> <span class='op'>+</span> <span class='id identifier rubyid_q'>q</span><span class='rbrace'>}</span><span class='rparen'>)</span>
256
- <span class='rbrace'>}</span>
257
- <span class='kw'>end</span></pre>
258
- </td>
259
- </tr>
260
- </table>
261
- </div>
262
-
263
- </div>
264
-
265
- </div>
266
-
267
- <div id="footer">
268
- Generated on Sun Apr 13 15:54:02 2014 by
269
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
270
- 0.8.7.4 (ruby-2.1.1).
271
- </div>
272
-
273
- </body>
274
- </html>
@@ -1,2490 +0,0 @@
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>