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.
- checksums.yaml +4 -4
- data/.semver +1 -1
- data/Gemfile +19 -19
- data/Gemfile.lock +39 -33
- data/README.md +66 -0
- data/Rakefile +19 -2
- data/bin/neat +4 -60
- data/lib/rubyneat/cli.rb +5 -0
- data/lib/rubyneat/cli/generate.rb +131 -0
- data/lib/rubyneat/cli/main.rb +54 -0
- data/lib/rubyneat/cli/templates/generate/Gemfile.tt +17 -0
- data/lib/rubyneat/cli/templates/generate/README.md.tt +1 -0
- data/lib/rubyneat/cli/templates/generate/bin/neat.tt +14 -0
- data/{neater/xor_neat.rb → lib/rubyneat/cli/templates/generate/neater.tt} +7 -22
- data/rubyneat.gemspec +73 -297
- data/rubyneat.gemspec.orig +384 -0
- metadata +76 -292
- data/.idea/.name +0 -1
- data/.idea/.rakeTasks +0 -7
- data/.idea/dictionaries/trader.xml +0 -3
- data/.idea/encodings.xml +0 -5
- data/.idea/misc.xml +0 -5
- data/.idea/modules.xml +0 -9
- data/.idea/rubyneat.iml +0 -198
- data/.idea/runConfigurations/invpend_neat.xml +0 -26
- data/.idea/runConfigurations/sigdebug_neat.xml +0 -24
- data/.idea/runConfigurations/xor_neat.xml +0 -26
- data/.idea/runConfigurations/xordebug_neat.xml +0 -24
- data/.idea/runConfigurations/xorsin_neat.xml +0 -24
- data/.idea/scopes/scope_settings.xml +0 -5
- data/.idea/vcs.xml +0 -7
- data/.idea/workspace.xml +0 -1151
- data/.yardoc/checksums +0 -11
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/Guardfile +0 -8
- data/doc/ControllerPoint.html +0 -125
- data/doc/CuteA.html +0 -286
- data/doc/CuteB.html +0 -297
- data/doc/DSL.html +0 -883
- data/doc/NEAT.html +0 -588
- data/doc/NEAT/BasicNeuronTypes.html +0 -136
- data/doc/NEAT/BasicNeuronTypes/BiasNeuron.html +0 -518
- data/doc/NEAT/BasicNeuronTypes/CosineNeuron.html +0 -274
- data/doc/NEAT/BasicNeuronTypes/InputNeuron.html +0 -366
- data/doc/NEAT/BasicNeuronTypes/SigmoidNeuron.html +0 -275
- data/doc/NEAT/BasicNeuronTypes/SineNeuron.html +0 -274
- data/doc/NEAT/BasicNeuronTypes/TanhNeuron.html +0 -274
- data/doc/NEAT/Controller.html +0 -2490
- data/doc/NEAT/Controller/NeatSettings.html +0 -3985
- data/doc/NEAT/Critter.html +0 -1037
- data/doc/NEAT/Critter/Genotype.html +0 -1601
- data/doc/NEAT/Critter/Genotype/Gene.html +0 -979
- data/doc/NEAT/Critter/Phenotype.html +0 -603
- data/doc/NEAT/DSL.html +0 -1255
- data/doc/NEAT/Evaluator.html +0 -420
- data/doc/NEAT/Evolver.html +0 -602
- data/doc/NEAT/Evolver/CritterOp.html +0 -551
- data/doc/NEAT/Expressor.html +0 -327
- data/doc/NEAT/Graph.html +0 -402
- data/doc/NEAT/Graph/DependencyResolver.html +0 -478
- data/doc/NEAT/Graph/GraphException.html +0 -123
- data/doc/NEAT/NeatException.html +0 -123
- data/doc/NEAT/NeatOb.html +0 -567
- data/doc/NEAT/Neuron.html +0 -1067
- data/doc/NEAT/Operator.html +0 -162
- data/doc/NEAT/Population.html +0 -1961
- data/doc/NEAT/Trait.html +0 -169
- data/doc/_index.html +0 -373
- data/doc/class_list.html +0 -54
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -57
- data/doc/css/style.css +0 -339
- data/doc/file_list.html +0 -53
- data/doc/frames.html +0 -26
- data/doc/index.html +0 -373
- data/doc/js/app.js +0 -219
- data/doc/js/full_list.js +0 -178
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -1415
- data/doc/top-level-namespace.html +0 -164
- data/foo/foo_aquarium_example.rb +0 -38
- data/foo/foo_gosu.rb +0 -99
- data/foo/foo_rubygoo.rb +0 -104
- data/foo/foo_sdl.rb +0 -34
- data/foo/icon.png +0 -0
- data/neater/invpend_neat.rb +0 -150
- data/neater/rnlib/inverted_pendulum.rb +0 -380
- data/neater/rnlib/xor.rb +0 -10
- data/neater/sigdebug_neat.rb +0 -136
- data/neater/xoranalog_neat.rb +0 -138
- data/neater/xorsin_neat.rb +0 -143
- data/projectFilesBackup/.idea/rubyneat.iml +0 -180
- data/public/.directory +0 -4
- data/public/background.png +0 -0
- data/public/background.xcf +0 -0
- data/public/cart.png +0 -0
- data/public/cart.xcf +0 -0
- data/public/metalpoles_molton_ball_l.jpg +0 -0
- data/public/old_background.png +0 -0
- data/public/pointer.png +0 -0
- data/public/pointer.xcf +0 -0
- data/public/pole.kra +0 -0
- data/public/pole.png +0 -0
- data/public/pole.xcf +0 -0
- data/public/wheel-of-year-stone-DD-131-WOYS.jpg +0 -0
- data/public/wheel.png +0 -0
- data/public/wheel.xcf +0 -0
- data/public/wood-planks-texture.jpg +0 -0
- data/rdoc/ControllerPoint.html +0 -116
- data/rdoc/CuteA.html +0 -177
- data/rdoc/CuteB.html +0 -178
- data/rdoc/DSLSetup.html +0 -177
- data/rdoc/GameTestWindow.html +0 -242
- data/rdoc/GameWindow.html +0 -292
- data/rdoc/Gemfile.html +0 -215
- data/rdoc/Gemfile_lock.html +0 -327
- data/rdoc/GraphTest.html +0 -210
- data/rdoc/Guardfile.html +0 -198
- data/rdoc/InvertedPendulum.html +0 -198
- data/rdoc/InvertedPendulum/Cart.html +0 -668
- data/rdoc/InvertedPendulum/DSL.html +0 -259
- data/rdoc/InvertedPendulum/InvPendWindow.html +0 -402
- data/rdoc/Logger.html +0 -98
- data/rdoc/NEAT.html +0 -422
- data/rdoc/NEAT/BasicNeuronTypes.html +0 -107
- data/rdoc/NEAT/BasicNeuronTypes/BiasNeuron.html +0 -265
- data/rdoc/NEAT/BasicNeuronTypes/CosineNeuron.html +0 -162
- data/rdoc/NEAT/BasicNeuronTypes/InputNeuron.html +0 -206
- data/rdoc/NEAT/BasicNeuronTypes/SigmoidNeuron.html +0 -162
- data/rdoc/NEAT/BasicNeuronTypes/SineNeuron.html +0 -162
- data/rdoc/NEAT/BasicNeuronTypes/TanhNeuron.html +0 -161
- data/rdoc/NEAT/Controller.html +0 -729
- data/rdoc/NEAT/Controller/NeatSettings.html +0 -880
- data/rdoc/NEAT/Critter.html +0 -489
- data/rdoc/NEAT/Critter/Genotype.html +0 -735
- data/rdoc/NEAT/Critter/Genotype/Gene.html +0 -457
- data/rdoc/NEAT/Critter/Phenotype.html +0 -330
- data/rdoc/NEAT/DSL.html +0 -729
- data/rdoc/NEAT/Evaluator.html +0 -256
- data/rdoc/NEAT/Evolver.html +0 -891
- data/rdoc/NEAT/Evolver/CritterOp.html +0 -349
- data/rdoc/NEAT/Expressor.html +0 -402
- data/rdoc/NEAT/Graph.html +0 -263
- data/rdoc/NEAT/Graph/DependencyResolver.html +0 -291
- data/rdoc/NEAT/Graph/GraphException.html +0 -105
- data/rdoc/NEAT/NeatException.html +0 -105
- data/rdoc/NEAT/NeatOb.html +0 -325
- data/rdoc/NEAT/Neuron.html +0 -481
- data/rdoc/NEAT/Operator.html +0 -109
- data/rdoc/NEAT/Population.html +0 -935
- data/rdoc/NEAT/Trait.html +0 -117
- data/rdoc/Object.html +0 -384
- data/rdoc/Phi.html +0 -98
- data/rdoc/Player.html +0 -383
- data/rdoc/Rakefile.html +0 -254
- data/rdoc/RubyNEAT.html +0 -98
- data/rdoc/RubyNEAT/Application.html +0 -105
- data/rdoc/SDL.html +0 -98
- data/rdoc/SDL/Event2.html +0 -98
- data/rdoc/Vector.html +0 -195
- data/rdoc/created.rid +0 -125
- data/rdoc/doc/ControllerPoint_html.html +0 -299
- data/rdoc/doc/CuteA_html.html +0 -438
- data/rdoc/doc/CuteB_html.html +0 -436
- data/rdoc/doc/DSL_html.html +0 -992
- data/rdoc/doc/NEAT/BasicNeuronTypes/BiasNeuron_html.html +0 -617
- data/rdoc/doc/NEAT/BasicNeuronTypes/CosineNeuron_html.html +0 -413
- data/rdoc/doc/NEAT/BasicNeuronTypes/InputNeuron_html.html +0 -498
- data/rdoc/doc/NEAT/BasicNeuronTypes/SigmoidNeuron_html.html +0 -413
- data/rdoc/doc/NEAT/BasicNeuronTypes/SineNeuron_html.html +0 -413
- data/rdoc/doc/NEAT/BasicNeuronTypes/TanhNeuron_html.html +0 -412
- data/rdoc/doc/NEAT/BasicNeuronTypes_html.html +0 -310
- data/rdoc/doc/NEAT/Controller/NeatSettings_html.html +0 -3324
- data/rdoc/doc/NEAT/Controller_html.html +0 -2212
- data/rdoc/doc/NEAT/Critter/Genotype/Gene_html.html +0 -997
- data/rdoc/doc/NEAT/Critter/Genotype_html.html +0 -1556
- data/rdoc/doc/NEAT/Critter/Phenotype_html.html +0 -687
- data/rdoc/doc/NEAT/Critter_html.html +0 -1037
- data/rdoc/doc/NEAT/DSL_html.html +0 -1349
- data/rdoc/doc/NEAT/Evaluator_html.html +0 -556
- data/rdoc/doc/NEAT/Evolver/CritterOp_html.html +0 -690
- data/rdoc/doc/NEAT/Evolver_html.html +0 -677
- data/rdoc/doc/NEAT/Expressor_html.html +0 -468
- data/rdoc/doc/NEAT/Graph/DependencyResolver_html.html +0 -598
- data/rdoc/doc/NEAT/Graph/GraphException_html.html +0 -299
- data/rdoc/doc/NEAT/Graph_html.html +0 -527
- data/rdoc/doc/NEAT/NeatException_html.html +0 -299
- data/rdoc/doc/NEAT/NeatOb_html.html +0 -671
- data/rdoc/doc/NEAT/Neuron_html.html +0 -1095
- data/rdoc/doc/NEAT/Operator_html.html +0 -337
- data/rdoc/doc/NEAT/Population_html.html +0 -1795
- data/rdoc/doc/NEAT/Trait_html.html +0 -344
- data/rdoc/doc/NEAT_html.html +0 -736
- data/rdoc/doc/_index_html.html +0 -559
- data/rdoc/doc/class_list_html.html +0 -369
- data/rdoc/doc/css/common_css.html +0 -188
- data/rdoc/doc/css/full_list_css.html +0 -243
- data/rdoc/doc/css/style_css.html +0 -530
- data/rdoc/doc/file_list_html.html +0 -240
- data/rdoc/doc/frames_html.html +0 -217
- data/rdoc/doc/index_html.html +0 -559
- data/rdoc/doc/js/app_js.html +0 -423
- data/rdoc/doc/js/full_list_js.html +0 -372
- data/rdoc/doc/js/jquery_js.html +0 -1536
- data/rdoc/doc/method_list_html.html +0 -1375
- data/rdoc/doc/top-level-namespace_html.html +0 -317
- data/rdoc/fonts.css +0 -167
- data/rdoc/fonts/Lato-Light.ttf +0 -0
- data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
- data/rdoc/fonts/Lato-Regular.ttf +0 -0
- data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/rdoc/images/add.png +0 -0
- data/rdoc/images/arrow_up.png +0 -0
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/delete.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_blue.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/transparent.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/index.html +0 -282
- data/rdoc/js/darkfish.js +0 -140
- data/rdoc/js/jquery.js +0 -18
- data/rdoc/js/navigation.js +0 -142
- data/rdoc/js/search.js +0 -109
- data/rdoc/js/search_index.js +0 -1
- data/rdoc/js/searcher.js +0 -228
- data/rdoc/rdoc.css +0 -580
- data/rdoc/rubyneat_gemspec.html +0 -387
- data/rdoc/table_of_contents.html +0 -2502
- data/rdoc/xordebug_log.html +0 -170598
- data/rdoc/xorsin_log.html +0 -22569
data/rdoc/doc/NEAT/DSL_html.html
DELETED
@@ -1,1349 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>DSL.html - rubyneat 0.3.4</title>
|
8
|
-
|
9
|
-
<link href="../../fonts.css" rel="stylesheet">
|
10
|
-
<link href="../../rdoc.css" rel="stylesheet">
|
11
|
-
|
12
|
-
<script type="text/javascript">
|
13
|
-
var rdoc_rel_prefix = "../../";
|
14
|
-
</script>
|
15
|
-
|
16
|
-
<script src="../../js/jquery.js"></script>
|
17
|
-
<script src="../../js/navigation.js"></script>
|
18
|
-
<script src="../../js/search_index.js"></script>
|
19
|
-
<script src="../../js/search.js"></script>
|
20
|
-
<script src="../../js/searcher.js"></script>
|
21
|
-
<script src="../../js/darkfish.js"></script>
|
22
|
-
|
23
|
-
|
24
|
-
<body id="top" role="document" class="file">
|
25
|
-
<nav role="navigation">
|
26
|
-
<div id="project-navigation">
|
27
|
-
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
-
<h2>
|
29
|
-
<a href="../../index.html" rel="home">Home</a>
|
30
|
-
</h2>
|
31
|
-
|
32
|
-
<div id="table-of-contents-navigation">
|
33
|
-
<a href="../../table_of_contents.html#pages">Pages</a>
|
34
|
-
<a href="../../table_of_contents.html#classes">Classes</a>
|
35
|
-
<a href="../../table_of_contents.html#methods">Methods</a>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
|
39
|
-
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
-
<form action="#" method="get" accept-charset="utf-8">
|
41
|
-
<div id="search-field-wrapper">
|
42
|
-
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
-
aria-autocomplete="list" aria-controls="search-results"
|
44
|
-
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
-
</div>
|
47
|
-
|
48
|
-
<ul id="search-results" aria-label="Search Results"
|
49
|
-
aria-busy="false" aria-expanded="false"
|
50
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
-
</form>
|
52
|
-
</div>
|
53
|
-
|
54
|
-
</div>
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
<div id="project-metadata">
|
59
|
-
<div id="fileindex-section" class="nav-section">
|
60
|
-
<h3>Pages</h3>
|
61
|
-
|
62
|
-
<ul class="link-list">
|
63
|
-
|
64
|
-
<li><a href="../../Gemfile.html">Gemfile</a>
|
65
|
-
|
66
|
-
<li><a href="../../Gemfile_lock.html">Gemfile.lock</a>
|
67
|
-
|
68
|
-
<li><a href="../../Guardfile.html">Guardfile</a>
|
69
|
-
|
70
|
-
<li><a href="../../Rakefile.html">Rakefile</a>
|
71
|
-
|
72
|
-
<li><a href="../../doc/ControllerPoint_html.html">ControllerPoint.html</a>
|
73
|
-
|
74
|
-
<li><a href="../../doc/CuteA_html.html">CuteA.html</a>
|
75
|
-
|
76
|
-
<li><a href="../../doc/CuteB_html.html">CuteB.html</a>
|
77
|
-
|
78
|
-
<li><a href="../../doc/DSL_html.html">DSL.html</a>
|
79
|
-
|
80
|
-
<li><a href="../../doc/NEAT_html.html">NEAT.html</a>
|
81
|
-
|
82
|
-
<li><a href="../../doc/NEAT/BasicNeuronTypes_html.html">BasicNeuronTypes.html</a>
|
83
|
-
|
84
|
-
<li><a href="../../doc/NEAT/BasicNeuronTypes/BiasNeuron_html.html">BiasNeuron.html</a>
|
85
|
-
|
86
|
-
<li><a href="../../doc/NEAT/BasicNeuronTypes/CosineNeuron_html.html">CosineNeuron.html</a>
|
87
|
-
|
88
|
-
<li><a href="../../doc/NEAT/BasicNeuronTypes/InputNeuron_html.html">InputNeuron.html</a>
|
89
|
-
|
90
|
-
<li><a href="../../doc/NEAT/BasicNeuronTypes/SigmoidNeuron_html.html">SigmoidNeuron.html</a>
|
91
|
-
|
92
|
-
<li><a href="../../doc/NEAT/BasicNeuronTypes/SineNeuron_html.html">SineNeuron.html</a>
|
93
|
-
|
94
|
-
<li><a href="../../doc/NEAT/BasicNeuronTypes/TanhNeuron_html.html">TanhNeuron.html</a>
|
95
|
-
|
96
|
-
<li><a href="../../doc/NEAT/Controller_html.html">Controller.html</a>
|
97
|
-
|
98
|
-
<li><a href="../../doc/NEAT/Controller/NeatSettings_html.html">NeatSettings.html</a>
|
99
|
-
|
100
|
-
<li><a href="../../doc/NEAT/Critter_html.html">Critter.html</a>
|
101
|
-
|
102
|
-
<li><a href="../../doc/NEAT/Critter/Genotype_html.html">Genotype.html</a>
|
103
|
-
|
104
|
-
<li><a href="../../doc/NEAT/Critter/Genotype/Gene_html.html">Gene.html</a>
|
105
|
-
|
106
|
-
<li><a href="../../doc/NEAT/Critter/Phenotype_html.html">Phenotype.html</a>
|
107
|
-
|
108
|
-
<li><a href="../../doc/NEAT/DSL_html.html">DSL.html</a>
|
109
|
-
|
110
|
-
<li><a href="../../doc/NEAT/Evaluator_html.html">Evaluator.html</a>
|
111
|
-
|
112
|
-
<li><a href="../../doc/NEAT/Evolver_html.html">Evolver.html</a>
|
113
|
-
|
114
|
-
<li><a href="../../doc/NEAT/Evolver/CritterOp_html.html">CritterOp.html</a>
|
115
|
-
|
116
|
-
<li><a href="../../doc/NEAT/Expressor_html.html">Expressor.html</a>
|
117
|
-
|
118
|
-
<li><a href="../../doc/NEAT/Graph_html.html">Graph.html</a>
|
119
|
-
|
120
|
-
<li><a href="../../doc/NEAT/Graph/DependencyResolver_html.html">DependencyResolver.html</a>
|
121
|
-
|
122
|
-
<li><a href="../../doc/NEAT/Graph/GraphException_html.html">GraphException.html</a>
|
123
|
-
|
124
|
-
<li><a href="../../doc/NEAT/NeatException_html.html">NeatException.html</a>
|
125
|
-
|
126
|
-
<li><a href="../../doc/NEAT/NeatOb_html.html">NeatOb.html</a>
|
127
|
-
|
128
|
-
<li><a href="../../doc/NEAT/Neuron_html.html">Neuron.html</a>
|
129
|
-
|
130
|
-
<li><a href="../../doc/NEAT/Operator_html.html">Operator.html</a>
|
131
|
-
|
132
|
-
<li><a href="../../doc/NEAT/Population_html.html">Population.html</a>
|
133
|
-
|
134
|
-
<li><a href="../../doc/NEAT/Trait_html.html">Trait.html</a>
|
135
|
-
|
136
|
-
<li><a href="../../doc/_index_html.html">_index.html</a>
|
137
|
-
|
138
|
-
<li><a href="../../doc/class_list_html.html">class_list.html</a>
|
139
|
-
|
140
|
-
<li><a href="../../doc/css/common_css.html">common.css</a>
|
141
|
-
|
142
|
-
<li><a href="../../doc/css/full_list_css.html">full_list.css</a>
|
143
|
-
|
144
|
-
<li><a href="../../doc/css/style_css.html">style.css</a>
|
145
|
-
|
146
|
-
<li><a href="../../doc/file_list_html.html">file_list.html</a>
|
147
|
-
|
148
|
-
<li><a href="../../doc/frames_html.html">frames.html</a>
|
149
|
-
|
150
|
-
<li><a href="../../doc/index_html.html">index.html</a>
|
151
|
-
|
152
|
-
<li><a href="../../doc/js/app_js.html">app.js</a>
|
153
|
-
|
154
|
-
<li><a href="../../doc/js/full_list_js.html">full_list.js</a>
|
155
|
-
|
156
|
-
<li><a href="../../doc/js/jquery_js.html">jquery.js</a>
|
157
|
-
|
158
|
-
<li><a href="../../doc/method_list_html.html">method_list.html</a>
|
159
|
-
|
160
|
-
<li><a href="../../doc/top-level-namespace_html.html">top-level-namespace.html</a>
|
161
|
-
|
162
|
-
<li><a href="../../foo_dump_log.html">foo.dump.log</a>
|
163
|
-
|
164
|
-
<li><a href="../../rubyneat_gemspec.html">rubyneat.gemspec</a>
|
165
|
-
|
166
|
-
<li><a href="../../xordebug_log.html">xordebug.log</a>
|
167
|
-
|
168
|
-
<li><a href="../../xorsin_log.html">xorsin.log</a>
|
169
|
-
|
170
|
-
</ul>
|
171
|
-
</div>
|
172
|
-
|
173
|
-
</div>
|
174
|
-
</nav>
|
175
|
-
|
176
|
-
<main role="main" aria-label="Page doc/NEAT/DSL.html">
|
177
|
-
|
178
|
-
<p><!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”</p>
|
179
|
-
|
180
|
-
<pre>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></pre>
|
181
|
-
|
182
|
-
<p><html xmlns=“<a
|
183
|
-
href="http://www.w3.org/1999/xhtml">www.w3.org/1999/xhtml</a>”
|
184
|
-
xml:lang=“en” lang=“en”></p>
|
185
|
-
|
186
|
-
<pre><head>
|
187
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></pre>
|
188
|
-
|
189
|
-
<p><title></p>
|
190
|
-
|
191
|
-
<pre>Module: NEAT::DSL
|
192
|
-
|
193
|
-
&mdash; Documentation by YARD 0.8.7.3</pre>
|
194
|
-
|
195
|
-
<p></title></p>
|
196
|
-
|
197
|
-
<pre><link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
198
|
-
|
199
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" /></pre>
|
200
|
-
|
201
|
-
<p><script type=“text/javascript” charset=“utf-8”></p>
|
202
|
-
|
203
|
-
<pre>hasFrames = window.top.frames.main ? true : false;
|
204
|
-
relpath = '../';
|
205
|
-
framesUrl = "../frames.html#!" + escape(window.location.href);</pre>
|
206
|
-
|
207
|
-
<p></script></p>
|
208
|
-
|
209
|
-
<pre><script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
210
|
-
|
211
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
212
|
-
|
213
|
-
</head>
|
214
|
-
<body>
|
215
|
-
<div id="header">
|
216
|
-
<div id="menu">
|
217
|
-
|
218
|
-
<a href="../_index.html">Index (D)</a> &raquo;
|
219
|
-
<span class='title'><span class='object_link'><a href="../NEAT.html" title="NEAT (module)">NEAT</a></span></span>
|
220
|
-
&raquo;
|
221
|
-
<span class="title">DSL</span>
|
222
|
-
|
223
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div></pre>
|
224
|
-
|
225
|
-
<p></div></p>
|
226
|
-
|
227
|
-
<pre> <div id="search">
|
228
|
-
|
229
|
-
<a class="full_list_link" id="class_list_link"
|
230
|
-
href="../class_list.html">
|
231
|
-
Class List
|
232
|
-
</a>
|
233
|
-
|
234
|
-
<a class="full_list_link" id="method_list_link"
|
235
|
-
href="../method_list.html">
|
236
|
-
Method List
|
237
|
-
</a>
|
238
|
-
|
239
|
-
<a class="full_list_link" id="file_list_link"
|
240
|
-
href="../file_list.html">
|
241
|
-
File List
|
242
|
-
</a></pre>
|
243
|
-
|
244
|
-
<p></div></p>
|
245
|
-
|
246
|
-
<pre> <div class="clear"></div>
|
247
|
-
</div>
|
248
|
-
|
249
|
-
<iframe id="search_frame"></iframe>
|
250
|
-
|
251
|
-
<div id="content"><h1>Module: NEAT::DSL</pre>
|
252
|
-
|
253
|
-
<p></h1></p>
|
254
|
-
|
255
|
-
<p><dl class=“box”></p>
|
256
|
-
|
257
|
-
<pre> <dt class="r1">Includes:</dt>
|
258
|
-
<dd class="r1">Math, <span class='object_link'><a href="../NEAT.html" title="NEAT (module)">NEAT</a></span>, <span class='object_link'><a href="BasicNeuronTypes.html" title="NEAT::BasicNeuronTypes (module)">BasicNeuronTypes</a></span></dd>
|
259
|
-
|
260
|
-
<dt class="r2 last">Defined in:</dt>
|
261
|
-
<dd class="r2 last">lib/rubyneat/dsl.rb</dd></pre>
|
262
|
-
|
263
|
-
<p></dl> <div class=“clear”></div></p>
|
264
|
-
|
265
|
-
<pre><h2>Constant Summary</h2>
|
266
|
-
|
267
|
-
<h2>Constant Summary</h2>
|
268
|
-
|
269
|
-
<h3 class="inherited">Constants included
|
270
|
-
from <span class='object_link'><a href="../NEAT.html" title="NEAT (module)">NEAT</a></span></h3>
|
271
|
-
<p class="inherited"><span class='object_link'><a href="../NEAT.html#STIMULUS-constant" title="NEAT::STIMULUS (constant)">STIMULUS</a></span></p>
|
272
|
-
|
273
|
-
<h2>
|
274
|
-
Instance Method Summary
|
275
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
276
|
-
</h2>
|
277
|
-
|
278
|
-
<ul class="summary">
|
279
|
-
|
280
|
-
<li class="public ">
|
281
|
-
<span class="summary_signature">
|
282
|
-
|
283
|
-
<a href="#compare-instance_method" title="#compare (instance method)">- (Object) <strong>compare</strong>(&amp;block) </a>
|
284
|
-
|
285
|
-
</span>
|
286
|
-
|
287
|
-
<span class="summary_desc"><div class='inline'></pre>
|
288
|
-
|
289
|
-
<p><p>Fitness ordering – given 2 fitness numbers, use the to compare
|
290
|
-
them (or the equivalent, following the +1, 0, -1 that is in the sense of
|
291
|
-
).</p> </div></span></p>
|
292
|
-
|
293
|
-
<p></li></p>
|
294
|
-
|
295
|
-
<pre> <li class="public ">
|
296
|
-
<span class="summary_signature">
|
297
|
-
|
298
|
-
<a href="#condition_boolean_vector-instance_method" title="#condition_boolean_vector (instance method)">- (Object) <strong>condition_boolean_vector</strong>(vec, sig = :tanh) </a>
|
299
|
-
|
300
|
-
</span>
|
301
|
-
|
302
|
-
<span class="summary_desc"><div class='inline'></pre>
|
303
|
-
|
304
|
-
<p><p>Helper function to Condition boolean vectors to be +1 if true, -1
|
305
|
-
if false (0 if sigmoid).</p> </div></span></p>
|
306
|
-
|
307
|
-
<p></li></p>
|
308
|
-
|
309
|
-
<pre> <li class="public ">
|
310
|
-
<span class="summary_signature">
|
311
|
-
|
312
|
-
<a href="#cost-instance_method" title="#cost (instance method)">- (Object) <strong>cost</strong>(&amp;block) </a>
|
313
|
-
|
314
|
-
</span>
|
315
|
-
|
316
|
-
<span class="summary_desc"><div class='inline'></pre>
|
317
|
-
|
318
|
-
<p><p>Calculation to add the cost to the fitness, resulting in a fitness
|
319
|
-
that incorporates the cost for sorting purposes.</p>
|
320
|
-
</div></span></p>
|
321
|
-
|
322
|
-
<p></li></p>
|
323
|
-
|
324
|
-
<pre> <li class="public ">
|
325
|
-
<span class="summary_signature">
|
326
|
-
|
327
|
-
<a href="#define-instance_method" title="#define (instance method)">- (Object) <strong>define</strong>(name = NEAT.random_name_generator, &amp;block) </a>
|
328
|
-
|
329
|
-
</span>
|
330
|
-
|
331
|
-
<span class="summary_desc"><div class='inline'></pre>
|
332
|
-
|
333
|
-
<p><p>DSL – Define defines the parameters to the controller.</p>
|
334
|
-
</div></span></p>
|
335
|
-
|
336
|
-
<p></li></p>
|
337
|
-
|
338
|
-
<pre> <li class="public ">
|
339
|
-
<span class="summary_signature">
|
340
|
-
|
341
|
-
<a href="#evolve-instance_method" title="#evolve (instance method)">- (Object) <strong>evolve</strong>(&amp;block) </a>
|
342
|
-
|
343
|
-
</span>
|
344
|
-
|
345
|
-
<span class="summary_desc"><div class='inline'></pre>
|
346
|
-
|
347
|
-
<p><p>DSL – Run evolution.</p> </div></span></p>
|
348
|
-
|
349
|
-
<p></li></p>
|
350
|
-
|
351
|
-
<pre> <li class="public ">
|
352
|
-
<span class="summary_signature">
|
353
|
-
|
354
|
-
<a href="#fitness-instance_method" title="#fitness (instance method)">- (Object) <strong>fitness</strong>(&amp;block) </a>
|
355
|
-
|
356
|
-
</span>
|
357
|
-
|
358
|
-
<span class="summary_desc"><div class='inline'></pre>
|
359
|
-
|
360
|
-
<p><p>fitness function calls the block with 2 vectors or two hashes,
|
361
|
-
input and output vectors of the critter being evaluated for fitness, as
|
362
|
-
well as a sequence number that can be used to index what the actual output
|
363
|
-
should be.</p> </div></span></p>
|
364
|
-
|
365
|
-
<p></li></p>
|
366
|
-
|
367
|
-
<pre> <li class="public ">
|
368
|
-
<span class="summary_signature">
|
369
|
-
|
370
|
-
<a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(m, *args, &amp;block) </a>
|
371
|
-
|
372
|
-
</span>
|
373
|
-
|
374
|
-
<span class="summary_desc"><div class='inline'></pre>
|
375
|
-
|
376
|
-
<p><p>This is used to handle the details of our DSL.</p>
|
377
|
-
</div></span></p>
|
378
|
-
|
379
|
-
<p></li></p>
|
380
|
-
|
381
|
-
<pre> <li class="public ">
|
382
|
-
<span class="summary_signature">
|
383
|
-
|
384
|
-
<a href="#query-instance_method" title="#query (instance method)">- (Object) <strong>query</strong>(&amp;block) </a>
|
385
|
-
|
386
|
-
</span>
|
387
|
-
|
388
|
-
<span class="summary_desc"><div class='inline'></pre>
|
389
|
-
|
390
|
-
<p><p>Query function is called with the sequence (time evolution)
|
391
|
-
number, and returns an array or hash of parameters that will be given to
|
392
|
-
the input nodes.</p> </div></span></p>
|
393
|
-
|
394
|
-
<p></li></p>
|
395
|
-
|
396
|
-
<pre> <li class="public ">
|
397
|
-
<span class="summary_signature">
|
398
|
-
|
399
|
-
<a href="#recurrence-instance_method" title="#recurrence (instance method)">- (Object) <strong>recurrence</strong>(&amp;block) </a>
|
400
|
-
|
401
|
-
</span>
|
402
|
-
|
403
|
-
<span class="summary_desc"><div class='inline'></div></span></pre>
|
404
|
-
|
405
|
-
<p></li></p>
|
406
|
-
|
407
|
-
<pre> <li class="public ">
|
408
|
-
<span class="summary_signature">
|
409
|
-
|
410
|
-
<a href="#report-instance_method" title="#report (instance method)">- (Object) <strong>report</strong>(&amp;block) </a>
|
411
|
-
|
412
|
-
</span>
|
413
|
-
|
414
|
-
<span class="summary_desc"><div class='inline'></pre>
|
415
|
-
|
416
|
-
<p><p>Report on evaluations.</p> </div></span></p>
|
417
|
-
|
418
|
-
<p></li></p>
|
419
|
-
|
420
|
-
<pre> <li class="public ">
|
421
|
-
<span class="summary_signature">
|
422
|
-
|
423
|
-
<a href="#run_engine-instance_method" title="#run_engine (instance method)">- (Object) <strong>run_engine</strong>(&amp;block) </a>
|
424
|
-
|
425
|
-
</span>
|
426
|
-
|
427
|
-
<span class="summary_desc"><div class='inline'></pre>
|
428
|
-
|
429
|
-
<p><p>Run the engine.</p> </div></span></p>
|
430
|
-
|
431
|
-
<p></li></p>
|
432
|
-
|
433
|
-
<pre> <li class="public ">
|
434
|
-
<span class="summary_signature">
|
435
|
-
|
436
|
-
<a href="#simple_fitness_error-instance_method" title="#simple_fitness_error (instance method)">- (Object) <strong>simple_fitness_error</strong>(v1, v2) </a>
|
437
|
-
|
438
|
-
</span>
|
439
|
-
|
440
|
-
<span class="summary_desc"><div class='inline'></pre>
|
441
|
-
|
442
|
-
<p><p>Helper function to do a simple fitness calculation on the basis of
|
443
|
-
the sum of the square of the diffences of the element in the two
|
444
|
-
vectors.</p> </div></span></p>
|
445
|
-
|
446
|
-
<p></li></p>
|
447
|
-
|
448
|
-
<pre> <li class="public ">
|
449
|
-
<span class="summary_signature">
|
450
|
-
|
451
|
-
<a href="#stop_on_fitness-instance_method" title="#stop_on_fitness (instance method)">- (Object) <strong>stop_on_fitness</strong>(&amp;block) </a>
|
452
|
-
|
453
|
-
</span>
|
454
|
-
|
455
|
-
<span class="summary_desc"><div class='inline'></pre>
|
456
|
-
|
457
|
-
<p><p>Stop the progression once the fitness criteria is reached for the
|
458
|
-
most fit critter.</p> </div></span></p>
|
459
|
-
|
460
|
-
<p></li></p>
|
461
|
-
|
462
|
-
<pre> <li class="public ">
|
463
|
-
<span class="summary_signature">
|
464
|
-
|
465
|
-
<a href="#uncondition_boolean_vector-instance_method" title="#uncondition_boolean_vector (instance method)">- (Object) <strong>uncondition_boolean_vector</strong>(vec, sig = :tanh) </a>
|
466
|
-
|
467
|
-
</span>
|
468
|
-
|
469
|
-
<span class="summary_desc"><div class='inline'></pre>
|
470
|
-
|
471
|
-
<p><p>Helper function to Uncondition boolean vectors to be +1 if true,
|
472
|
-
-1 if false FIXME we need a better discrimination function.</p>
|
473
|
-
</div></span></p>
|
474
|
-
|
475
|
-
<p></li></p>
|
476
|
-
|
477
|
-
<pre> </ul>
|
478
|
-
|
479
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="../NEAT.html" title="NEAT (module)">NEAT</a></span></h3>
|
480
|
-
<p class="inherited"><span class='object_link'><a href="../NEAT.html#controller-class_method" title="NEAT.controller (method)">controller</a></span>, <span class='object_link'><a href="../NEAT.html#controller%3D-class_method" title="NEAT.controller= (method)">controller=</a></span>, <span class='object_link'><a href="../NEAT.html#create_controller-class_method" title="NEAT.create_controller (method)">create_controller</a></span>, <span class='object_link'><a href="../NEAT.html#dpp-class_method" title="NEAT.dpp (method)">dpp</a></span>, <span class='object_link'><a href="../NEAT.html#gaussian-class_method" title="NEAT.gaussian (method)">gaussian</a></span>, <span class='object_link'><a href="../NEAT.html#new_innovation-class_method" title="NEAT.new_innovation (method)">new_innovation</a></span>, <span class='object_link'><a href="../NEAT.html#random_name_generator-class_method" title="NEAT.random_name_generator (method)">random_name_generator</a></span></p></pre>
|
481
|
-
|
482
|
-
<p><div id=“method_missing_details” class=“method_details_list”></p>
|
483
|
-
|
484
|
-
<pre class="ruby"><span class="ruby-operator"><</span><span class="ruby-identifier">h2</span><span class="ruby-operator">></span><span class="ruby-constant">Dynamic</span> <span class="ruby-constant">Method</span> <span class="ruby-constant">Handling</span><span class="ruby-operator"><</span><span class="ruby-regexp">/h2>
|
485
|
-
<p class="notice this">
|
486
|
-
This class handles dynamic methods through the <tt>method_missing</</span><span class="ruby-identifier">tt</span><span class="ruby-operator">></span> <span class="ruby-identifier">method</span>
|
487
|
-
|
488
|
-
<span class="ruby-operator"><</span><span class="ruby-regexp">/p>
|
489
|
-
|
490
|
-
<div class="method_details first">
|
491
|
-
<h3 class="signature first" id="method_missing-instance_method">
|
492
|
-
|
493
|
-
- (<tt>Object</</span><span class="ruby-identifier">tt</span><span class="ruby-operator">></span>) <span class="ruby-operator"><</span><span class="ruby-identifier">strong</span><span class="ruby-operator">></span><span class="ruby-identifier">method_missing</span><span class="ruby-operator"><</span><span class="ruby-regexp">/strong>(m, *args, &amp;block)
|
494
|
-
</span></pre>
|
495
|
-
|
496
|
-
<p></h3><div class=“docstring”></p>
|
497
|
-
|
498
|
-
<pre><div class="discussion"></pre>
|
499
|
-
|
500
|
-
<p><p>This is used to handle the details of our DSL.</p></p>
|
501
|
-
|
502
|
-
<pre></div></pre>
|
503
|
-
|
504
|
-
<p></div> <div class=“tags”></p>
|
505
|
-
|
506
|
-
<p></div><table class=“source_code”></p>
|
507
|
-
|
508
|
-
<pre><tr>
|
509
|
-
<td>
|
510
|
-
<pre class="lines"></pre>
|
511
|
-
|
512
|
-
<p>114 115 116 117 118 119 120 121 122 123 124</pre></p>
|
513
|
-
|
514
|
-
<pre></td>
|
515
|
-
<td>
|
516
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 114</span></pre>
|
517
|
-
|
518
|
-
<p><span class='kw'>def</span> <span class='id
|
519
|
-
identifier
|
520
|
-
rubyid_method_missing'>method_missing</span><span
|
521
|
-
class='lparen'>(</span><span class='id identifier
|
522
|
-
rubyid_m'>m</span><span
|
523
|
-
class='comma'>,</span> <span
|
524
|
-
class='op'>*</span><span class='id identifier
|
525
|
-
rubyid_args'>args</span><span
|
526
|
-
class='comma'>,</span> <span
|
527
|
-
class='op'>&amp;</span><span class='id
|
528
|
-
identifier rubyid_block'>block</span><span
|
529
|
-
class='rparen'>)</span></p>
|
530
|
-
|
531
|
-
<pre><span class='comment'># we want to catch parameters settings here.</pre>
|
532
|
-
|
533
|
-
<p></span> <span class='kw'>if</span> <span
|
534
|
-
class='const'>NEAT</span><span
|
535
|
-
class='op'>::</span><span class='id identifier
|
536
|
-
rubyid_controller'>controller</span><span
|
537
|
-
class='period'>.</span><span class='id identifier
|
538
|
-
rubyid_parms'>parms</span><span
|
539
|
-
class='period'>.</span><span class='id identifier
|
540
|
-
rubyid_respond_to?'>respond_to?</span> <span
|
541
|
-
class='lparen'>(</span><span class='id identifier
|
542
|
-
rubyid_assignment'>assignment</span> <span
|
543
|
-
class='op'>=</span> <span
|
544
|
-
class='lparen'>(</span><span class='id identifier
|
545
|
-
rubyid_m'>m</span><span
|
546
|
-
class='period'>.</span><span class='id identifier
|
547
|
-
rubyid_to_s'>to_s</span> <span
|
548
|
-
class='op'>+</span> <span
|
549
|
-
class='tstring'><span
|
550
|
-
class='tstring_beg'>&#39;</span><span
|
551
|
-
class='tstring_content'>=</span><span
|
552
|
-
class='tstring_end'>&#39;</span></span><span
|
553
|
-
class='rparen'>)</span><span
|
554
|
-
class='period'>.</span><span class='id identifier
|
555
|
-
rubyid_to_sym'>to_sym</span><span
|
556
|
-
class='rparen'>)</span></p>
|
557
|
-
|
558
|
-
<pre> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NeatException</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Missing value(s) to %s</span><span class='tstring_end'>&quot;</span></span> <span class='op'>%</span> <span class='id identifier rubyid_m'>m</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
559
|
-
<span class='id identifier rubyid_val'>val</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='id identifier rubyid_args'>args</span>
|
560
|
-
<span class='gvar'>$log</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Caught method %s with parameter of %s</span><span class='tstring_end'>&quot;</span></span> <span class='op'>%</span> <span class='lbracket'>[</span><span class='id identifier rubyid_assignment'>assignment</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
|
561
|
-
<span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_parms'>parms</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_assignment'>assignment</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span>
|
562
|
-
<span class='kw'>else</span>
|
563
|
-
<span class='kw'>super</span>
|
564
|
-
<span class='kw'>end</span></pre>
|
565
|
-
|
566
|
-
<p><span class='kw'>end</span></pre></p>
|
567
|
-
|
568
|
-
<pre> </td>
|
569
|
-
</tr></pre>
|
570
|
-
|
571
|
-
<p></table> </div></p>
|
572
|
-
|
573
|
-
<p></div></p>
|
574
|
-
|
575
|
-
<pre><div id="instance_method_details" class="method_details_list">
|
576
|
-
<h2>Instance Method Details</h2>
|
577
|
-
|
578
|
-
<div class="method_details first">
|
579
|
-
<h3 class="signature first" id="compare-instance_method">
|
580
|
-
|
581
|
-
- (<tt>Object</tt>) <strong>compare</strong>(&amp;block)</pre>
|
582
|
-
|
583
|
-
<p></h3><div class=“docstring”></p>
|
584
|
-
|
585
|
-
<pre><div class="discussion"></pre>
|
586
|
-
|
587
|
-
<p><p>Fitness ordering – given 2 fitness numbers, use the
|
588
|
-
&lt;=&gt; to compare them (or the equivalent, following the +1, 0,
|
589
|
-
-1 that is in the sense of &lt;=&gt;)</p></p>
|
590
|
-
|
591
|
-
<pre></div></pre>
|
592
|
-
|
593
|
-
<p></div> <div class=“tags”></p>
|
594
|
-
|
595
|
-
<p></div><table class=“source_code”></p>
|
596
|
-
|
597
|
-
<pre><tr>
|
598
|
-
<td>
|
599
|
-
<pre class="lines"></pre>
|
600
|
-
|
601
|
-
<p>63 64 65</pre></p>
|
602
|
-
|
603
|
-
<pre></td>
|
604
|
-
<td>
|
605
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 63</span></pre>
|
606
|
-
|
607
|
-
<p><span class='kw'>def</span> <span class='id
|
608
|
-
identifier rubyid_compare'>compare</span><span
|
609
|
-
class='lparen'>(</span><span
|
610
|
-
class='op'>&amp;</span><span class='id
|
611
|
-
identifier rubyid_block'>block</span><span
|
612
|
-
class='rparen'>)</span></p>
|
613
|
-
|
614
|
-
<pre><span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_compare_func'>compare_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span></pre>
|
615
|
-
|
616
|
-
<p><span class='kw'>end</span></pre></p>
|
617
|
-
|
618
|
-
<pre> </td>
|
619
|
-
</tr></pre>
|
620
|
-
|
621
|
-
<p></table> </div></p>
|
622
|
-
|
623
|
-
<pre> <div class="method_details ">
|
624
|
-
<h3 class="signature " id="condition_boolean_vector-instance_method">
|
625
|
-
|
626
|
-
- (<tt>Object</tt>) <strong>condition_boolean_vector</strong>(vec, sig = :tanh)</pre>
|
627
|
-
|
628
|
-
<p></h3><div class=“docstring”></p>
|
629
|
-
|
630
|
-
<pre><div class="discussion"></pre>
|
631
|
-
|
632
|
-
<p><p>Helper function to Condition boolean vectors to be +1 if true, -1
|
633
|
-
if false (0 if sigmoid)</p></p>
|
634
|
-
|
635
|
-
<pre></div></pre>
|
636
|
-
|
637
|
-
<p></div> <div class=“tags”></p>
|
638
|
-
|
639
|
-
<p></div><table class=“source_code”></p>
|
640
|
-
|
641
|
-
<pre><tr>
|
642
|
-
<td>
|
643
|
-
<pre class="lines"></pre>
|
644
|
-
|
645
|
-
<p>81 82 83</pre></p>
|
646
|
-
|
647
|
-
<pre></td>
|
648
|
-
<td>
|
649
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 81</span></pre>
|
650
|
-
|
651
|
-
<p><span class='kw'>def</span> <span class='id
|
652
|
-
identifier
|
653
|
-
rubyid_condition_boolean_vector'>condition_boolean_vector</span><span
|
654
|
-
class='lparen'>(</span><span class='id identifier
|
655
|
-
rubyid_vec'>vec</span><span
|
656
|
-
class='comma'>,</span> <span class='id identifier
|
657
|
-
rubyid_sig'>sig</span> <span
|
658
|
-
class='op'>=</span> <span
|
659
|
-
class='symbol'>:tanh</span><span
|
660
|
-
class='rparen'>)</span></p>
|
661
|
-
|
662
|
-
<pre><span class='id identifier rubyid_vec'>vec</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_b'>b</span><span class='op'>|</span> <span class='id identifier rubyid_b'>b</span> <span class='op'>?</span> <span class='int'>1</span> <span class='op'>:</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_sig'>sig</span> <span class='op'>==</span> <span class='symbol'>:sigmoid</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbrace'>}</span></pre>
|
663
|
-
|
664
|
-
<p><span class='kw'>end</span></pre></p>
|
665
|
-
|
666
|
-
<pre> </td>
|
667
|
-
</tr></pre>
|
668
|
-
|
669
|
-
<p></table> </div></p>
|
670
|
-
|
671
|
-
<pre> <div class="method_details ">
|
672
|
-
<h3 class="signature " id="cost-instance_method">
|
673
|
-
|
674
|
-
- (<tt>Object</tt>) <strong>cost</strong>(&amp;block)</pre>
|
675
|
-
|
676
|
-
<p></h3><div class=“docstring”></p>
|
677
|
-
|
678
|
-
<pre><div class="discussion"></pre>
|
679
|
-
|
680
|
-
<p><p>Calculation to add the cost to the fitness, resulting in a fitness
|
681
|
-
that incorporates the cost for sorting purposes.</p></p>
|
682
|
-
|
683
|
-
<pre></div></pre>
|
684
|
-
|
685
|
-
<p></div> <div class=“tags”></p>
|
686
|
-
|
687
|
-
<p></div><table class=“source_code”></p>
|
688
|
-
|
689
|
-
<pre><tr>
|
690
|
-
<td>
|
691
|
-
<pre class="lines"></pre>
|
692
|
-
|
693
|
-
<p>69 70 71</pre></p>
|
694
|
-
|
695
|
-
<pre></td>
|
696
|
-
<td>
|
697
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 69</span></pre>
|
698
|
-
|
699
|
-
<p><span class='kw'>def</span> <span class='id
|
700
|
-
identifier rubyid_cost'>cost</span><span
|
701
|
-
class='lparen'>(</span><span
|
702
|
-
class='op'>&amp;</span><span class='id
|
703
|
-
identifier rubyid_block'>block</span><span
|
704
|
-
class='rparen'>)</span></p>
|
705
|
-
|
706
|
-
<pre><span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_cost_func'>cost_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span></pre>
|
707
|
-
|
708
|
-
<p><span class='kw'>end</span></pre></p>
|
709
|
-
|
710
|
-
<pre> </td>
|
711
|
-
</tr></pre>
|
712
|
-
|
713
|
-
<p></table> </div></p>
|
714
|
-
|
715
|
-
<pre> <div class="method_details ">
|
716
|
-
<h3 class="signature " id="define-instance_method">
|
717
|
-
|
718
|
-
- (<tt>Object</tt>) <strong>define</strong>(name = NEAT.random_name_generator, &amp;block)</pre>
|
719
|
-
|
720
|
-
<p></h3><div class=“docstring”></p>
|
721
|
-
|
722
|
-
<pre><div class="discussion"></pre>
|
723
|
-
|
724
|
-
<p><p>DSL – Define defines the parameters to the controller.</p></p>
|
725
|
-
|
726
|
-
<pre></div></pre>
|
727
|
-
|
728
|
-
<p></div> <div class=“tags”></p>
|
729
|
-
|
730
|
-
<p></div><table class=“source_code”></p>
|
731
|
-
|
732
|
-
<pre><tr>
|
733
|
-
<td>
|
734
|
-
<pre class="lines"></pre>
|
735
|
-
|
736
|
-
<p>15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
737
|
-
36</pre></p>
|
738
|
-
|
739
|
-
<pre></td>
|
740
|
-
<td>
|
741
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 15</span></pre>
|
742
|
-
|
743
|
-
<p><span class='kw'>def</span> <span class='id
|
744
|
-
identifier rubyid_define'>define</span><span
|
745
|
-
class='lparen'>(</span><span class='id identifier
|
746
|
-
rubyid_name'>name</span> <span
|
747
|
-
class='op'>=</span> <span
|
748
|
-
class='const'>NEAT</span><span
|
749
|
-
class='period'>.</span><span class='id identifier
|
750
|
-
rubyid_random_name_generator'>random_name_generator</span><span
|
751
|
-
class='comma'>,</span> <span
|
752
|
-
class='op'>&amp;</span><span class='id
|
753
|
-
identifier rubyid_block'>block</span><span
|
754
|
-
class='rparen'>)</span></p>
|
755
|
-
|
756
|
-
<pre><span class='lbracket'>[</span>
|
757
|
-
<span class='symbol'>:inputs</span><span class='comma'>,</span>
|
758
|
-
<span class='symbol'>:outputs</span><span class='comma'>,</span>
|
759
|
-
<span class='symbol'>:hidden</span> <span class='comment'># we really don&#39;t care about mapping hidden neurons, but we&#39;ll ignore them later.</pre>
|
760
|
-
|
761
|
-
<p></span> <span class='rbracket'>]</span><span
|
762
|
-
class='period'>.</span><span class='id identifier
|
763
|
-
rubyid_each'>each</span> <span
|
764
|
-
class='kw'>do</span> <span
|
765
|
-
class='op'>|</span><span class='id identifier
|
766
|
-
rubyid_iometh'>iometh</span><span
|
767
|
-
class='op'>|</span></p>
|
768
|
-
|
769
|
-
<pre class="ruby"> <span class="ruby-operator"><</span><span class="ruby-identifier">span</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">'id identifier rubyid_instance_eval'</span><span class="ruby-operator">></span><span class="ruby-identifier">instance_eval</span><span class="ruby-operator"><</span><span class="ruby-regexp">/span> <span class='tstring'><span class='tstring_beg'>%Q[</s</span><span class="ruby-identifier">pan</span><span class="ruby-operator">></span><span class="ruby-operator"><</span><span class="ruby-identifier">span</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">'tstring_content'</span><span class="ruby-operator">></span>
|
770
|
-
<span class="ruby-keyword">def</span> <span class="ruby-operator"><</span><span class="ruby-operator">/</span><span class="ruby-identifier">span</span><span class="ruby-operator">></span><span class="ruby-operator"><</span><span class="ruby-identifier">span</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">'embexpr_beg'</span><span class="ruby-operator">></span><span class="ruby-comment">#{</span><span class='id identifier rubyid_iometh'>iometh</span><span class='embexpr_end'>}</span><span class='tstring_content'>(nodes = nil, &amp;block)</span>
|
771
|
-
<span class="ruby-identifier">neui</span> = <span class="ruby-keyword">unless</span> <span class="ruby-identifier">nodes</span>.<span class="ruby-identifier">nil?</span>
|
772
|
-
<span class="ruby-identifier">nodes</span>
|
773
|
-
<span class="ruby-keyword">else</span>
|
774
|
-
<span class="ruby-identifier">block</span>.()
|
775
|
-
<span class="ruby-keyword">end</span>
|
776
|
-
<span class="ruby-constant">NEAT</span><span class="ruby-operator">::</span><span class="ruby-identifier">controller</span>.<span class="ruby-identifier">neural_</span><span class="ruby-operator"><</span><span class="ruby-node">/span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_iometh'>iometh</span><span class='embexpr_end'>}</s</span><span class="ruby-identifier">pan</span><span class="ruby-operator">></span><span class="ruby-operator"><</span><span class="ruby-identifier">span</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">'tstring_content'</span><span class="ruby-operator">></span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">neui</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Hash</span>
|
777
|
-
<span class="ruby-identifier">neui</span>
|
778
|
-
<span class="ruby-keyword">else</span>
|
779
|
-
<span class="ruby-constant">Hash</span>[<span class="ruby-identifier">neui</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span> [<span class="ruby-constant">NEAT</span><span class="ruby-operator">::</span><span class="ruby-identifier">random_name_generator</span>, <span class="ruby-identifier">n</span>]}]
|
780
|
-
<span class="ruby-keyword">end</span>
|
781
|
-
<span class="ruby-keyword">end</span><span class="ruby-operator"><</span><span class="ruby-regexp">/span><span class='tstring_end'>]</s</span><span class="ruby-identifier">pan</span><span class="ruby-operator">></span><span class="ruby-operator"><</span><span class="ruby-regexp">/span>
|
782
|
-
<span class='kw'>end</s</span><span class="ruby-identifier">pan</span><span class="ruby-operator">></span>
|
783
|
-
<span class="ruby-operator"><</span><span class="ruby-identifier">span</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">'id identifier rubyid_block'</span><span class="ruby-operator">></span><span class="ruby-identifier">block</span><span class="ruby-operator"><</span><span class="ruby-regexp">/span><span class='period'>.</s</span><span class="ruby-identifier">pan</span><span class="ruby-operator">></span><span class="ruby-operator"><</span><span class="ruby-identifier">span</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">'lparen'</span><span class="ruby-operator">></span>(<span class="ruby-operator"><</span><span class="ruby-regexp">/span><span class='const'>NEAT</s</span><span class="ruby-identifier">pan</span><span class="ruby-operator">></span><span class="ruby-operator"><</span><span class="ruby-identifier">span</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">'op'</span><span class="ruby-operator">></span><span class="ruby-operator">::</span><span class="ruby-operator"><</span><span class="ruby-regexp">/span><span class='id identifier rubyid_controller'>controller</s</span><span class="ruby-identifier">pan</span><span class="ruby-operator">></span><span class="ruby-operator"><</span><span class="ruby-identifier">span</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">'rparen'</span><span class="ruby-operator">></span>)<span class="ruby-operator"><</span><span class="ruby-regexp">/span>
|
784
|
-
</span></pre>
|
785
|
-
|
786
|
-
<p><span class='kw'>end</span></pre></p>
|
787
|
-
|
788
|
-
<pre> </td>
|
789
|
-
</tr></pre>
|
790
|
-
|
791
|
-
<p></table> </div></p>
|
792
|
-
|
793
|
-
<pre> <div class="method_details ">
|
794
|
-
<h3 class="signature " id="evolve-instance_method">
|
795
|
-
|
796
|
-
- (<tt>Object</tt>) <strong>evolve</strong>(&amp;block)</pre>
|
797
|
-
|
798
|
-
<p></h3><div class=“docstring”></p>
|
799
|
-
|
800
|
-
<pre><div class="discussion"></pre>
|
801
|
-
|
802
|
-
<p><p>DSL – Run evolution</p></p>
|
803
|
-
|
804
|
-
<pre></div></pre>
|
805
|
-
|
806
|
-
<p></div> <div class=“tags”></p>
|
807
|
-
|
808
|
-
<p></div><table class=“source_code”></p>
|
809
|
-
|
810
|
-
<pre><tr>
|
811
|
-
<td>
|
812
|
-
<pre class="lines"></pre>
|
813
|
-
|
814
|
-
<p>39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
815
|
-
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
816
|
-
89 90 91 92 93 94 95 96 97 98 99 100</pre></p>
|
817
|
-
|
818
|
-
<pre></td>
|
819
|
-
<td>
|
820
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 39</span></pre>
|
821
|
-
|
822
|
-
<p><span class='kw'>def</span> <span class='id
|
823
|
-
identifier rubyid_evolve'>evolve</span><span
|
824
|
-
class='lparen'>(</span><span
|
825
|
-
class='op'>&amp;</span><span class='id
|
826
|
-
identifier rubyid_block'>block</span><span
|
827
|
-
class='rparen'>)</span></p>
|
828
|
-
|
829
|
-
<pre><span class='comment'># Query function is called with the sequence (time evolution) number,</pre>
|
830
|
-
|
831
|
-
<p></span> <span class='comment'># and returns an array
|
832
|
-
or hash of parameters that will be given </span> <span
|
833
|
-
class='comment'># to the input nodes. In the case of hash, the
|
834
|
-
keys in the hash </span> <span class='comment'># shall
|
835
|
-
correspond to the names given to the input neurons. </span> <span
|
836
|
-
class='kw'>def</span> <span class='id identifier
|
837
|
-
rubyid_query'>query</span><span
|
838
|
-
class='lparen'>(</span><span
|
839
|
-
class='op'>&amp;</span><span class='id
|
840
|
-
identifier rubyid_block'>block</span><span
|
841
|
-
class='rparen'>)</span></p>
|
842
|
-
|
843
|
-
<pre> <span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_query_func'>query_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
|
844
|
-
<span class='kw'>end</span>
|
845
|
-
|
846
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_recurrence'>recurrence</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
847
|
-
<span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_recurrence_func'>recurrence_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
|
848
|
-
<span class='kw'>end</span>
|
849
|
-
|
850
|
-
<span class='comment'># fitness function calls the block with 2 vectors or two hashes, input and output</pre>
|
851
|
-
|
852
|
-
<p></span> <span class='comment'># vectors of the critter
|
853
|
-
being evaluated for fitness, as well as a sequence </span> <span
|
854
|
-
class='comment'># number that can be used to index what the
|
855
|
-
actual output should be. </span> <span
|
856
|
-
class='comment'># |vin, vout, seq| </span> <span
|
857
|
-
class='kw'>def</span> <span class='id identifier
|
858
|
-
rubyid_fitness'>fitness</span><span
|
859
|
-
class='lparen'>(</span><span
|
860
|
-
class='op'>&amp;</span><span class='id
|
861
|
-
identifier rubyid_block'>block</span><span
|
862
|
-
class='rparen'>)</span></p>
|
863
|
-
|
864
|
-
<pre> <span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_fitness_func'>fitness_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
|
865
|
-
<span class='kw'>end</span>
|
866
|
-
|
867
|
-
<span class='comment'># Fitness ordering -- given 2 fitness numbers,</pre>
|
868
|
-
|
869
|
-
<p></span> <span class='comment'># use the
|
870
|
-
&lt;=&gt; to compare them (or the equivalent, following
|
871
|
-
</span> <span class='comment'># the +1, 0, -1 that is
|
872
|
-
in the sense of &lt;=&gt;) </span> <span
|
873
|
-
class='kw'>def</span> <span class='id identifier
|
874
|
-
rubyid_compare'>compare</span><span
|
875
|
-
class='lparen'>(</span><span
|
876
|
-
class='op'>&amp;</span><span class='id
|
877
|
-
identifier rubyid_block'>block</span><span
|
878
|
-
class='rparen'>)</span></p>
|
879
|
-
|
880
|
-
<pre> <span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_compare_func'>compare_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
|
881
|
-
<span class='kw'>end</span>
|
882
|
-
|
883
|
-
<span class='comment'># Calculation to add the cost to the fitness, resulting in a fitness</pre>
|
884
|
-
|
885
|
-
<p></span> <span class='comment'># that incorporates the
|
886
|
-
cost for sorting purposes. </span> <span
|
887
|
-
class='kw'>def</span> <span class='id identifier
|
888
|
-
rubyid_cost'>cost</span><span
|
889
|
-
class='lparen'>(</span><span
|
890
|
-
class='op'>&amp;</span><span class='id
|
891
|
-
identifier rubyid_block'>block</span><span
|
892
|
-
class='rparen'>)</span></p>
|
893
|
-
|
894
|
-
<pre> <span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_cost_func'>cost_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
|
895
|
-
<span class='kw'>end</span>
|
896
|
-
|
897
|
-
<span class='comment'># Stop the progression once the fitness criteria is reached</pre>
|
898
|
-
|
899
|
-
<p></span> <span class='comment'># for the most fit
|
900
|
-
critter </span> <span class='kw'>def</span>
|
901
|
-
<span class='id identifier
|
902
|
-
rubyid_stop_on_fitness'>stop_on_fitness</span><span
|
903
|
-
class='lparen'>(</span><span
|
904
|
-
class='op'>&amp;</span><span class='id
|
905
|
-
identifier rubyid_block'>block</span><span
|
906
|
-
class='rparen'>)</span></p>
|
907
|
-
|
908
|
-
<pre> <span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_stop_on_fit_func'>stop_on_fit_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
|
909
|
-
<span class='kw'>end</span>
|
910
|
-
|
911
|
-
<span class='comment'># Helper function to</pre>
|
912
|
-
|
913
|
-
<p></span> <span class='comment'># Condition boolean
|
914
|
-
vectors to be +1 if true, -1 if false (0 if sigmoid) </span>
|
915
|
-
<span class='kw'>def</span> <span class='id
|
916
|
-
identifier
|
917
|
-
rubyid_condition_boolean_vector'>condition_boolean_vector</span><span
|
918
|
-
class='lparen'>(</span><span class='id identifier
|
919
|
-
rubyid_vec'>vec</span><span
|
920
|
-
class='comma'>,</span> <span class='id identifier
|
921
|
-
rubyid_sig'>sig</span> <span
|
922
|
-
class='op'>=</span> <span
|
923
|
-
class='symbol'>:tanh</span><span
|
924
|
-
class='rparen'>)</span></p>
|
925
|
-
|
926
|
-
<pre> <span class='id identifier rubyid_vec'>vec</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_b'>b</span><span class='op'>|</span> <span class='id identifier rubyid_b'>b</span> <span class='op'>?</span> <span class='int'>1</span> <span class='op'>:</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_sig'>sig</span> <span class='op'>==</span> <span class='symbol'>:sigmoid</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbrace'>}</span>
|
927
|
-
<span class='kw'>end</span>
|
928
|
-
|
929
|
-
<span class='comment'># Helper function to</pre>
|
930
|
-
|
931
|
-
<p></span> <span class='comment'># Uncondition boolean
|
932
|
-
vectors to be +1 if true, -1 if false </span> <span
|
933
|
-
class='comment'># FIXME we need a better discrimination function
|
934
|
-
</span> <span class='kw'>def</span> <span
|
935
|
-
class='id identifier
|
936
|
-
rubyid_uncondition_boolean_vector'>uncondition_boolean_vector</span><span
|
937
|
-
class='lparen'>(</span><span class='id identifier
|
938
|
-
rubyid_vec'>vec</span><span
|
939
|
-
class='comma'>,</span> <span class='id identifier
|
940
|
-
rubyid_sig'>sig</span> <span
|
941
|
-
class='op'>=</span> <span
|
942
|
-
class='symbol'>:tanh</span><span
|
943
|
-
class='rparen'>)</span></p>
|
944
|
-
|
945
|
-
<pre> <span class='id identifier rubyid_vec'>vec</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_o'>o</span><span class='op'>|</span> <span class='id identifier rubyid_o'>o</span> <span class='op'>&gt;</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_sig'>sig</span> <span class='op'>==</span> <span class='symbol'>:sigmoid</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='float'>0.5</span> <span class='op'>:</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span><span class='rbrace'>}</span>
|
946
|
-
<span class='kw'>end</span>
|
947
|
-
|
948
|
-
<span class='comment'># Helper function to do a simple fitness calculation</pre>
|
949
|
-
|
950
|
-
<p></span> <span class='comment'># on the basis of the
|
951
|
-
sum of the square of the diffences </span> <span
|
952
|
-
class='comment'># of the element in the two vectors.
|
953
|
-
</span> <span class='kw'>def</span> <span
|
954
|
-
class='id identifier
|
955
|
-
rubyid_simple_fitness_error'>simple_fitness_error</span><span
|
956
|
-
class='lparen'>(</span><span class='id identifier
|
957
|
-
rubyid_v1'>v1</span><span
|
958
|
-
class='comma'>,</span> <span class='id identifier
|
959
|
-
rubyid_v2'>v2</span><span
|
960
|
-
class='rparen'>)</span></p>
|
961
|
-
|
962
|
-
<pre> <span class='id identifier rubyid_sqrt'>sqrt</span> <span class='id identifier rubyid_v1'>v1</span><span class='period'>.</span><span class='id identifier rubyid_zip'>zip</span><span class='lparen'>(</span><span class='id identifier rubyid_v2'>v2</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span> <span class='id identifier rubyid_b'>b</span><span class='op'>|</span> <span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span> <span class='op'>-</span> <span class='id identifier rubyid_b'>b</span><span class='rparen'>)</span> <span class='op'>**</span> <span class='float'>2.0</span><span class='rbrace'>}</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_m'>m</span><span class='comma'>,</span> <span class='id identifier rubyid_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_m'>m</span> <span class='op'>+</span> <span class='id identifier rubyid_c'>c</span><span class='rbrace'>}</span>
|
963
|
-
<span class='kw'>end</span>
|
964
|
-
|
965
|
-
<span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='lparen'>(</span><span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='rparen'>)</span></pre>
|
966
|
-
|
967
|
-
<p><span class='kw'>end</span></pre></p>
|
968
|
-
|
969
|
-
<pre> </td>
|
970
|
-
</tr></pre>
|
971
|
-
|
972
|
-
<p></table> </div></p>
|
973
|
-
|
974
|
-
<pre> <div class="method_details ">
|
975
|
-
<h3 class="signature " id="fitness-instance_method">
|
976
|
-
|
977
|
-
- (<tt>Object</tt>) <strong>fitness</strong>(&amp;block)</pre>
|
978
|
-
|
979
|
-
<p></h3><div class=“docstring”></p>
|
980
|
-
|
981
|
-
<pre><div class="discussion"></pre>
|
982
|
-
|
983
|
-
<p><p>fitness function calls the block with 2 vectors or two hashes,
|
984
|
-
input and output vectors of the critter being evaluated for fitness, as
|
985
|
-
well as a sequence number that can be used to index what the actual output
|
986
|
-
should be. |vin, vout, seq|</p></p>
|
987
|
-
|
988
|
-
<pre></div></pre>
|
989
|
-
|
990
|
-
<p></div> <div class=“tags”></p>
|
991
|
-
|
992
|
-
<p></div><table class=“source_code”></p>
|
993
|
-
|
994
|
-
<pre><tr>
|
995
|
-
<td>
|
996
|
-
<pre class="lines"></pre>
|
997
|
-
|
998
|
-
<p>56 57 58</pre></p>
|
999
|
-
|
1000
|
-
<pre></td>
|
1001
|
-
<td>
|
1002
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 56</span></pre>
|
1003
|
-
|
1004
|
-
<p><span class='kw'>def</span> <span class='id
|
1005
|
-
identifier rubyid_fitness'>fitness</span><span
|
1006
|
-
class='lparen'>(</span><span
|
1007
|
-
class='op'>&amp;</span><span class='id
|
1008
|
-
identifier rubyid_block'>block</span><span
|
1009
|
-
class='rparen'>)</span></p>
|
1010
|
-
|
1011
|
-
<pre><span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_fitness_func'>fitness_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span></pre>
|
1012
|
-
|
1013
|
-
<p><span class='kw'>end</span></pre></p>
|
1014
|
-
|
1015
|
-
<pre> </td>
|
1016
|
-
</tr></pre>
|
1017
|
-
|
1018
|
-
<p></table> </div></p>
|
1019
|
-
|
1020
|
-
<pre> <div class="method_details ">
|
1021
|
-
<h3 class="signature " id="query-instance_method">
|
1022
|
-
|
1023
|
-
- (<tt>Object</tt>) <strong>query</strong>(&amp;block)</pre>
|
1024
|
-
|
1025
|
-
<p></h3><div class=“docstring”></p>
|
1026
|
-
|
1027
|
-
<pre><div class="discussion"></pre>
|
1028
|
-
|
1029
|
-
<p><p>Query function is called with the sequence (time evolution)
|
1030
|
-
number, and returns an array or hash of parameters that will be given to
|
1031
|
-
the input nodes. In the case of hash, the keys in the hash shall correspond
|
1032
|
-
to the names given to the input neurons.</p></p>
|
1033
|
-
|
1034
|
-
<pre></div></pre>
|
1035
|
-
|
1036
|
-
<p></div> <div class=“tags”></p>
|
1037
|
-
|
1038
|
-
<p></div><table class=“source_code”></p>
|
1039
|
-
|
1040
|
-
<pre><tr>
|
1041
|
-
<td>
|
1042
|
-
<pre class="lines"></pre>
|
1043
|
-
|
1044
|
-
<p>44 45 46</pre></p>
|
1045
|
-
|
1046
|
-
<pre></td>
|
1047
|
-
<td>
|
1048
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 44</span></pre>
|
1049
|
-
|
1050
|
-
<p><span class='kw'>def</span> <span class='id
|
1051
|
-
identifier rubyid_query'>query</span><span
|
1052
|
-
class='lparen'>(</span><span
|
1053
|
-
class='op'>&amp;</span><span class='id
|
1054
|
-
identifier rubyid_block'>block</span><span
|
1055
|
-
class='rparen'>)</span></p>
|
1056
|
-
|
1057
|
-
<pre><span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_query_func'>query_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span></pre>
|
1058
|
-
|
1059
|
-
<p><span class='kw'>end</span></pre></p>
|
1060
|
-
|
1061
|
-
<pre> </td>
|
1062
|
-
</tr></pre>
|
1063
|
-
|
1064
|
-
<p></table> </div></p>
|
1065
|
-
|
1066
|
-
<pre> <div class="method_details ">
|
1067
|
-
<h3 class="signature " id="recurrence-instance_method">
|
1068
|
-
|
1069
|
-
- (<tt>Object</tt>) <strong>recurrence</strong>(&amp;block)</pre>
|
1070
|
-
|
1071
|
-
<p></h3><table class=“source_code”></p>
|
1072
|
-
|
1073
|
-
<pre><tr>
|
1074
|
-
<td>
|
1075
|
-
<pre class="lines"></pre>
|
1076
|
-
|
1077
|
-
<p>48 49 50</pre></p>
|
1078
|
-
|
1079
|
-
<pre></td>
|
1080
|
-
<td>
|
1081
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 48</span></pre>
|
1082
|
-
|
1083
|
-
<p><span class='kw'>def</span> <span class='id
|
1084
|
-
identifier rubyid_recurrence'>recurrence</span><span
|
1085
|
-
class='lparen'>(</span><span
|
1086
|
-
class='op'>&amp;</span><span class='id
|
1087
|
-
identifier rubyid_block'>block</span><span
|
1088
|
-
class='rparen'>)</span></p>
|
1089
|
-
|
1090
|
-
<pre><span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_recurrence_func'>recurrence_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span></pre>
|
1091
|
-
|
1092
|
-
<p><span class='kw'>end</span></pre></p>
|
1093
|
-
|
1094
|
-
<pre> </td>
|
1095
|
-
</tr></pre>
|
1096
|
-
|
1097
|
-
<p></table> </div></p>
|
1098
|
-
|
1099
|
-
<pre> <div class="method_details ">
|
1100
|
-
<h3 class="signature " id="report-instance_method">
|
1101
|
-
|
1102
|
-
- (<tt>Object</tt>) <strong>report</strong>(&amp;block)</pre>
|
1103
|
-
|
1104
|
-
<p></h3><div class=“docstring”></p>
|
1105
|
-
|
1106
|
-
<pre><div class="discussion"></pre>
|
1107
|
-
|
1108
|
-
<p><p>Report on evaluations</p></p>
|
1109
|
-
|
1110
|
-
<pre></div></pre>
|
1111
|
-
|
1112
|
-
<p></div> <div class=“tags”></p>
|
1113
|
-
|
1114
|
-
<p></div><table class=“source_code”></p>
|
1115
|
-
|
1116
|
-
<pre><tr>
|
1117
|
-
<td>
|
1118
|
-
<pre class="lines"></pre>
|
1119
|
-
|
1120
|
-
<p>103 104 105</pre></p>
|
1121
|
-
|
1122
|
-
<pre></td>
|
1123
|
-
<td>
|
1124
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 103</span></pre>
|
1125
|
-
|
1126
|
-
<p><span class='kw'>def</span> <span class='id
|
1127
|
-
identifier rubyid_report'>report</span><span
|
1128
|
-
class='lparen'>(</span><span
|
1129
|
-
class='op'>&amp;</span><span class='id
|
1130
|
-
identifier rubyid_block'>block</span><span
|
1131
|
-
class='rparen'>)</span></p>
|
1132
|
-
|
1133
|
-
<pre><span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_report_hook'>report_hook</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span></pre>
|
1134
|
-
|
1135
|
-
<p><span class='kw'>end</span></pre></p>
|
1136
|
-
|
1137
|
-
<pre> </td>
|
1138
|
-
</tr></pre>
|
1139
|
-
|
1140
|
-
<p></table> </div></p>
|
1141
|
-
|
1142
|
-
<pre> <div class="method_details ">
|
1143
|
-
<h3 class="signature " id="run_engine-instance_method">
|
1144
|
-
|
1145
|
-
- (<tt>Object</tt>) <strong>run_engine</strong>(&amp;block)</pre>
|
1146
|
-
|
1147
|
-
<p></h3><div class=“docstring”></p>
|
1148
|
-
|
1149
|
-
<pre><div class="discussion"></pre>
|
1150
|
-
|
1151
|
-
<p><p>Run the engine. The block is called on each generation.</p></p>
|
1152
|
-
|
1153
|
-
<pre></div></pre>
|
1154
|
-
|
1155
|
-
<p></div> <div class=“tags”></p>
|
1156
|
-
|
1157
|
-
<p></div><table class=“source_code”></p>
|
1158
|
-
|
1159
|
-
<pre><tr>
|
1160
|
-
<td>
|
1161
|
-
<pre class="lines"></pre>
|
1162
|
-
|
1163
|
-
<p>108 109 110 111</pre></p>
|
1164
|
-
|
1165
|
-
<pre></td>
|
1166
|
-
<td>
|
1167
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 108</span></pre>
|
1168
|
-
|
1169
|
-
<p><span class='kw'>def</span> <span class='id
|
1170
|
-
identifier rubyid_run_engine'>run_engine</span><span
|
1171
|
-
class='lparen'>(</span><span
|
1172
|
-
class='op'>&amp;</span><span class='id
|
1173
|
-
identifier rubyid_block'>block</span><span
|
1174
|
-
class='rparen'>)</span></p>
|
1175
|
-
|
1176
|
-
<pre><span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_end_run_func'>end_run_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
|
1177
|
-
<span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span></pre>
|
1178
|
-
|
1179
|
-
<p><span class='kw'>end</span></pre></p>
|
1180
|
-
|
1181
|
-
<pre> </td>
|
1182
|
-
</tr></pre>
|
1183
|
-
|
1184
|
-
<p></table> </div></p>
|
1185
|
-
|
1186
|
-
<pre> <div class="method_details ">
|
1187
|
-
<h3 class="signature " id="simple_fitness_error-instance_method">
|
1188
|
-
|
1189
|
-
- (<tt>Object</tt>) <strong>simple_fitness_error</strong>(v1, v2)</pre>
|
1190
|
-
|
1191
|
-
<p></h3><div class=“docstring”></p>
|
1192
|
-
|
1193
|
-
<pre><div class="discussion"></pre>
|
1194
|
-
|
1195
|
-
<p><p>Helper function to do a simple fitness calculation on the basis of
|
1196
|
-
the sum of the square of the diffences of the element in the two
|
1197
|
-
vectors.</p></p>
|
1198
|
-
|
1199
|
-
<pre></div></pre>
|
1200
|
-
|
1201
|
-
<p></div> <div class=“tags”></p>
|
1202
|
-
|
1203
|
-
<p></div><table class=“source_code”></p>
|
1204
|
-
|
1205
|
-
<pre><tr>
|
1206
|
-
<td>
|
1207
|
-
<pre class="lines"></pre>
|
1208
|
-
|
1209
|
-
<p>95 96 97</pre></p>
|
1210
|
-
|
1211
|
-
<pre></td>
|
1212
|
-
<td>
|
1213
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 95</span></pre>
|
1214
|
-
|
1215
|
-
<p><span class='kw'>def</span> <span class='id
|
1216
|
-
identifier
|
1217
|
-
rubyid_simple_fitness_error'>simple_fitness_error</span><span
|
1218
|
-
class='lparen'>(</span><span class='id identifier
|
1219
|
-
rubyid_v1'>v1</span><span
|
1220
|
-
class='comma'>,</span> <span class='id identifier
|
1221
|
-
rubyid_v2'>v2</span><span
|
1222
|
-
class='rparen'>)</span></p>
|
1223
|
-
|
1224
|
-
<pre><span class='id identifier rubyid_sqrt'>sqrt</span> <span class='id identifier rubyid_v1'>v1</span><span class='period'>.</span><span class='id identifier rubyid_zip'>zip</span><span class='lparen'>(</span><span class='id identifier rubyid_v2'>v2</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span> <span class='id identifier rubyid_b'>b</span><span class='op'>|</span> <span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span> <span class='op'>-</span> <span class='id identifier rubyid_b'>b</span><span class='rparen'>)</span> <span class='op'>**</span> <span class='float'>2.0</span><span class='rbrace'>}</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_m'>m</span><span class='comma'>,</span> <span class='id identifier rubyid_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_m'>m</span> <span class='op'>+</span> <span class='id identifier rubyid_c'>c</span><span class='rbrace'>}</span></pre>
|
1225
|
-
|
1226
|
-
<p><span class='kw'>end</span></pre></p>
|
1227
|
-
|
1228
|
-
<pre> </td>
|
1229
|
-
</tr></pre>
|
1230
|
-
|
1231
|
-
<p></table> </div></p>
|
1232
|
-
|
1233
|
-
<pre> <div class="method_details ">
|
1234
|
-
<h3 class="signature " id="stop_on_fitness-instance_method">
|
1235
|
-
|
1236
|
-
- (<tt>Object</tt>) <strong>stop_on_fitness</strong>(&amp;block)</pre>
|
1237
|
-
|
1238
|
-
<p></h3><div class=“docstring”></p>
|
1239
|
-
|
1240
|
-
<pre><div class="discussion"></pre>
|
1241
|
-
|
1242
|
-
<p><p>Stop the progression once the fitness criteria is reached for the
|
1243
|
-
most fit critter</p></p>
|
1244
|
-
|
1245
|
-
<pre></div></pre>
|
1246
|
-
|
1247
|
-
<p></div> <div class=“tags”></p>
|
1248
|
-
|
1249
|
-
<p></div><table class=“source_code”></p>
|
1250
|
-
|
1251
|
-
<pre><tr>
|
1252
|
-
<td>
|
1253
|
-
<pre class="lines"></pre>
|
1254
|
-
|
1255
|
-
<p>75 76 77</pre></p>
|
1256
|
-
|
1257
|
-
<pre></td>
|
1258
|
-
<td>
|
1259
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 75</span></pre>
|
1260
|
-
|
1261
|
-
<p><span class='kw'>def</span> <span class='id
|
1262
|
-
identifier
|
1263
|
-
rubyid_stop_on_fitness'>stop_on_fitness</span><span
|
1264
|
-
class='lparen'>(</span><span
|
1265
|
-
class='op'>&amp;</span><span class='id
|
1266
|
-
identifier rubyid_block'>block</span><span
|
1267
|
-
class='rparen'>)</span></p>
|
1268
|
-
|
1269
|
-
<pre><span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_stop_on_fit_func'>stop_on_fit_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span></pre>
|
1270
|
-
|
1271
|
-
<p><span class='kw'>end</span></pre></p>
|
1272
|
-
|
1273
|
-
<pre> </td>
|
1274
|
-
</tr></pre>
|
1275
|
-
|
1276
|
-
<p></table> </div></p>
|
1277
|
-
|
1278
|
-
<pre> <div class="method_details ">
|
1279
|
-
<h3 class="signature " id="uncondition_boolean_vector-instance_method">
|
1280
|
-
|
1281
|
-
- (<tt>Object</tt>) <strong>uncondition_boolean_vector</strong>(vec, sig = :tanh)</pre>
|
1282
|
-
|
1283
|
-
<p></h3><div class=“docstring”></p>
|
1284
|
-
|
1285
|
-
<pre><div class="discussion"></pre>
|
1286
|
-
|
1287
|
-
<p><p>Helper function to Uncondition boolean vectors to be +1 if true,
|
1288
|
-
-1 if false FIXME we need a better discrimination function</p></p>
|
1289
|
-
|
1290
|
-
<pre></div></pre>
|
1291
|
-
|
1292
|
-
<p></div> <div class=“tags”></p>
|
1293
|
-
|
1294
|
-
<p></div><table class=“source_code”></p>
|
1295
|
-
|
1296
|
-
<pre><tr>
|
1297
|
-
<td>
|
1298
|
-
<pre class="lines"></pre>
|
1299
|
-
|
1300
|
-
<p>88 89 90</pre></p>
|
1301
|
-
|
1302
|
-
<pre></td>
|
1303
|
-
<td>
|
1304
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 88</span></pre>
|
1305
|
-
|
1306
|
-
<p><span class='kw'>def</span> <span class='id
|
1307
|
-
identifier
|
1308
|
-
rubyid_uncondition_boolean_vector'>uncondition_boolean_vector</span><span
|
1309
|
-
class='lparen'>(</span><span class='id identifier
|
1310
|
-
rubyid_vec'>vec</span><span
|
1311
|
-
class='comma'>,</span> <span class='id identifier
|
1312
|
-
rubyid_sig'>sig</span> <span
|
1313
|
-
class='op'>=</span> <span
|
1314
|
-
class='symbol'>:tanh</span><span
|
1315
|
-
class='rparen'>)</span></p>
|
1316
|
-
|
1317
|
-
<pre><span class='id identifier rubyid_vec'>vec</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_o'>o</span><span class='op'>|</span> <span class='id identifier rubyid_o'>o</span> <span class='op'>&gt;</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_sig'>sig</span> <span class='op'>==</span> <span class='symbol'>:sigmoid</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='float'>0.5</span> <span class='op'>:</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span><span class='rbrace'>}</span></pre>
|
1318
|
-
|
1319
|
-
<p><span class='kw'>end</span></pre></p>
|
1320
|
-
|
1321
|
-
<pre> </td>
|
1322
|
-
</tr></pre>
|
1323
|
-
|
1324
|
-
<p></table> </div></p>
|
1325
|
-
|
1326
|
-
<pre></div></pre>
|
1327
|
-
|
1328
|
-
<p></div></p>
|
1329
|
-
|
1330
|
-
<pre> <div id="footer">
|
1331
|
-
Generated on Sun Mar 16 16:36:51 2014 by
|
1332
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1333
|
-
0.8.7.3 (ruby-2.1.1).</pre>
|
1334
|
-
|
1335
|
-
<p></div></p>
|
1336
|
-
|
1337
|
-
<pre></body></pre>
|
1338
|
-
|
1339
|
-
<p></html></p>
|
1340
|
-
</main>
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
<footer id="validator-badges" role="contentinfo">
|
1345
|
-
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
1346
|
-
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
1347
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
1348
|
-
</footer>
|
1349
|
-
|