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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. checksums.yaml +4 -4
  2. data/.semver +1 -1
  3. data/Gemfile +19 -19
  4. data/Gemfile.lock +39 -33
  5. data/README.md +66 -0
  6. data/Rakefile +19 -2
  7. data/bin/neat +4 -60
  8. data/lib/rubyneat/cli.rb +5 -0
  9. data/lib/rubyneat/cli/generate.rb +131 -0
  10. data/lib/rubyneat/cli/main.rb +54 -0
  11. data/lib/rubyneat/cli/templates/generate/Gemfile.tt +17 -0
  12. data/lib/rubyneat/cli/templates/generate/README.md.tt +1 -0
  13. data/lib/rubyneat/cli/templates/generate/bin/neat.tt +14 -0
  14. data/{neater/xor_neat.rb → lib/rubyneat/cli/templates/generate/neater.tt} +7 -22
  15. data/rubyneat.gemspec +73 -297
  16. data/rubyneat.gemspec.orig +384 -0
  17. metadata +76 -292
  18. data/.idea/.name +0 -1
  19. data/.idea/.rakeTasks +0 -7
  20. data/.idea/dictionaries/trader.xml +0 -3
  21. data/.idea/encodings.xml +0 -5
  22. data/.idea/misc.xml +0 -5
  23. data/.idea/modules.xml +0 -9
  24. data/.idea/rubyneat.iml +0 -198
  25. data/.idea/runConfigurations/invpend_neat.xml +0 -26
  26. data/.idea/runConfigurations/sigdebug_neat.xml +0 -24
  27. data/.idea/runConfigurations/xor_neat.xml +0 -26
  28. data/.idea/runConfigurations/xordebug_neat.xml +0 -24
  29. data/.idea/runConfigurations/xorsin_neat.xml +0 -24
  30. data/.idea/scopes/scope_settings.xml +0 -5
  31. data/.idea/vcs.xml +0 -7
  32. data/.idea/workspace.xml +0 -1151
  33. data/.yardoc/checksums +0 -11
  34. data/.yardoc/object_types +0 -0
  35. data/.yardoc/objects/root.dat +0 -0
  36. data/.yardoc/proxy_types +0 -0
  37. data/Guardfile +0 -8
  38. data/doc/ControllerPoint.html +0 -125
  39. data/doc/CuteA.html +0 -286
  40. data/doc/CuteB.html +0 -297
  41. data/doc/DSL.html +0 -883
  42. data/doc/NEAT.html +0 -588
  43. data/doc/NEAT/BasicNeuronTypes.html +0 -136
  44. data/doc/NEAT/BasicNeuronTypes/BiasNeuron.html +0 -518
  45. data/doc/NEAT/BasicNeuronTypes/CosineNeuron.html +0 -274
  46. data/doc/NEAT/BasicNeuronTypes/InputNeuron.html +0 -366
  47. data/doc/NEAT/BasicNeuronTypes/SigmoidNeuron.html +0 -275
  48. data/doc/NEAT/BasicNeuronTypes/SineNeuron.html +0 -274
  49. data/doc/NEAT/BasicNeuronTypes/TanhNeuron.html +0 -274
  50. data/doc/NEAT/Controller.html +0 -2490
  51. data/doc/NEAT/Controller/NeatSettings.html +0 -3985
  52. data/doc/NEAT/Critter.html +0 -1037
  53. data/doc/NEAT/Critter/Genotype.html +0 -1601
  54. data/doc/NEAT/Critter/Genotype/Gene.html +0 -979
  55. data/doc/NEAT/Critter/Phenotype.html +0 -603
  56. data/doc/NEAT/DSL.html +0 -1255
  57. data/doc/NEAT/Evaluator.html +0 -420
  58. data/doc/NEAT/Evolver.html +0 -602
  59. data/doc/NEAT/Evolver/CritterOp.html +0 -551
  60. data/doc/NEAT/Expressor.html +0 -327
  61. data/doc/NEAT/Graph.html +0 -402
  62. data/doc/NEAT/Graph/DependencyResolver.html +0 -478
  63. data/doc/NEAT/Graph/GraphException.html +0 -123
  64. data/doc/NEAT/NeatException.html +0 -123
  65. data/doc/NEAT/NeatOb.html +0 -567
  66. data/doc/NEAT/Neuron.html +0 -1067
  67. data/doc/NEAT/Operator.html +0 -162
  68. data/doc/NEAT/Population.html +0 -1961
  69. data/doc/NEAT/Trait.html +0 -169
  70. data/doc/_index.html +0 -373
  71. data/doc/class_list.html +0 -54
  72. data/doc/css/common.css +0 -1
  73. data/doc/css/full_list.css +0 -57
  74. data/doc/css/style.css +0 -339
  75. data/doc/file_list.html +0 -53
  76. data/doc/frames.html +0 -26
  77. data/doc/index.html +0 -373
  78. data/doc/js/app.js +0 -219
  79. data/doc/js/full_list.js +0 -178
  80. data/doc/js/jquery.js +0 -4
  81. data/doc/method_list.html +0 -1415
  82. data/doc/top-level-namespace.html +0 -164
  83. data/foo/foo_aquarium_example.rb +0 -38
  84. data/foo/foo_gosu.rb +0 -99
  85. data/foo/foo_rubygoo.rb +0 -104
  86. data/foo/foo_sdl.rb +0 -34
  87. data/foo/icon.png +0 -0
  88. data/neater/invpend_neat.rb +0 -150
  89. data/neater/rnlib/inverted_pendulum.rb +0 -380
  90. data/neater/rnlib/xor.rb +0 -10
  91. data/neater/sigdebug_neat.rb +0 -136
  92. data/neater/xoranalog_neat.rb +0 -138
  93. data/neater/xorsin_neat.rb +0 -143
  94. data/projectFilesBackup/.idea/rubyneat.iml +0 -180
  95. data/public/.directory +0 -4
  96. data/public/background.png +0 -0
  97. data/public/background.xcf +0 -0
  98. data/public/cart.png +0 -0
  99. data/public/cart.xcf +0 -0
  100. data/public/metalpoles_molton_ball_l.jpg +0 -0
  101. data/public/old_background.png +0 -0
  102. data/public/pointer.png +0 -0
  103. data/public/pointer.xcf +0 -0
  104. data/public/pole.kra +0 -0
  105. data/public/pole.png +0 -0
  106. data/public/pole.xcf +0 -0
  107. data/public/wheel-of-year-stone-DD-131-WOYS.jpg +0 -0
  108. data/public/wheel.png +0 -0
  109. data/public/wheel.xcf +0 -0
  110. data/public/wood-planks-texture.jpg +0 -0
  111. data/rdoc/ControllerPoint.html +0 -116
  112. data/rdoc/CuteA.html +0 -177
  113. data/rdoc/CuteB.html +0 -178
  114. data/rdoc/DSLSetup.html +0 -177
  115. data/rdoc/GameTestWindow.html +0 -242
  116. data/rdoc/GameWindow.html +0 -292
  117. data/rdoc/Gemfile.html +0 -215
  118. data/rdoc/Gemfile_lock.html +0 -327
  119. data/rdoc/GraphTest.html +0 -210
  120. data/rdoc/Guardfile.html +0 -198
  121. data/rdoc/InvertedPendulum.html +0 -198
  122. data/rdoc/InvertedPendulum/Cart.html +0 -668
  123. data/rdoc/InvertedPendulum/DSL.html +0 -259
  124. data/rdoc/InvertedPendulum/InvPendWindow.html +0 -402
  125. data/rdoc/Logger.html +0 -98
  126. data/rdoc/NEAT.html +0 -422
  127. data/rdoc/NEAT/BasicNeuronTypes.html +0 -107
  128. data/rdoc/NEAT/BasicNeuronTypes/BiasNeuron.html +0 -265
  129. data/rdoc/NEAT/BasicNeuronTypes/CosineNeuron.html +0 -162
  130. data/rdoc/NEAT/BasicNeuronTypes/InputNeuron.html +0 -206
  131. data/rdoc/NEAT/BasicNeuronTypes/SigmoidNeuron.html +0 -162
  132. data/rdoc/NEAT/BasicNeuronTypes/SineNeuron.html +0 -162
  133. data/rdoc/NEAT/BasicNeuronTypes/TanhNeuron.html +0 -161
  134. data/rdoc/NEAT/Controller.html +0 -729
  135. data/rdoc/NEAT/Controller/NeatSettings.html +0 -880
  136. data/rdoc/NEAT/Critter.html +0 -489
  137. data/rdoc/NEAT/Critter/Genotype.html +0 -735
  138. data/rdoc/NEAT/Critter/Genotype/Gene.html +0 -457
  139. data/rdoc/NEAT/Critter/Phenotype.html +0 -330
  140. data/rdoc/NEAT/DSL.html +0 -729
  141. data/rdoc/NEAT/Evaluator.html +0 -256
  142. data/rdoc/NEAT/Evolver.html +0 -891
  143. data/rdoc/NEAT/Evolver/CritterOp.html +0 -349
  144. data/rdoc/NEAT/Expressor.html +0 -402
  145. data/rdoc/NEAT/Graph.html +0 -263
  146. data/rdoc/NEAT/Graph/DependencyResolver.html +0 -291
  147. data/rdoc/NEAT/Graph/GraphException.html +0 -105
  148. data/rdoc/NEAT/NeatException.html +0 -105
  149. data/rdoc/NEAT/NeatOb.html +0 -325
  150. data/rdoc/NEAT/Neuron.html +0 -481
  151. data/rdoc/NEAT/Operator.html +0 -109
  152. data/rdoc/NEAT/Population.html +0 -935
  153. data/rdoc/NEAT/Trait.html +0 -117
  154. data/rdoc/Object.html +0 -384
  155. data/rdoc/Phi.html +0 -98
  156. data/rdoc/Player.html +0 -383
  157. data/rdoc/Rakefile.html +0 -254
  158. data/rdoc/RubyNEAT.html +0 -98
  159. data/rdoc/RubyNEAT/Application.html +0 -105
  160. data/rdoc/SDL.html +0 -98
  161. data/rdoc/SDL/Event2.html +0 -98
  162. data/rdoc/Vector.html +0 -195
  163. data/rdoc/created.rid +0 -125
  164. data/rdoc/doc/ControllerPoint_html.html +0 -299
  165. data/rdoc/doc/CuteA_html.html +0 -438
  166. data/rdoc/doc/CuteB_html.html +0 -436
  167. data/rdoc/doc/DSL_html.html +0 -992
  168. data/rdoc/doc/NEAT/BasicNeuronTypes/BiasNeuron_html.html +0 -617
  169. data/rdoc/doc/NEAT/BasicNeuronTypes/CosineNeuron_html.html +0 -413
  170. data/rdoc/doc/NEAT/BasicNeuronTypes/InputNeuron_html.html +0 -498
  171. data/rdoc/doc/NEAT/BasicNeuronTypes/SigmoidNeuron_html.html +0 -413
  172. data/rdoc/doc/NEAT/BasicNeuronTypes/SineNeuron_html.html +0 -413
  173. data/rdoc/doc/NEAT/BasicNeuronTypes/TanhNeuron_html.html +0 -412
  174. data/rdoc/doc/NEAT/BasicNeuronTypes_html.html +0 -310
  175. data/rdoc/doc/NEAT/Controller/NeatSettings_html.html +0 -3324
  176. data/rdoc/doc/NEAT/Controller_html.html +0 -2212
  177. data/rdoc/doc/NEAT/Critter/Genotype/Gene_html.html +0 -997
  178. data/rdoc/doc/NEAT/Critter/Genotype_html.html +0 -1556
  179. data/rdoc/doc/NEAT/Critter/Phenotype_html.html +0 -687
  180. data/rdoc/doc/NEAT/Critter_html.html +0 -1037
  181. data/rdoc/doc/NEAT/DSL_html.html +0 -1349
  182. data/rdoc/doc/NEAT/Evaluator_html.html +0 -556
  183. data/rdoc/doc/NEAT/Evolver/CritterOp_html.html +0 -690
  184. data/rdoc/doc/NEAT/Evolver_html.html +0 -677
  185. data/rdoc/doc/NEAT/Expressor_html.html +0 -468
  186. data/rdoc/doc/NEAT/Graph/DependencyResolver_html.html +0 -598
  187. data/rdoc/doc/NEAT/Graph/GraphException_html.html +0 -299
  188. data/rdoc/doc/NEAT/Graph_html.html +0 -527
  189. data/rdoc/doc/NEAT/NeatException_html.html +0 -299
  190. data/rdoc/doc/NEAT/NeatOb_html.html +0 -671
  191. data/rdoc/doc/NEAT/Neuron_html.html +0 -1095
  192. data/rdoc/doc/NEAT/Operator_html.html +0 -337
  193. data/rdoc/doc/NEAT/Population_html.html +0 -1795
  194. data/rdoc/doc/NEAT/Trait_html.html +0 -344
  195. data/rdoc/doc/NEAT_html.html +0 -736
  196. data/rdoc/doc/_index_html.html +0 -559
  197. data/rdoc/doc/class_list_html.html +0 -369
  198. data/rdoc/doc/css/common_css.html +0 -188
  199. data/rdoc/doc/css/full_list_css.html +0 -243
  200. data/rdoc/doc/css/style_css.html +0 -530
  201. data/rdoc/doc/file_list_html.html +0 -240
  202. data/rdoc/doc/frames_html.html +0 -217
  203. data/rdoc/doc/index_html.html +0 -559
  204. data/rdoc/doc/js/app_js.html +0 -423
  205. data/rdoc/doc/js/full_list_js.html +0 -372
  206. data/rdoc/doc/js/jquery_js.html +0 -1536
  207. data/rdoc/doc/method_list_html.html +0 -1375
  208. data/rdoc/doc/top-level-namespace_html.html +0 -317
  209. data/rdoc/fonts.css +0 -167
  210. data/rdoc/fonts/Lato-Light.ttf +0 -0
  211. data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
  212. data/rdoc/fonts/Lato-Regular.ttf +0 -0
  213. data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
  214. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  215. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  216. data/rdoc/images/add.png +0 -0
  217. data/rdoc/images/arrow_up.png +0 -0
  218. data/rdoc/images/brick.png +0 -0
  219. data/rdoc/images/brick_link.png +0 -0
  220. data/rdoc/images/bug.png +0 -0
  221. data/rdoc/images/bullet_black.png +0 -0
  222. data/rdoc/images/bullet_toggle_minus.png +0 -0
  223. data/rdoc/images/bullet_toggle_plus.png +0 -0
  224. data/rdoc/images/date.png +0 -0
  225. data/rdoc/images/delete.png +0 -0
  226. data/rdoc/images/find.png +0 -0
  227. data/rdoc/images/loadingAnimation.gif +0 -0
  228. data/rdoc/images/macFFBgHack.png +0 -0
  229. data/rdoc/images/package.png +0 -0
  230. data/rdoc/images/page_green.png +0 -0
  231. data/rdoc/images/page_white_text.png +0 -0
  232. data/rdoc/images/page_white_width.png +0 -0
  233. data/rdoc/images/plugin.png +0 -0
  234. data/rdoc/images/ruby.png +0 -0
  235. data/rdoc/images/tag_blue.png +0 -0
  236. data/rdoc/images/tag_green.png +0 -0
  237. data/rdoc/images/transparent.png +0 -0
  238. data/rdoc/images/wrench.png +0 -0
  239. data/rdoc/images/wrench_orange.png +0 -0
  240. data/rdoc/images/zoom.png +0 -0
  241. data/rdoc/index.html +0 -282
  242. data/rdoc/js/darkfish.js +0 -140
  243. data/rdoc/js/jquery.js +0 -18
  244. data/rdoc/js/navigation.js +0 -142
  245. data/rdoc/js/search.js +0 -109
  246. data/rdoc/js/search_index.js +0 -1
  247. data/rdoc/js/searcher.js +0 -228
  248. data/rdoc/rdoc.css +0 -580
  249. data/rdoc/rubyneat_gemspec.html +0 -387
  250. data/rdoc/table_of_contents.html +0 -2502
  251. data/rdoc/xordebug_log.html +0 -170598
  252. data/rdoc/xorsin_log.html +0 -22569
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56591c0ab08c35c2f3d3d2aa72e8f077d3f15d0c
4
- data.tar.gz: 01539e4a63e44789eab02743b4c43395fa8e8d99
3
+ metadata.gz: e641bb4a979e7bc9255955f887e518242953e794
4
+ data.tar.gz: 43fe2d6436a311901fcdee6f213f8ecb796ab1e0
5
5
  SHA512:
6
- metadata.gz: 4d2675a6a372dc1da58000c6438a189a70289a4323f88e71698b25be3c1be3b7c94528d735de62dda79b5b0625155e4d1ab8a1db7f3329fc0e47b6861022f431
7
- data.tar.gz: d61fe647b58ffd673f28a872ca32c75e33b4cbfb0afaed13d5d5e15641d5dd0031898d12db01e8380a14489f3297773bc76ef79c017318f63cd6ceb99de928ea
6
+ metadata.gz: fd0fc5e32ac834d710bb15f3b613f4b2dd8852fd99674f6c08f98e8002cd5888f4f18741b21bdd91a3e10aaf5c88239838f4d87b0e6b50f5c0804ef16912e816
7
+ data.tar.gz: 4310fc12f0dff0158456483da68aab0e9d40a03d6865db7388a24fd53a886e9955b06096bab9a9aebe4ea3833c483cc2f1fb8e6b811be93df1f6dcbfb604e05d
data/.semver CHANGED
@@ -2,4 +2,4 @@
2
2
  :major: 0
3
3
  :minor: 3
4
4
  :patch: 5
5
- :special: ".alpha.3"
5
+ :special: ".alpha.5"
data/Gemfile CHANGED
@@ -4,30 +4,30 @@ source 'https://rubygems.org'
4
4
 
5
5
  ruby '2.1.1'
6
6
 
7
- gem 'mongo'
8
- gem 'bson_ext'
9
- gem 'distribution'
7
+ gem 'mongo', '~> 1', require: false
8
+ gem 'bson_ext', '~> 1', require: false
9
+ gem 'distribution', '~> 0'
10
10
 
11
11
  #TODO: Check out this for a repacement of of statistics2
12
12
  #TODO: https://github.com/thirtysixthspan/descriptive_statistics
13
- gem 'statistics2'
13
+ gem 'statistics2', '~> 0'
14
14
 
15
- gem 'debase'
16
- gem 'aquarium'
17
- gem 'thor'
18
- gem 'awesome_print'
19
- gem 'deep_dive'
15
+ gem 'debase', '~> 0'
16
+ gem 'aquarium', '~> 0'
17
+ gem 'thor', '~> 0'
18
+ gem 'awesome_print', '~> 1'
19
+ gem 'deep_dive', '~> 0'
20
20
 
21
21
  group :development do
22
- gem 'rspec'
23
- gem 'yard'
24
- gem 'guard'
25
- gem 'guard-rspec'
26
- gem 'semver'
27
- gem "jeweler", "~> 1.8.7"
28
- gem "simplecov"
22
+ gem 'rspec', '~> 2'
23
+ gem 'yard', '~> 0'
24
+ gem 'guard', '~> 2'
25
+ gem 'guard-rspec', '~> 4'
26
+ gem 'semver', '~> 1'
27
+ gem "jeweler", "~> 2"
28
+ gem "simplecov", '~> 0'
29
29
  #gem 'debugger'
30
- gem 'ruby-debug-ide'
30
+ gem 'ruby-debug-ide', '~> 0'
31
31
  end
32
32
 
33
33
  #======================================================
@@ -35,7 +35,7 @@ end
35
35
 
36
36
  # For demo purposes, we include the gosu library, but
37
37
  # don't want this to be part of the mainstream.
38
- gem 'gosu', require: false
38
+ gem 'gosu', '~> 0', require: false
39
39
 
40
40
  # So we can generate some nice graphics.
41
- gem 'rubyvis', require: false
41
+ gem 'rubyvis', '~> 0', require: false
data/Gemfile.lock CHANGED
@@ -19,20 +19,23 @@ GEM
19
19
  debugger-ruby_core_source (1.3.2)
20
20
  deep_dive (0.1.0)
21
21
  debase
22
+ descendants_tracker (0.0.4)
23
+ thread_safe (~> 0.3, >= 0.3.1)
22
24
  diff-lcs (1.2.5)
23
25
  distribution (0.7.0)
24
26
  docile (1.1.3)
25
- faraday (0.8.9)
26
- multipart-post (~> 1.2.0)
27
+ faraday (0.9.0)
28
+ multipart-post (>= 1.2, < 3)
27
29
  ffi (1.9.3)
28
30
  formatador (0.2.4)
29
31
  git (1.2.6)
30
- github_api (0.10.1)
31
- addressable
32
- faraday (~> 0.8.1)
32
+ github_api (0.11.3)
33
+ addressable (~> 2.3)
34
+ descendants_tracker (~> 0.0.1)
35
+ faraday (~> 0.8, < 0.10)
33
36
  hashie (>= 1.2)
34
- multi_json (~> 1.4)
35
- nokogiri (~> 1.5.2)
37
+ multi_json (>= 1.7.5, < 2.0)
38
+ nokogiri (~> 1.6.0)
36
39
  oauth2
37
40
  gosu (0.7.50)
38
41
  guard (2.6.0)
@@ -46,13 +49,13 @@ GEM
46
49
  rspec (>= 2.14, < 4.0)
47
50
  hashie (2.1.1)
48
51
  highline (1.6.21)
49
- jeweler (1.8.8)
52
+ jeweler (2.0.1)
50
53
  builder
51
- bundler (~> 1.0)
54
+ bundler (>= 1.0)
52
55
  git (>= 1.2.5)
53
- github_api (= 0.10.1)
56
+ github_api
54
57
  highline (>= 1.6.15)
55
- nokogiri (= 1.5.10)
58
+ nokogiri (>= 1.5.10)
56
59
  rake
57
60
  rdoc
58
61
  json (1.8.1)
@@ -65,13 +68,15 @@ GEM
65
68
  rb-inotify (>= 0.9)
66
69
  lumberjack (1.0.5)
67
70
  method_source (0.8.2)
71
+ mini_portile (0.5.3)
68
72
  mongo (1.10.0)
69
73
  bson (~> 1.10.0)
70
74
  multi_json (1.9.2)
71
75
  multi_xml (0.5.5)
72
- multipart-post (1.2.0)
76
+ multipart-post (2.0.0)
73
77
  nio4r (1.0.0)
74
- nokogiri (1.5.10)
78
+ nokogiri (1.6.1)
79
+ mini_portile (~> 0.5.0)
75
80
  oauth2 (0.9.3)
76
81
  faraday (>= 0.8, < 0.10)
77
82
  jwt (~> 0.1.8)
@@ -83,7 +88,7 @@ GEM
83
88
  method_source (~> 0.8)
84
89
  slop (~> 3.4)
85
90
  rack (1.5.2)
86
- rake (10.2.2)
91
+ rake (10.3.1)
87
92
  rb-fsevent (0.9.4)
88
93
  rb-inotify (0.9.3)
89
94
  ffi (>= 0.5.0)
@@ -109,6 +114,7 @@ GEM
109
114
  slop (3.5.0)
110
115
  statistics2 (0.54)
111
116
  thor (0.19.1)
117
+ thread_safe (0.3.3)
112
118
  timers (1.1.0)
113
119
  yard (0.8.7.4)
114
120
 
@@ -116,22 +122,22 @@ PLATFORMS
116
122
  ruby
117
123
 
118
124
  DEPENDENCIES
119
- aquarium
120
- awesome_print
121
- bson_ext
122
- debase
123
- deep_dive
124
- distribution
125
- gosu
126
- guard
127
- guard-rspec
128
- jeweler (~> 1.8.7)
129
- mongo
130
- rspec
131
- ruby-debug-ide
132
- rubyvis
133
- semver
134
- simplecov
135
- statistics2
136
- thor
137
- yard
125
+ aquarium (~> 0)
126
+ awesome_print (~> 1)
127
+ bson_ext (~> 1)
128
+ debase (~> 0)
129
+ deep_dive (~> 0)
130
+ distribution (~> 0)
131
+ gosu (~> 0)
132
+ guard (~> 2)
133
+ guard-rspec (~> 4)
134
+ jeweler (~> 2)
135
+ mongo (~> 1)
136
+ rspec (~> 2)
137
+ ruby-debug-ide (~> 0)
138
+ rubyvis (~> 0)
139
+ semver (~> 1)
140
+ simplecov (~> 0)
141
+ statistics2 (~> 0)
142
+ thor (~> 0)
143
+ yard (~> 0)
data/README.md ADDED
@@ -0,0 +1,66 @@
1
+ ## RubyNEAT -- Neural Evolution of Augmenting Topologies
2
+
3
+ For the latest docs, please see http://rubyneat.com
4
+
5
+ RubyNEAT is under intense development, and then will be under intense documentation, as this is
6
+ expected to be a full blown pure Ruby implementation of the NEAT algorithm by Kenneth Stanley:
7
+
8
+ http://www.cs.ucf.edu/~kstanley/
9
+
10
+ ## Quick and Dirty Docs
11
+
12
+ There is an (extreme) alpha RubyGEM. Just do:
13
+
14
+ gem install rubyneat --pre
15
+
16
+ Then type:
17
+
18
+ neat
19
+
20
+ to see the list of commands. The workflow aspect of Rails is loosely mirrored here.
21
+
22
+ To generate a new NEAT project, type:
23
+
24
+ neat new PROJECTNAME
25
+
26
+ and a project directory will be created. Cd into that directory, and type:
27
+
28
+ neat generate neater NEATERNAME
29
+
30
+ and a scaffold Neater will be generated. Note that this generator is still
31
+ in alpha, but improvements are coming shortly.
32
+
33
+ ## Also Note
34
+
35
+ For now, see
36
+
37
+ https://github.com/flajann2/rubyneat
38
+
39
+ for the Github version, and this will probably be the better option until this
40
+ gets out of alpha. There are a couple of example Neaters there (one of which is
41
+ still in development). Basic, but will be a good example of how to implement your own
42
+ Neater. Eventually all will be fully documented.
43
+
44
+ ## Copyright Notice
45
+
46
+ This code is released under the MIT license:
47
+
48
+ Copyright (c) 2014 LRCSoft.com
49
+
50
+ Permission is hereby granted, free of charge, to any person obtaining a copy
51
+ of this software and associated documentation files (the "Software"), to deal
52
+ in the Software without restriction, including without limitation the rights
53
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
54
+ copies of the Software, and to permit persons to whom the Software is
55
+ furnished to do so, subject to the following conditions:
56
+
57
+ The above copyright notice and this permission notice shall be included in
58
+ all copies or substantial portions of the Software.
59
+
60
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
66
+ THE SOFTWARE.
data/Rakefile CHANGED
@@ -26,14 +26,31 @@ Jeweler::Tasks.new do |gem|
26
26
  gem.summary = %Q{RubyNEAT NeuralEvolution of Augmenting Topologies}
27
27
  gem.version = s_version
28
28
  gem.description = %Q{
29
- NEAT Algorithm for Ruby.
29
+ RubyNEAT -- Neural Evolution of Augmenting Topologies for Ruby.
30
+ By way of an enhanced form of Genetic Algorithms -- the NEAT algorithm,
31
+ populations of neural nets are evolved to handle pre-defined goals.
32
+
33
+ RubyNEAT is the first implementation of the NEAT algorithm for Ruby, and
34
+ it leverages Ruby's power to implement the NEAT algorithm in a way that would
35
+ be difficult to do in other languages. The 'activation function' is largely
36
+ standalone. Basically, activation is achieved by functional programming.
37
+
38
+ Meaning, once your network is evolved, you can extract it as source code you
39
+ can then utilize without the RubyNEAT engine.
40
+
41
+ RubyNEAT can be used for nearly any Machine Learning task you can dream of,
42
+ because it's also extensible and modular. See http://rubyneat.com for the
43
+ details.
30
44
  }
31
45
  gem.email = "fred@lrcsoft.com"
32
46
  gem.authors = ["Fred Mitchell"]
33
47
  # dependencies defined in Gemfile
34
48
 
35
49
  # Exclude the Neural Docs directory
36
- gem.files.exclude 'Neural_Docs/*'
50
+ gem.files.exclude 'Neural_Docs/*', 'foo/**/*', 'rdoc/*',
51
+ '.idea/**/*', '.idea/**/.*', '.yardoc/**/*',
52
+ 'public/**/*', 'neater/**/*', 'doc/**/*',
53
+ 'public/**/.*', 'Guardfile'
37
54
  end
38
55
  Jeweler::RubygemsDotOrgTasks.new
39
56
 
data/bin/neat CHANGED
@@ -1,70 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
- =begin rdoc
3
- =RubyNEAT Launcher based on thor
4
-
5
- =end
6
2
 
7
3
  require 'thor'
8
4
  require 'semver'
9
5
 
10
6
  # Be sure rnlib is added to the library path
7
+ neatpath = File.expand_path '..', File.dirname(__FILE__)
11
8
  %w{ lib neater neater/rnlib }.each do |dir|
12
- $:.unshift File.join([Dir.pwd, dir])
9
+ $:.unshift File.join([neatpath, dir])
13
10
  end
14
11
 
15
- NEATER = File.join [Dir.pwd, "neater"]
16
- NEATGLOB = NEATER + '/*_neat.rb'
17
-
18
- require 'rubyneat'
19
-
20
- module RubyNEAT
21
- module Cli
22
-
23
- class List < Thor
24
- desc 'neaters', 'List all Neaters.'
25
- def neaters
26
- Dir.glob(NEATGLOB).sort.each do |ne|
27
- puts 'neat runeater ' + File.basename(ne).gsub(%r{_neat\.rb}, '')
28
- end
29
- end
30
-
31
- desc 'neurons', 'List all Neurons.'
32
- def neurons
33
- puts NEAT::Neuron.neuron_types.map{|n| n.name }.sort.join "\n"
34
- end
35
- end
36
-
37
- class Main < Thor
38
- class_option :verbose, type: :string, banner: '[1|2|3]'
39
-
40
- desc 'list <type>', 'List the requested type.'
41
- subcommand 'list', List
42
-
43
- desc 'version', 'Display RubyNEAT version'
44
- def version
45
- puts SemVer.find.format "%M.%m.%p%s"
46
- end
47
-
48
- desc 'console', 'Run RubyNEAT interactively'
49
- def console
50
- #TODO: Finish the console
51
- puts "Not Implemented Yet."
52
- end
53
-
54
- desc 'runeater <neater> [<neater> <neater> ...] [OPTS]', 'Run a Neater'
55
- option :log, type: :string, banner: 'info|warn|debug|error'
56
- def runeater(*neaters)
57
- NEAT::controller.verbosity = options[:verbose].to_i if options[:verbose]
58
- eval %{$log.level = Logger::#{options[:log].upcase}} if options[:log]
59
-
60
- neaters.map do |neater|
61
- "#{neater}_neat.rb"
62
- end.each do |file|
63
- load file
64
- end
65
- end
66
- end
67
- end
68
- end
12
+ require 'rubyneat/cli'
69
13
 
70
- RubyNEAT::Cli::Main.start(ARGV)
14
+ RubyNEAT::Cli::Main.start
@@ -0,0 +1,5 @@
1
+ NEATER = File.join [Dir.pwd, "neater"]
2
+ NEATGLOB = NEATER + '/*_neat.rb'
3
+
4
+ require 'rubyneat/cli/main'
5
+ require 'rubyneat'
@@ -0,0 +1,131 @@
1
+ require 'ostruct'
2
+
3
+ module RubyNEAT
4
+ module Cli
5
+ module Generator
6
+ module GenHelpers
7
+ def source_root
8
+ File.dirname(__FILE__) + "/templates/generate"
9
+ end
10
+ end
11
+
12
+ class NewProject < Thor::Group
13
+ include Thor::Actions
14
+ extend GenHelpers
15
+ desc "Generate a new NEAT Project."
16
+
17
+ argument :name, type: :string, desc: 'Name of the NEAT project'
18
+ attr_accessor :ruby
19
+
20
+ def create_project_directory
21
+ empty_directory name.snake
22
+ end
23
+
24
+ def create_project_directories
25
+ inside name.snake do
26
+ %w{neater lib config tmp log bin}.
27
+ each {|dir| empty_directory dir}
28
+ end
29
+ end
30
+
31
+ def create_project_root_files
32
+ @ruby = OpenStruct.new version: RUBY_VERSION,
33
+ engine: RUBY_ENGINE,
34
+ platform: RUBY_PLATFORM
35
+ %w{Gemfile README.md}.
36
+ map{ |pfile| [pfile, "#{name.snake}/#{pfile}"] }.
37
+ each{ |source, destination| template source, destination }
38
+ end
39
+ end
40
+
41
+ class Neater < Thor::Group
42
+ include Thor::Actions
43
+ extend GenHelpers
44
+ desc "Generate a Neater"
45
+
46
+ argument :name, type: :string, desc: 'Name of the Neater'
47
+ argument :nparams, type: :hash, desc: 'Neuron Parameters', default: {}
48
+
49
+ attr_accessor :description, :inputs, :outputs, :hidden, :bias
50
+
51
+ def create_neater_file
52
+ setup_neuron_parameters
53
+ @description ||= "#{name.camel_case} Neater"
54
+ template 'neater', "neater/#{name.snake}_neat.rb"
55
+ end
56
+
57
+ private
58
+ # We need to create the Input Neurons (including the bias neuron),
59
+ # the Output Neurons, and the Hidden neurons.
60
+ # attr:name
61
+ # attr:n1:t1,n2:t2,...
62
+ def setup_neuron_parameters
63
+ params = {
64
+ inputs: {in1: 'input', in2: 'input'},
65
+ outputs: {out: 'tanh'},
66
+ hidden: {tanh: nil},
67
+ bias: 'bias',
68
+ description: 'Neater scaffold'
69
+ }.merge(nparams.inject({}) { |memo, (k,v)|
70
+ memo[k.to_sym] = Hash[v.split(',').map{|q| q.split(':') }].
71
+ inject({}) {|mmemo, (kk, vv)| mmemo[kk.to_sym] = vv; mmemo}
72
+ memo
73
+ })
74
+ puts params
75
+ params.each do |attr, o|
76
+ instance_variable_set("@#{attr}", case attr
77
+ when :inputs, :outputs
78
+ o.inject({}){|memo, (ky, vl)|
79
+ memo[ky] = unless vl.nil?
80
+ vl.camel_case
81
+ else
82
+ case attr
83
+ when :inputs; 'Input'
84
+ when :outputs; 'Output'
85
+ end
86
+ end + 'Neuron'
87
+ memo
88
+ }
89
+ when :bias
90
+ unless o.nil?
91
+ o.camel_case
92
+ else
93
+ 'Bias'
94
+ end + 'Neuron'
95
+ when :hidden
96
+ o.map{|hk, ignore| hk.to_s.camel_case + 'Neuron' }
97
+ when :description; o.keys.first
98
+ else o
99
+ end)
100
+ puts attr
101
+ end
102
+ end
103
+ end
104
+ end
105
+
106
+ class Generate < Thor
107
+ register Generator::Neater, 'neater', 'neater', 'Generates a neater'
108
+ register Generator::NewProject, 'new', 'new', 'Generates a new NEAT project'
109
+ end
110
+ end
111
+ end
112
+
113
+ class String
114
+ def camel_case
115
+ return self if self !~ /_| / && self =~ /[A-Z]+.*/
116
+ split(/_| /).map{|e| e.capitalize}.join
117
+ end
118
+
119
+ def camel_case_lower
120
+ self.split(/_| /).inject([]){ |buffer,e| buffer.push(buffer.empty? ? e : e.capitalize) }.join
121
+ end
122
+
123
+ def snake
124
+ self.gsub(/::/, '/').
125
+ gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
126
+ gsub(/([a-z\d])([A-Z])/,'\1_\2').
127
+ tr("-", "_").
128
+ tr(' ', '_').
129
+ downcase
130
+ end
131
+ end