ga 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ca6bd91f34c0b47ed8990d3edd4ff6d0b7d771f3
4
+ data.tar.gz: 5dd715e92b787d9ebb40ba02e0bca6f418df53ba
5
+ SHA512:
6
+ metadata.gz: 33ecd28ad168a007e208bdb2dff3a8a432e7983cb474de78da945ce568cd8a09624b11c94b10c16a157de0cd86e354814dae0ec85b845ff55f50018461691324
7
+ data.tar.gz: '08511cef0e79837e42244da6c92d93799aad5ddd6f3f0159e0e096477633d7935be46dbf2427792c51302e6231052d8ad061cef38db58926f0b3f002a99ac487'
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ *.swp
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format progress
2
+ --color
3
+ --require gem_helper
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.3
5
+ before_install: gem install bundler -v 1.13.6
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://gems.ruby-china.org'
2
+
3
+ # Specify your gem's dependencies in ga.gemspec
4
+ gemspec
5
+
6
+ gem 'parallel'
7
+
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 jiangzhi.xie
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,115 @@
1
+ # GA
2
+
3
+ Simple Framework for Genetic Algorithm
4
+
5
+
6
+ ## Installation
7
+
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'ga'
12
+ ```
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install ga
21
+
22
+ ## Usage
23
+
24
+ ### Define your unit
25
+
26
+ require methods:
27
+
28
+ * `Unit.random_new`
29
+ * `Unit#initialize(genome)` need copy genome
30
+ * `Unit#fitness` return fitness
31
+ * `Unit#fitness=` #set fitness
32
+ * `Unit#cross!(target_unit)`
33
+ * `Unit#mutate!`
34
+ * `Unit#<=>(target_unit)`
35
+
36
+ ```
37
+ class Unit
38
+ include GA
39
+
40
+ attr_accessor :genome, :fitness
41
+
42
+ def self.random_new
43
+ self.new(3.times.map { rand(3) })
44
+ end
45
+
46
+ def initialize(genome)
47
+ @genome = genome.dup
48
+ end
49
+
50
+ def fitness
51
+ @fitness ||= genome.reduce(&:+)
52
+ end
53
+
54
+ def cross!(target)
55
+ (rand(3) + 1).times do |i|
56
+ genome[i], target.genome[i] = target.genome[i], genome[i]
57
+ end
58
+ end
59
+
60
+ def mutate!
61
+ (rand(3) + 1).times do
62
+ i = rand(3)
63
+ genome[i] = (genome[i] + rand(3)) % 3
64
+ end
65
+ end
66
+
67
+ def <=>(target)
68
+ self.fitness <=> target.fitness
69
+ end
70
+ end
71
+ ```
72
+
73
+ ### Evolve
74
+
75
+ `Unit#evolve(total_units, generations, crossover_rate, variation_rate)` return latest units
76
+
77
+ ```
78
+ units = Unit.evolve(32, 100, 0.8, 0.15)
79
+ best = units.max
80
+ ```
81
+
82
+ ### Print evolve info
83
+
84
+ ```
85
+ gz = Unit.new_ga_zoo
86
+ ga.debug!
87
+ units = ga.evolve(32, 100, 0.8, 0.15)
88
+ ```
89
+
90
+ ### Use `before_init_fitness` callback
91
+
92
+ ```
93
+ gz = Unit.new_ga_zoo
94
+ gz.before_init_fitness do |units, generation|
95
+ # parallel calculate fitness
96
+ data = Parallel.map(units, in_processes: 8) {|unit| unit.fitness }
97
+ units.each_with_index {|unit, index| unit.fitness = data[index] }
98
+ end
99
+ ```
100
+
101
+ ### More
102
+
103
+ see `examples/` folder
104
+
105
+
106
+
107
+ ## Contributing
108
+
109
+ Bug reports and pull requests are welcome on GitHub at https://github.com/xjz19901211/ga.
110
+
111
+
112
+ ## License
113
+
114
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
115
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "ga"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/examples/01bag.rb ADDED
@@ -0,0 +1,99 @@
1
+ require 'bundler/setup'
2
+ require 'ga'
3
+
4
+ ITEMS = [
5
+ { weight: 3, value: 200},
6
+ { weight: 10, value: 500},
7
+ { weight: 100, value: 30},
8
+ { weight: 200, value: 2000},
9
+ { weight: 300, value: 500},
10
+ { weight: 50, value: 50},
11
+ { weight: 190, value: 1000},
12
+ { weight: 200, value: 1500},
13
+ ]
14
+
15
+ MAX_WEIGHT = 400
16
+
17
+ class Unit
18
+ include GA
19
+
20
+ attr_accessor :genome, :fitness
21
+
22
+ def self.random_new
23
+ self.new(ITEMS.map do rand(2) == 1 end)
24
+ end
25
+
26
+ def initialize(genome)
27
+ @genome = genome.dup
28
+ end
29
+
30
+ def fitness
31
+ return @fitness if @fitness
32
+ total_value = 0
33
+ total_weight = 0
34
+ genome.each_with_index do |item, index|
35
+ next unless item
36
+ total_value += ITEMS[index][:value]
37
+ total_weight += ITEMS[index][:weight]
38
+ end
39
+ (total_weight > MAX_WEIGHT or total_value == 0) ? 1 : total_value
40
+ end
41
+
42
+ def weight
43
+ total_weight = 0
44
+
45
+ genome.each_with_index do |item, index|
46
+ next unless item
47
+ total_weight += ITEMS[index][:weight]
48
+ end
49
+
50
+ return total_weight
51
+ end
52
+
53
+ def length
54
+ genome.length
55
+ end
56
+
57
+ def mutate!
58
+ rand(length).times { genome[rand(length)] ^= true }
59
+ end
60
+
61
+ def cross!(unit)
62
+ (rand(length) + 1).times do
63
+ i = rand(length)
64
+ genome[i], unit.genome[i] = unit.genome[i], genome[i]
65
+ end
66
+ end
67
+
68
+ def <=>(target)
69
+ self.fitness <=> target.fitness
70
+ end
71
+
72
+ def inspect
73
+ "#{object_id} #{self.fitness}|#{self.weight} = #{genome.map {|i| i ? 1 : 0 }.join(', ')}"
74
+ end
75
+ end
76
+
77
+
78
+ require 'benchmark'
79
+
80
+ r = {}
81
+ Benchmark.bm do |x|
82
+ x.report('a') do
83
+ puts 'start'
84
+ 100.times do
85
+ units = Unit.evolve(32, 100, 0.8, 0.15)
86
+ unit = units.max
87
+ print unit.inspect + "\r"
88
+ r[unit.fitness] ||= 0
89
+ r[unit.fitness] += 1
90
+ end
91
+ puts 'end'
92
+ end
93
+ end
94
+
95
+ puts "100 times result: "
96
+ r.each do |val, times|
97
+ puts "#{val}: #{times} times"
98
+ end
99
+
data/examples/robot.rb ADDED
@@ -0,0 +1,229 @@
1
+ require 'bundler/setup'
2
+ require 'ga'
3
+
4
+ require 'parallel'
5
+
6
+ MAP_SIZE = 7
7
+
8
+
9
+ # 0 empty 1 dust 2 wall
10
+ # [x][y]
11
+ def new_map
12
+ MAP_SIZE.times.map { [0] * MAP_SIZE }
13
+ end
14
+
15
+ def rand_map(map, dust_rate = 0.5)
16
+ map.each do |cols|
17
+ cols.length.times {|i| cols[i] = rand() <= dust_rate ? 1 : 0 }
18
+ end
19
+ end
20
+
21
+ def show_map(map, bx = nil, by = nil)
22
+ puts('-' * 20)
23
+ MAP_SIZE.times do |y|
24
+ MAP_SIZE.times do |x|
25
+ if bx == x and by == y then
26
+ print(map[x][y], '* ')
27
+ else
28
+ print(map[x][y], ' ')
29
+ end
30
+ end
31
+ print("\n")
32
+ end
33
+ puts('-' * 20)
34
+ end
35
+
36
+
37
+ # 0 random move
38
+ # 9 clear
39
+ # 1 2 3
40
+ # 4 5
41
+ # 6 7 8
42
+ ACTIONS_DATA = {
43
+ 0 => nil,
44
+ 9 => nil,
45
+
46
+ # 1 => [-1, -1],
47
+ 2 => [0, -1],
48
+ # 3 => [1, -1],
49
+
50
+ 4 => [-1, 0],
51
+ # 5 => [1, 0],
52
+
53
+ 6 => [-1, 1],
54
+ # 7 => [0, 1],
55
+ 8 => [1, 1]
56
+ }
57
+
58
+ ACTIONS = ACTIONS_DATA.keys
59
+ MOVE_ACTIONS = [2, 4, 6, 8]
60
+
61
+ class Robot
62
+ include GA
63
+
64
+ # genome
65
+ #
66
+ # {env => action}
67
+ #
68
+ # env: '10122'
69
+ # 1
70
+ # 2 3 4
71
+ # 5
72
+ # action:
73
+
74
+ attr_accessor :genome, :fitness
75
+ TOTAL_VALUE_TEST = 150
76
+
77
+ def self.random_new
78
+ self.new({})
79
+ end
80
+
81
+ def initialize(genome)
82
+ @genome = genome.dup
83
+ end
84
+
85
+ def fitness
86
+ tester = RobotTester.new(self)
87
+ @fitness ||= TOTAL_VALUE_TEST.times.map { tester.test }.reduce(&:+) / TOTAL_VALUE_TEST
88
+ end
89
+
90
+ def <=>(target)
91
+ fitness <=> target.fitness
92
+ end
93
+
94
+ def analyse_env(env)
95
+ @genome[env] ||= if env[2] == '1' then
96
+ 9
97
+ elsif env == '00000' then
98
+ 0
99
+ else
100
+ MOVE_ACTIONS.sample
101
+ end
102
+ end
103
+
104
+ def cross!(target)
105
+ all_genome = (genome.keys + target.genome.keys).uniq
106
+ len = all_genome.length
107
+ min_robot = [self, target].min
108
+
109
+ rand(len).times do
110
+ gene = all_genome[rand(len)]
111
+
112
+ if genome[gene] == target.genome[gene] and rand() < 0.3 then
113
+ min_robot.genome[gene] = ACTIONS.sample
114
+ else
115
+ genome[gene], target.genome[gene] = target.genome[gene], genome[gene]
116
+ end
117
+ end
118
+ end
119
+
120
+ def mutate!
121
+ all_genome = genome.keys
122
+ len = all_genome.length
123
+
124
+ (rand(len) + 1).times do
125
+ gene = all_genome[rand(len)]
126
+ genome[gene] = ACTIONS.sample
127
+ end
128
+ end
129
+ end
130
+
131
+ class RobotTester
132
+ attr_reader :map, :robot
133
+
134
+ def initialize(robot)
135
+ @map = new_map
136
+ @robot = robot
137
+ end
138
+
139
+ def test(step = 70, show = false)
140
+ rand_map(map)
141
+ x = rand(map.length)
142
+ y = rand(map.length)
143
+ @total_value = 0
144
+
145
+ step.times do
146
+ env = scan_env(x, y)
147
+ action = robot.analyse_env(env)
148
+ rx, ry = execute_action(x, y, action)
149
+
150
+ x += rx
151
+ y += ry
152
+
153
+ if x < 0 or y < 0 or x >= MAP_SIZE or y >= MAP_SIZE then
154
+ x -= rx
155
+ y -= ry
156
+ @total_value -= 10
157
+ elsif map[x][y] == 1
158
+ @total_value += 1
159
+ end
160
+
161
+ if show then
162
+ show_map(map, x, y)
163
+ sleep 0.2
164
+ end
165
+ end
166
+
167
+ @total_value
168
+ end
169
+
170
+ def execute_action(x, y, action)
171
+ case action
172
+ when 9 then
173
+ if map[x][y] == 1 then
174
+ map[x][y] = 0
175
+ @total_value += 10
176
+ else
177
+ @total_value -= 10
178
+ end
179
+
180
+ [0, 0]
181
+ when 0 then
182
+ @total_value -= 1
183
+ ACTIONS_DATA[MOVE_ACTIONS.sample]
184
+ else
185
+ @total_value -= 1
186
+ ACTIONS_DATA[action]
187
+ end
188
+ end
189
+
190
+ SCAN_COORDS = [
191
+ [0, -1], [-1, 0], [0, 0], [1, 0], [0, 1]
192
+ ]
193
+ def scan_env(x, y)
194
+ SCAN_COORDS.map do |sx, sy|
195
+ rx = x + sx
196
+ ry = y + sy
197
+
198
+ if rx < 0 || ry < 0 || rx >= MAP_SIZE || ry >= MAP_SIZE then
199
+ 2
200
+ else
201
+ map[rx][ry]
202
+ end
203
+ end.join
204
+ end
205
+ end
206
+
207
+
208
+ ga_zoo = Robot.new_ga_zoo
209
+ ga_zoo.debug!
210
+
211
+ ga_zoo.before_init_fitness do |units|
212
+ vs = Parallel.map(units, in_processes: 8) do |unit|
213
+ [unit.fitness, unit.genome]
214
+ end
215
+ units.each_with_index do |unit, index|
216
+ unit.fitness, unit.genome = vs[index]
217
+ end
218
+ end
219
+
220
+ robots = ga_zoo.evolve(256, 300)
221
+ robot = robots.max
222
+
223
+ RobotTester.new(robot).test(100, true)
224
+
225
+ puts "========= result ============="
226
+ puts "fitness: #{robot.fitness}"
227
+ puts robot.genome
228
+
229
+
data/ga.gemspec ADDED
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'ga/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "ga"
8
+ spec.version = GA::VERSION
9
+ spec.authors = ["jiangzhi.xie"]
10
+ spec.email = ["xiejiangzhi@gmail.com"]
11
+
12
+ spec.summary = %q{Simple Framework of Genetic Algorithm}
13
+ spec.description = %q{Simple Framework of Genetic Algorithm}
14
+ spec.homepage = "https://github.com/xjz19901211/ga"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ f.match(%r{^(test|spec|features)/})
19
+ end
20
+ spec.bindir = "exe"
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.13"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "rspec", "~> 3.0"
27
+ spec.add_development_dependency "pry"
28
+ end
data/lib/ga/version.rb ADDED
@@ -0,0 +1,3 @@
1
+ module GA
2
+ VERSION = "0.1.0"
3
+ end
data/lib/ga/zoo.rb ADDED
@@ -0,0 +1,98 @@
1
+ module GA
2
+ class Zoo
3
+ attr_reader :unit_cls
4
+
5
+ def initialize(unit_cls)
6
+ @unit_cls = unit_cls
7
+ @debug = false
8
+ @before_fitness_callback = nil
9
+ end
10
+
11
+ def evolve(units = 32, generations = 100, crossover_rate = 0.8, mutation_rate = 0.15)
12
+ units = units.times.map { unit_cls.random_new } if units.is_a?(Fixnum)
13
+
14
+ generations.times do |i|
15
+ @before_fitness_callback.call(units, i + 1) if @before_fitness_callback
16
+ output_debug_info(units, generations, i + 1) if @debug
17
+
18
+ units = select_units(units)
19
+ cross(units, crossover_rate)
20
+ mutate(units, mutation_rate)
21
+ end
22
+
23
+ return units
24
+ end
25
+
26
+ def debug!
27
+ @debug = true
28
+ end
29
+
30
+ def before_init_fitness(&block)
31
+ @before_fitness_callback = block
32
+ end
33
+
34
+
35
+ private
36
+
37
+ def select_units(units)
38
+ new_units = units.map do
39
+ ou = units.sample(3).max
40
+ unit_cls.new(ou.genome).tap {|u| u.fitness = ou.fitness }
41
+ end
42
+
43
+ # Elite policy
44
+ min_index = new_units.index(new_units.min)
45
+ if min_index != 0 then
46
+ new_units[min_index], new_units[0] = new_units[0], new_units[min_index]
47
+ end
48
+ new_units[0] = unit_cls.new(units.max.genome)
49
+ new_units
50
+ end
51
+
52
+ def cross(units, rate)
53
+ last_index = nil
54
+
55
+ units.each_with_index do |unit, index|
56
+ next if index == 0
57
+ next if rand() >= rate
58
+
59
+ if last_index
60
+ units[last_index].cross!(unit)
61
+ # recalculate fitness
62
+ units[last_index].fitness = unit.fitness = nil
63
+ last_index = nil
64
+ else
65
+ last_index = index
66
+ end
67
+ end
68
+ end
69
+
70
+ def mutate(units, rate)
71
+ units.each_with_index do |unit, index|
72
+ next if index == 0
73
+ next if rand() >= rate
74
+ unit.mutate!
75
+ # recalculate fitness
76
+ unit.fitness = nil
77
+ end
78
+ end
79
+
80
+ def output_debug_info(units, generations, generation)
81
+ units.sort!
82
+ info = [
83
+ "GA-#{generation}/#{generations} #{units.count}-#{units[-1].genome.length}",
84
+ ' fitness: '
85
+ ]
86
+
87
+ if units.length <= 7 then
88
+ info << units.map(&:fitness).join(', ')
89
+ else
90
+ info << "#{units[0..2].map(&:fitness).join(', ')}"
91
+ info << " ... #{units[-5..-1].map(&:fitness).join(', ')}"
92
+ end
93
+
94
+ puts info.join
95
+ end
96
+ end
97
+ end
98
+
data/lib/ga.rb ADDED
@@ -0,0 +1,19 @@
1
+ require "ga/version"
2
+ require "ga/zoo"
3
+
4
+ module GA
5
+ def self.included(cls)
6
+ cls.extend(ClassMethods)
7
+ end
8
+
9
+ module ClassMethods
10
+ def new_ga_zoo
11
+ GA::Zoo.new(self)
12
+ end
13
+
14
+ def evolve(total_units = 32, generations = 100, crossover_rate = 0.8, muration_rate = 0.1)
15
+ new_ga_zoo.evolve(total_units, generations, crossover_rate, muration_rate)
16
+ end
17
+ end
18
+ end
19
+
metadata ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ga
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - jiangzhi.xie
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-02-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.13'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.13'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: Simple Framework of Genetic Algorithm
70
+ email:
71
+ - xiejiangzhi@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - ".travis.yml"
79
+ - Gemfile
80
+ - LICENSE.txt
81
+ - README.md
82
+ - Rakefile
83
+ - bin/console
84
+ - bin/setup
85
+ - examples/01bag.rb
86
+ - examples/robot.rb
87
+ - ga.gemspec
88
+ - lib/ga.rb
89
+ - lib/ga/version.rb
90
+ - lib/ga/zoo.rb
91
+ homepage: https://github.com/xjz19901211/ga
92
+ licenses:
93
+ - MIT
94
+ metadata: {}
95
+ post_install_message:
96
+ rdoc_options: []
97
+ require_paths:
98
+ - lib
99
+ required_ruby_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ required_rubygems_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ requirements: []
110
+ rubyforge_project:
111
+ rubygems_version: 2.5.2
112
+ signing_key:
113
+ specification_version: 4
114
+ summary: Simple Framework of Genetic Algorithm
115
+ test_files: []