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
@@ -1,997 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>Gene.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/Critter/Genotype/Gene.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>Class: NEAT::Critter::Genotype::Gene
|
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 (G)</a> &raquo;
|
219
|
-
<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="../../Critter.html" title="NEAT::Critter (class)">Critter</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Genotype.html" title="NEAT::Critter::Genotype (class)">Genotype</a></span></span>
|
220
|
-
&raquo;
|
221
|
-
<span class="title">Gene</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>Class: NEAT::Critter::Genotype::Gene</pre>
|
252
|
-
|
253
|
-
<p></h1></p>
|
254
|
-
|
255
|
-
<p><dl class=“box”></p>
|
256
|
-
|
257
|
-
<pre><dt class="r1">Inherits:</dt>
|
258
|
-
<dd class="r1">
|
259
|
-
<span class="inheritName"><span class='object_link'><a href="../../NeatOb.html" title="NEAT::NeatOb (class)">NeatOb</a></span></span>
|
260
|
-
|
261
|
-
<ul class="fullTree">
|
262
|
-
<li>Object</li>
|
263
|
-
|
264
|
-
<li class="next"><span class='object_link'><a href="../../NeatOb.html" title="NEAT::NeatOb (class)">NeatOb</a></span></li>
|
265
|
-
|
266
|
-
<li class="next">NEAT::Critter::Genotype::Gene</li>
|
267
|
-
|
268
|
-
</ul>
|
269
|
-
<a href="#" class="inheritanceTree">show all</a>
|
270
|
-
|
271
|
-
</dd>
|
272
|
-
|
273
|
-
<dt class="r2 last">Defined in:</dt>
|
274
|
-
<dd class="r2 last">lib/rubyneat/critter.rb</dd></pre>
|
275
|
-
|
276
|
-
<p></dl> <div class=“clear”></div></p>
|
277
|
-
|
278
|
-
<p><h2>Overview</h2><div class=“docstring”></p>
|
279
|
-
|
280
|
-
<pre><div class="discussion"></pre>
|
281
|
-
|
282
|
-
<p><h1 id=“label-Gene+Specification”>Gene Specification</h1></p>
|
283
|
-
|
284
|
-
<p><p>The Gene specifices a singlular input and output neuron, which
|
285
|
-
represents a connection between them, along with the weight of that
|
286
|
-
connection, which may be positive, negative, or zero.</p></p>
|
287
|
-
|
288
|
-
<p><p>There is also the enabled flag</p></p>
|
289
|
-
|
290
|
-
<pre></div></pre>
|
291
|
-
|
292
|
-
<p></div> <div class=“tags”></p>
|
293
|
-
|
294
|
-
<p></div></p>
|
295
|
-
|
296
|
-
<pre><h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
297
|
-
<ul class="summary">
|
298
|
-
|
299
|
-
<li class="public ">
|
300
|
-
<span class="summary_signature">
|
301
|
-
|
302
|
-
<a href="#enabled-instance_method" title="#enabled (instance method)">- (Object) <strong>enabled</strong> </a>
|
303
|
-
|
304
|
-
</span>
|
305
|
-
|
306
|
-
<span class="summary_desc"><div class='inline'></pre>
|
307
|
-
|
308
|
-
<p><p>Is this gene enabled?.</p> </div></span></p>
|
309
|
-
|
310
|
-
<p></li></p>
|
311
|
-
|
312
|
-
<pre> <li class="public ">
|
313
|
-
<span class="summary_signature">
|
314
|
-
|
315
|
-
<a href="#genotype-instance_method" title="#genotype (instance method)">- (Object) <strong>genotype</strong> </a>
|
316
|
-
|
317
|
-
</span>
|
318
|
-
|
319
|
-
<span class="summary_desc"><div class='inline'></pre>
|
320
|
-
|
321
|
-
<p><p>parent genotype.</p> </div></span></p>
|
322
|
-
|
323
|
-
<p></li></p>
|
324
|
-
|
325
|
-
<pre> <li class="public ">
|
326
|
-
<span class="summary_signature">
|
327
|
-
|
328
|
-
<a href="#in_neuron-instance_method" title="#in_neuron (instance method)">- (Object) <strong>in_neuron</strong> </a>
|
329
|
-
|
330
|
-
</span>
|
331
|
-
|
332
|
-
<span class="summary_desc"><div class='inline'></pre>
|
333
|
-
|
334
|
-
<p><p>input neuron&#39;s name (where our output goes) ouptut
|
335
|
-
neuron&#39;s name (neuron to be queried).</p>
|
336
|
-
</div></span></p>
|
337
|
-
|
338
|
-
<p></li></p>
|
339
|
-
|
340
|
-
<pre> <li class="public ">
|
341
|
-
<span class="summary_signature">
|
342
|
-
|
343
|
-
<a href="#innovation-instance_method" title="#innovation (instance method)">- (Object) <strong>innovation</strong> </a>
|
344
|
-
|
345
|
-
</span>
|
346
|
-
|
347
|
-
<span class="summary_desc"><div class='inline'></pre>
|
348
|
-
|
349
|
-
<p><p>innovation number.</p> </div></span></p>
|
350
|
-
|
351
|
-
<p></li></p>
|
352
|
-
|
353
|
-
<pre> <li class="public ">
|
354
|
-
<span class="summary_signature">
|
355
|
-
|
356
|
-
<a href="#out_neuron-instance_method" title="#out_neuron (instance method)">- (Object) <strong>out_neuron</strong> </a>
|
357
|
-
|
358
|
-
</span>
|
359
|
-
|
360
|
-
<span class="summary_desc"><div class='inline'></pre>
|
361
|
-
|
362
|
-
<p><p>input neuron&#39;s name (where our output goes) ouptut
|
363
|
-
neuron&#39;s name (neuron to be queried).</p>
|
364
|
-
</div></span></p>
|
365
|
-
|
366
|
-
<p></li></p>
|
367
|
-
|
368
|
-
<pre> <li class="public ">
|
369
|
-
<span class="summary_signature">
|
370
|
-
|
371
|
-
<a href="#weight-instance_method" title="#weight (instance method)">- (Object) <strong>weight</strong> </a>
|
372
|
-
|
373
|
-
</span>
|
374
|
-
|
375
|
-
<span class="summary_desc"><div class='inline'></pre>
|
376
|
-
|
377
|
-
<p><p>weight of the connection.</p> </div></span></p>
|
378
|
-
|
379
|
-
<p></li></p>
|
380
|
-
|
381
|
-
<pre class="ruby"><span class="ruby-operator"><</span><span class="ruby-regexp">/ul>
|
382
|
-
|
383
|
-
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../</span><span class="ruby-operator">..</span><span class="ruby-regexp">/NeatOb.html" title="NEAT::NeatOb (class)">NeatOb</</span><span class="ruby-identifier">a</span><span class="ruby-operator">></span><span class="ruby-operator"><</span><span class="ruby-regexp">/span></</span><span class="ruby-identifier">h3</span><span class="ruby-operator">></span>
|
384
|
-
<span class="ruby-operator"><</span><span class="ruby-identifier">p</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">"inherited"</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">'object_link'</span><span class="ruby-operator">></span><span class="ruby-operator"><</span><span class="ruby-identifier">a</span> <span class="ruby-identifier">href</span>=<span class="ruby-node">"../../NeatOb.html#controller-instance_method"</span> <span class="ruby-identifier">title</span>=<span class="ruby-node">"NEAT::NeatOb#controller (method)"</span><span class="ruby-operator">></span><span class="ruby-comment">#controller</a></span>, <span class='object_link'><a href="../../NeatOb.html#name-instance_method" title="NEAT::NeatOb#name (method)">#name</a></span></p></span>
|
385
|
-
|
386
|
-
<span class="ruby-operator"><</span><span class="ruby-identifier">h2</span><span class="ruby-operator">></span>
|
387
|
-
<span class="ruby-constant">Class</span> <span class="ruby-constant">Method</span> <span class="ruby-constant">Summary</span>
|
388
|
-
<span class="ruby-operator"><</span><span class="ruby-identifier">small</span><span class="ruby-operator">></span>(<span class="ruby-operator"><</span><span class="ruby-identifier">a</span> <span class="ruby-identifier">href</span>=<span class="ruby-node">"#"</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">"summary_toggle"</span><span class="ruby-operator">></span><span class="ruby-identifier">collapse</span><span class="ruby-operator"><</span><span class="ruby-regexp">/a>)</sm</span><span class="ruby-identifier">all</span><span class="ruby-operator">></span>
|
389
|
-
<span class="ruby-operator"><</span><span class="ruby-node">/h2>
|
390
|
-
|
391
|
-
<ul class="summary">
|
392
|
-
|
393
|
-
<li class="public ">
|
394
|
-
<span class="summary_signature">
|
395
|
-
|
396
|
-
<a href="#%5B%5D-class_method" title="[] (class method)">+ (Object) <strong>[]</s</span><span class="ruby-identifier">trong</span><span class="ruby-operator">></span>(<span class="ruby-identifier">genotype</span>, <span class="ruby-identifier">input</span>, <span class="ruby-identifier">output</span>, <span class="ruby-identifier">weight</span> = <span class="ruby-value">0.0</span>, <span class="ruby-identifier">innov</span> = <span class="ruby-keyword">nil</span>) <span class="ruby-operator"><</span><span class="ruby-regexp">/a>
|
397
|
-
|
398
|
-
</s</span><span class="ruby-identifier">pan</span><span class="ruby-operator">></span>
|
399
|
-
|
400
|
-
<span class="ruby-operator"><</span><span class="ruby-identifier">span</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">"summary_desc"</span><span class="ruby-operator">></span><span class="ruby-operator"><</span><span class="ruby-identifier">div</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">'inline'</span><span class="ruby-operator">></span>
|
401
|
-
</pre>
|
402
|
-
|
403
|
-
<p><p>Create a new Gene and set it up fully.</p>
|
404
|
-
</div></span></p>
|
405
|
-
|
406
|
-
<p></li></p>
|
407
|
-
|
408
|
-
<pre> </ul>
|
409
|
-
|
410
|
-
<h2>
|
411
|
-
Instance Method Summary
|
412
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
413
|
-
</h2>
|
414
|
-
|
415
|
-
<ul class="summary">
|
416
|
-
|
417
|
-
<li class="public ">
|
418
|
-
<span class="summary_signature">
|
419
|
-
|
420
|
-
<a href="#disabled%3F-instance_method" title="#disabled? (instance method)">- (Boolean) <strong>disabled?</strong> </a>
|
421
|
-
|
422
|
-
</span>
|
423
|
-
|
424
|
-
<span class="summary_desc"><div class='inline'></div></span></pre>
|
425
|
-
|
426
|
-
<p></li></p>
|
427
|
-
|
428
|
-
<pre> <li class="public ">
|
429
|
-
<span class="summary_signature">
|
430
|
-
|
431
|
-
<a href="#enabled%3F-instance_method" title="#enabled? (instance method)">- (Boolean) <strong>enabled?</strong> </a>
|
432
|
-
|
433
|
-
</span>
|
434
|
-
|
435
|
-
<span class="summary_desc"><div class='inline'></div></span></pre>
|
436
|
-
|
437
|
-
<p></li></p>
|
438
|
-
|
439
|
-
<pre> <li class="public ">
|
440
|
-
<span class="summary_signature">
|
441
|
-
|
442
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Gene) <strong>initialize</strong>(genotype, &amp;block) </a>
|
443
|
-
|
444
|
-
</span>
|
445
|
-
|
446
|
-
<span class="note title constructor">constructor</span>
|
447
|
-
|
448
|
-
<span class="summary_desc"><div class='inline'></pre>
|
449
|
-
|
450
|
-
<p><p>A new instance of Gene.</p> </div></span></p>
|
451
|
-
|
452
|
-
<p></li></p>
|
453
|
-
|
454
|
-
<pre> <li class="public ">
|
455
|
-
<span class="summary_signature">
|
456
|
-
|
457
|
-
<a href="#to_s-instance_method" title="#to_s (instance method)">- (Object) <strong>to_s</strong> </a>
|
458
|
-
|
459
|
-
(also: #dump_s)
|
460
|
-
|
461
|
-
</span>
|
462
|
-
|
463
|
-
<span class="summary_desc"><div class='inline'></div></span></pre>
|
464
|
-
|
465
|
-
<p></li></p>
|
466
|
-
|
467
|
-
<pre> </ul>
|
468
|
-
|
469
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../../NeatOb.html" title="NEAT::NeatOb (class)">NeatOb</a></span></h3>
|
470
|
-
<p class="inherited"><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></p>
|
471
|
-
|
472
|
-
<div id="constructor_details" class="method_details_list">
|
473
|
-
<h2>Constructor Details</h2>
|
474
|
-
|
475
|
-
<div class="method_details first">
|
476
|
-
<h3 class="signature first" id="initialize-instance_method">
|
477
|
-
|
478
|
-
- (<tt><span class='object_link'><a href="" title="NEAT::Critter::Genotype::Gene (class)">Gene</a></span></tt>) <strong>initialize</strong>(genotype, &amp;block)</pre>
|
479
|
-
|
480
|
-
<p></h3><div class=“docstring”></p>
|
481
|
-
|
482
|
-
<pre><div class="discussion"></pre>
|
483
|
-
|
484
|
-
<p><p>Returns a new instance of Gene</p></p>
|
485
|
-
|
486
|
-
<pre></div></pre>
|
487
|
-
|
488
|
-
<p></div> <div class=“tags”></p>
|
489
|
-
|
490
|
-
<p></div><table class=“source_code”></p>
|
491
|
-
|
492
|
-
<pre><tr>
|
493
|
-
<td>
|
494
|
-
<pre class="lines"></pre>
|
495
|
-
|
496
|
-
<p>247 248 249 250 251 252 253 254</pre></p>
|
497
|
-
|
498
|
-
<pre></td>
|
499
|
-
<td>
|
500
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/critter.rb', line 247</span></pre>
|
501
|
-
|
502
|
-
<p><span class='kw'>def</span> <span class='id
|
503
|
-
identifier rubyid_initialize'>initialize</span><span
|
504
|
-
class='lparen'>(</span><span class='id identifier
|
505
|
-
rubyid_genotype'>genotype</span><span
|
506
|
-
class='comma'>,</span> <span
|
507
|
-
class='op'>&amp;</span><span class='id
|
508
|
-
identifier rubyid_block'>block</span><span
|
509
|
-
class='rparen'>)</span></p>
|
510
|
-
|
511
|
-
<pre><span class='kw'>super</span> <span class='id identifier rubyid_genotype'>genotype</span><span class='period'>.</span><span class='id identifier rubyid_controller'>controller</span>
|
512
|
-
<span class='ivar'>@genotype</span> <span class='op'>=</span> <span class='id identifier rubyid_genotype'>genotype</span>
|
513
|
-
<span class='ivar'>@enabled</span> <span class='op'>=</span> <span class='kw'>true</span>
|
514
|
-
<span class='ivar'>@innovation</span> <span class='op'>=</span> <span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_new_innovation'>new_innovation</span>
|
515
|
-
<span class='ivar'>@in_neuron</span> <span class='op'>=</span> <span class='ivar'>@out_neuron</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
516
|
-
<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></pre>
|
517
|
-
|
518
|
-
<p><span class='kw'>end</span></pre></p>
|
519
|
-
|
520
|
-
<pre> </td>
|
521
|
-
</tr></pre>
|
522
|
-
|
523
|
-
<p></table> </div></p>
|
524
|
-
|
525
|
-
<p></div></p>
|
526
|
-
|
527
|
-
<pre><div id="instance_attr_details" class="attr_details">
|
528
|
-
<h2>Instance Attribute Details</h2>
|
529
|
-
|
530
|
-
<span id="enabled=-instance_method"></span>
|
531
|
-
<div class="method_details first">
|
532
|
-
<h3 class="signature first" id="enabled-instance_method">
|
533
|
-
|
534
|
-
- (<tt>Object</tt>) <strong>enabled</strong></pre>
|
535
|
-
|
536
|
-
<p></h3><div class=“docstring”></p>
|
537
|
-
|
538
|
-
<pre><div class="discussion"></pre>
|
539
|
-
|
540
|
-
<p><p>Is this gene enabled?</p></p>
|
541
|
-
|
542
|
-
<pre></div></pre>
|
543
|
-
|
544
|
-
<p></div> <div class=“tags”></p>
|
545
|
-
|
546
|
-
<p></div><table class=“source_code”></p>
|
547
|
-
|
548
|
-
<pre><tr>
|
549
|
-
<td>
|
550
|
-
<pre class="lines"></pre>
|
551
|
-
|
552
|
-
<p>245 246 247</pre></p>
|
553
|
-
|
554
|
-
<pre></td>
|
555
|
-
<td>
|
556
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/critter.rb', line 245</span></pre>
|
557
|
-
|
558
|
-
<p><span class='kw'>def</span> <span class='id
|
559
|
-
identifier rubyid_enabled'>enabled</span></p>
|
560
|
-
|
561
|
-
<pre><span class='ivar'>@enabled</span></pre>
|
562
|
-
|
563
|
-
<p><span class='kw'>end</span></pre></p>
|
564
|
-
|
565
|
-
<pre> </td>
|
566
|
-
</tr></pre>
|
567
|
-
|
568
|
-
<p></table> </div></p>
|
569
|
-
|
570
|
-
<pre> <span id="genotype=-instance_method"></span>
|
571
|
-
<div class="method_details ">
|
572
|
-
<h3 class="signature " id="genotype-instance_method">
|
573
|
-
|
574
|
-
- (<tt>Object</tt>) <strong>genotype</strong></pre>
|
575
|
-
|
576
|
-
<p></h3><div class=“docstring”></p>
|
577
|
-
|
578
|
-
<pre><div class="discussion"></pre>
|
579
|
-
|
580
|
-
<p><p>parent genotype</p></p>
|
581
|
-
|
582
|
-
<pre></div></pre>
|
583
|
-
|
584
|
-
<p></div> <div class=“tags”></p>
|
585
|
-
|
586
|
-
<p></div><table class=“source_code”></p>
|
587
|
-
|
588
|
-
<pre><tr>
|
589
|
-
<td>
|
590
|
-
<pre class="lines"></pre>
|
591
|
-
|
592
|
-
<p>233 234 235</pre></p>
|
593
|
-
|
594
|
-
<pre></td>
|
595
|
-
<td>
|
596
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/critter.rb', line 233</span></pre>
|
597
|
-
|
598
|
-
<p><span class='kw'>def</span> <span class='id
|
599
|
-
identifier rubyid_genotype'>genotype</span></p>
|
600
|
-
|
601
|
-
<pre><span class='ivar'>@genotype</span></pre>
|
602
|
-
|
603
|
-
<p><span class='kw'>end</span></pre></p>
|
604
|
-
|
605
|
-
<pre> </td>
|
606
|
-
</tr></pre>
|
607
|
-
|
608
|
-
<p></table> </div></p>
|
609
|
-
|
610
|
-
<pre> <span id="in_neuron=-instance_method"></span>
|
611
|
-
<div class="method_details ">
|
612
|
-
<h3 class="signature " id="in_neuron-instance_method">
|
613
|
-
|
614
|
-
- (<tt>Object</tt>) <strong>in_neuron</strong></pre>
|
615
|
-
|
616
|
-
<p></h3><div class=“docstring”></p>
|
617
|
-
|
618
|
-
<pre><div class="discussion"></pre>
|
619
|
-
|
620
|
-
<p><p>input neuron&#39;s name (where our output goes) ouptut
|
621
|
-
neuron&#39;s name (neuron to be queried)</p></p>
|
622
|
-
|
623
|
-
<pre></div></pre>
|
624
|
-
|
625
|
-
<p></div> <div class=“tags”></p>
|
626
|
-
|
627
|
-
<p></div><table class=“source_code”></p>
|
628
|
-
|
629
|
-
<pre><tr>
|
630
|
-
<td>
|
631
|
-
<pre class="lines"></pre>
|
632
|
-
|
633
|
-
<p>240 241 242</pre></p>
|
634
|
-
|
635
|
-
<pre></td>
|
636
|
-
<td>
|
637
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/critter.rb', line 240</span></pre>
|
638
|
-
|
639
|
-
<p><span class='kw'>def</span> <span class='id
|
640
|
-
identifier rubyid_in_neuron'>in_neuron</span></p>
|
641
|
-
|
642
|
-
<pre><span class='ivar'>@in_neuron</span></pre>
|
643
|
-
|
644
|
-
<p><span class='kw'>end</span></pre></p>
|
645
|
-
|
646
|
-
<pre> </td>
|
647
|
-
</tr></pre>
|
648
|
-
|
649
|
-
<p></table> </div></p>
|
650
|
-
|
651
|
-
<pre> <span id="innovation=-instance_method"></span>
|
652
|
-
<div class="method_details ">
|
653
|
-
<h3 class="signature " id="innovation-instance_method">
|
654
|
-
|
655
|
-
- (<tt>Object</tt>) <strong>innovation</strong></pre>
|
656
|
-
|
657
|
-
<p></h3><div class=“docstring”></p>
|
658
|
-
|
659
|
-
<pre><div class="discussion"></pre>
|
660
|
-
|
661
|
-
<p><p>innovation number</p></p>
|
662
|
-
|
663
|
-
<pre></div></pre>
|
664
|
-
|
665
|
-
<p></div> <div class=“tags”></p>
|
666
|
-
|
667
|
-
<p></div><table class=“source_code”></p>
|
668
|
-
|
669
|
-
<pre><tr>
|
670
|
-
<td>
|
671
|
-
<pre class="lines"></pre>
|
672
|
-
|
673
|
-
<p>236 237 238</pre></p>
|
674
|
-
|
675
|
-
<pre></td>
|
676
|
-
<td>
|
677
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/critter.rb', line 236</span></pre>
|
678
|
-
|
679
|
-
<p><span class='kw'>def</span> <span class='id
|
680
|
-
identifier rubyid_innovation'>innovation</span></p>
|
681
|
-
|
682
|
-
<pre><span class='ivar'>@innovation</span></pre>
|
683
|
-
|
684
|
-
<p><span class='kw'>end</span></pre></p>
|
685
|
-
|
686
|
-
<pre> </td>
|
687
|
-
</tr></pre>
|
688
|
-
|
689
|
-
<p></table> </div></p>
|
690
|
-
|
691
|
-
<pre> <span id="out_neuron=-instance_method"></span>
|
692
|
-
<div class="method_details ">
|
693
|
-
<h3 class="signature " id="out_neuron-instance_method">
|
694
|
-
|
695
|
-
- (<tt>Object</tt>) <strong>out_neuron</strong></pre>
|
696
|
-
|
697
|
-
<p></h3><div class=“docstring”></p>
|
698
|
-
|
699
|
-
<pre><div class="discussion"></pre>
|
700
|
-
|
701
|
-
<p><p>input neuron&#39;s name (where our output goes) ouptut
|
702
|
-
neuron&#39;s name (neuron to be queried)</p></p>
|
703
|
-
|
704
|
-
<pre></div></pre>
|
705
|
-
|
706
|
-
<p></div> <div class=“tags”></p>
|
707
|
-
|
708
|
-
<p></div><table class=“source_code”></p>
|
709
|
-
|
710
|
-
<pre><tr>
|
711
|
-
<td>
|
712
|
-
<pre class="lines"></pre>
|
713
|
-
|
714
|
-
<p>240 241 242</pre></p>
|
715
|
-
|
716
|
-
<pre></td>
|
717
|
-
<td>
|
718
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/critter.rb', line 240</span></pre>
|
719
|
-
|
720
|
-
<p><span class='kw'>def</span> <span class='id
|
721
|
-
identifier rubyid_out_neuron'>out_neuron</span></p>
|
722
|
-
|
723
|
-
<pre><span class='ivar'>@out_neuron</span></pre>
|
724
|
-
|
725
|
-
<p><span class='kw'>end</span></pre></p>
|
726
|
-
|
727
|
-
<pre> </td>
|
728
|
-
</tr></pre>
|
729
|
-
|
730
|
-
<p></table> </div></p>
|
731
|
-
|
732
|
-
<pre> <span id="weight=-instance_method"></span>
|
733
|
-
<div class="method_details ">
|
734
|
-
<h3 class="signature " id="weight-instance_method">
|
735
|
-
|
736
|
-
- (<tt>Object</tt>) <strong>weight</strong></pre>
|
737
|
-
|
738
|
-
<p></h3><div class=“docstring”></p>
|
739
|
-
|
740
|
-
<pre><div class="discussion"></pre>
|
741
|
-
|
742
|
-
<p><p>weight of the connection</p></p>
|
743
|
-
|
744
|
-
<pre></div></pre>
|
745
|
-
|
746
|
-
<p></div> <div class=“tags”></p>
|
747
|
-
|
748
|
-
<p></div><table class=“source_code”></p>
|
749
|
-
|
750
|
-
<pre><tr>
|
751
|
-
<td>
|
752
|
-
<pre class="lines"></pre>
|
753
|
-
|
754
|
-
<p>243 244 245</pre></p>
|
755
|
-
|
756
|
-
<pre></td>
|
757
|
-
<td>
|
758
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/critter.rb', line 243</span></pre>
|
759
|
-
|
760
|
-
<p><span class='kw'>def</span> <span class='id
|
761
|
-
identifier rubyid_weight'>weight</span></p>
|
762
|
-
|
763
|
-
<pre><span class='ivar'>@weight</span></pre>
|
764
|
-
|
765
|
-
<p><span class='kw'>end</span></pre></p>
|
766
|
-
|
767
|
-
<pre> </td>
|
768
|
-
</tr></pre>
|
769
|
-
|
770
|
-
<p></table> </div></p>
|
771
|
-
|
772
|
-
<pre></div>
|
773
|
-
|
774
|
-
<div id="class_method_details" class="method_details_list">
|
775
|
-
<h2>Class Method Details</h2>
|
776
|
-
|
777
|
-
<div class="method_details first">
|
778
|
-
<h3 class="signature first" id="[]-class_method">
|
779
|
-
|
780
|
-
+ (<tt>Object</tt>) <strong>[]</strong>(genotype, input, output, weight = 0.0, innov = nil)</pre>
|
781
|
-
|
782
|
-
<p></h3><div class=“docstring”></p>
|
783
|
-
|
784
|
-
<pre><div class="discussion"></pre>
|
785
|
-
|
786
|
-
<p><p>Create a new Gene and set it up fully. genotype – genotype input –
|
787
|
-
name of input neuron connection output – name of output neuron connection
|
788
|
-
weight – weight to give neuron (optional) innov – innovation number of gene
|
789
|
-
(optional)</p></p>
|
790
|
-
|
791
|
-
<pre></div></pre>
|
792
|
-
|
793
|
-
<p></div> <div class=“tags”></p>
|
794
|
-
|
795
|
-
<p></div><table class=“source_code”></p>
|
796
|
-
|
797
|
-
<pre><tr>
|
798
|
-
<td>
|
799
|
-
<pre class="lines"></pre>
|
800
|
-
|
801
|
-
<p>265 266 267 268 269 270 271 272</pre></p>
|
802
|
-
|
803
|
-
<pre></td>
|
804
|
-
<td>
|
805
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/critter.rb', line 265</span></pre>
|
806
|
-
|
807
|
-
<p><span class='kw'>def</span> <span
|
808
|
-
class='kw'>self</span><span
|
809
|
-
class='period'>.</span><span
|
810
|
-
class='op'>[]</span><span
|
811
|
-
class='lparen'>(</span><span class='id identifier
|
812
|
-
rubyid_genotype'>genotype</span><span
|
813
|
-
class='comma'>,</span> <span class='id identifier
|
814
|
-
rubyid_input'>input</span><span
|
815
|
-
class='comma'>,</span> <span class='id identifier
|
816
|
-
rubyid_output'>output</span><span
|
817
|
-
class='comma'>,</span> <span class='id identifier
|
818
|
-
rubyid_weight'>weight</span> <span
|
819
|
-
class='op'>=</span> <span
|
820
|
-
class='float'>0.0</span><span
|
821
|
-
class='comma'>,</span> <span class='id identifier
|
822
|
-
rubyid_innov'>innov</span> <span
|
823
|
-
class='op'>=</span> <span
|
824
|
-
class='kw'>nil</span><span
|
825
|
-
class='rparen'>)</span></p>
|
826
|
-
|
827
|
-
<pre><span class='id identifier rubyid_g'>g</span> <span class='op'>=</span> <span class='const'>Gene</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_genotype'>genotype</span>
|
828
|
-
<span class='id identifier rubyid_g'>g</span><span class='period'>.</span><span class='id identifier rubyid_in_neuron'>in_neuron</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='const'>Symbol</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_input'>input</span> <span class='op'>:</span> <span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
|
829
|
-
<span class='id identifier rubyid_g'>g</span><span class='period'>.</span><span class='id identifier rubyid_out_neuron'>out_neuron</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_output'>output</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='const'>Symbol</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_output'>output</span> <span class='op'>:</span> <span class='id identifier rubyid_output'>output</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
|
830
|
-
<span class='id identifier rubyid_g'>g</span><span class='period'>.</span><span class='id identifier rubyid_weight'>weight</span> <span class='op'>=</span> <span class='id identifier rubyid_weight'>weight</span>
|
831
|
-
<span class='id identifier rubyid_g'>g</span><span class='period'>.</span><span class='id identifier rubyid_innovation'>innovation</span> <span class='op'>=</span> <span class='id identifier rubyid_innov'>innov</span> <span class='kw'>unless</span> <span class='id identifier rubyid_innov'>innov</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
832
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_g'>g</span></pre>
|
833
|
-
|
834
|
-
<p><span class='kw'>end</span></pre></p>
|
835
|
-
|
836
|
-
<pre> </td>
|
837
|
-
</tr></pre>
|
838
|
-
|
839
|
-
<p></table> </div></p>
|
840
|
-
|
841
|
-
<pre></div>
|
842
|
-
|
843
|
-
<div id="instance_method_details" class="method_details_list">
|
844
|
-
<h2>Instance Method Details</h2>
|
845
|
-
|
846
|
-
<div class="method_details first">
|
847
|
-
<h3 class="signature first" id="disabled?-instance_method">
|
848
|
-
|
849
|
-
- (<tt>Boolean</tt>) <strong>disabled?</strong></pre>
|
850
|
-
|
851
|
-
<p></h3><div class=“docstring”></p>
|
852
|
-
|
853
|
-
<pre><div class="discussion">
|
854
|
-
|
855
|
-
</div></pre>
|
856
|
-
|
857
|
-
<p></div> <div class=“tags”></p>
|
858
|
-
|
859
|
-
<p><p class=“tag_title”>Returns:</p> <ul class=“return”></p>
|
860
|
-
|
861
|
-
<pre><li>
|
862
|
-
|
863
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
864
|
-
|
865
|
-
</li></pre>
|
866
|
-
|
867
|
-
<p></ul></p>
|
868
|
-
|
869
|
-
<p></div><table class=“source_code”></p>
|
870
|
-
|
871
|
-
<pre><tr>
|
872
|
-
<td>
|
873
|
-
<pre class="lines"></pre>
|
874
|
-
|
875
|
-
<p>257</pre></p>
|
876
|
-
|
877
|
-
<pre></td>
|
878
|
-
<td>
|
879
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/critter.rb', line 257</span></pre>
|
880
|
-
|
881
|
-
<p><span class='kw'>def</span> <span class='id
|
882
|
-
identifier rubyid_disabled?'>disabled?</span> <span
|
883
|
-
class='semicolon'>;</span> <span
|
884
|
-
class='kw'>not</span> <span class='id identifier
|
885
|
-
rubyid_enabled?'>enabled?</span> <span
|
886
|
-
class='semicolon'>;</span> <span
|
887
|
-
class='kw'>end</span></pre></p>
|
888
|
-
|
889
|
-
<pre> </td>
|
890
|
-
</tr></pre>
|
891
|
-
|
892
|
-
<p></table> </div></p>
|
893
|
-
|
894
|
-
<pre> <div class="method_details ">
|
895
|
-
<h3 class="signature " id="enabled?-instance_method">
|
896
|
-
|
897
|
-
- (<tt>Boolean</tt>) <strong>enabled?</strong></pre>
|
898
|
-
|
899
|
-
<p></h3><div class=“docstring”></p>
|
900
|
-
|
901
|
-
<pre><div class="discussion">
|
902
|
-
|
903
|
-
</div></pre>
|
904
|
-
|
905
|
-
<p></div> <div class=“tags”></p>
|
906
|
-
|
907
|
-
<p><p class=“tag_title”>Returns:</p> <ul class=“return”></p>
|
908
|
-
|
909
|
-
<pre><li>
|
910
|
-
|
911
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
912
|
-
|
913
|
-
</li></pre>
|
914
|
-
|
915
|
-
<p></ul></p>
|
916
|
-
|
917
|
-
<p></div><table class=“source_code”></p>
|
918
|
-
|
919
|
-
<pre><tr>
|
920
|
-
<td>
|
921
|
-
<pre class="lines"></pre>
|
922
|
-
|
923
|
-
<p>256</pre></p>
|
924
|
-
|
925
|
-
<pre></td>
|
926
|
-
<td>
|
927
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/critter.rb', line 256</span></pre>
|
928
|
-
|
929
|
-
<p><span class='kw'>def</span> <span class='id
|
930
|
-
identifier rubyid_enabled?'>enabled?</span> <span
|
931
|
-
class='semicolon'>;</span> <span
|
932
|
-
class='ivar'>@enabled</span> <span
|
933
|
-
class='semicolon'>;</span> <span
|
934
|
-
class='kw'>end</span></pre></p>
|
935
|
-
|
936
|
-
<pre> </td>
|
937
|
-
</tr></pre>
|
938
|
-
|
939
|
-
<p></table> </div></p>
|
940
|
-
|
941
|
-
<pre> <div class="method_details ">
|
942
|
-
<h3 class="signature " id="to_s-instance_method">
|
943
|
-
|
944
|
-
- (<tt>Object</tt>) <strong>to_s</strong>
|
945
|
-
|
946
|
-
<span class="aliases">Also known as:
|
947
|
-
<span class="names"><span id='dump_s-instance_method'>dump_s</span></span>
|
948
|
-
</span></pre>
|
949
|
-
|
950
|
-
<p></h3><table class=“source_code”></p>
|
951
|
-
|
952
|
-
<pre><tr>
|
953
|
-
<td>
|
954
|
-
<pre class="lines"></pre>
|
955
|
-
|
956
|
-
<p>274 275 276</pre></p>
|
957
|
-
|
958
|
-
<pre></td>
|
959
|
-
<td>
|
960
|
-
<pre class="code"><span class="info file"># File 'lib/rubyneat/critter.rb', line 274</span></pre>
|
961
|
-
|
962
|
-
<p><span class='kw'>def</span> <span class='id
|
963
|
-
identifier rubyid_to_s'>to_s</span></p>
|
964
|
-
|
965
|
-
<pre><span class='kw'>super</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[i%s,w%s,%s]</span><span class='tstring_end'>&quot;</span></span> <span class='op'>%</span> <span class='lbracket'>[</span><span class='ivar'>@innovation</span><span class='comma'>,</span> <span class='ivar'>@weight</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_enabled?'>enabled?</span><span class='rbracket'>]</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></pre>
|
975
|
-
|
976
|
-
<p></div></p>
|
977
|
-
|
978
|
-
<pre> <div id="footer">
|
979
|
-
Generated on Sun Mar 16 16:36:51 2014 by
|
980
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
981
|
-
0.8.7.3 (ruby-2.1.1).</pre>
|
982
|
-
|
983
|
-
<p></div></p>
|
984
|
-
|
985
|
-
<pre></body></pre>
|
986
|
-
|
987
|
-
<p></html></p>
|
988
|
-
</main>
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
<footer id="validator-badges" role="contentinfo">
|
993
|
-
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
994
|
-
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
995
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
996
|
-
</footer>
|
997
|
-
|