Upload
caleb-bauer
View
16
Download
0
Embed Size (px)
DESCRIPTION
Game of Life. Changhyo Yu 2003. 06. 09. Introduction. Conway’s Game of Life Rule Dies if # of alive neighbor cells =< 2 (loneliness) Dies if # of alive neighbor cells >= 5 (overcrowding) Lives if # of alive neighbor cells = 3 (procreation) Remains if # of alive neighbor cells = 4 - PowerPoint PPT Presentation
Citation preview
Game of Life
Changhyo Yu2003. 06. 09
Game of Life 2
Introduction Conway’s Game of Life
Rule Dies if # of alive neighbor cells =< 2 (loneliness) Dies if # of alive neighbor cells >= 5 (overcrowding) Lives if # of alive neighbor cells = 3 (procreation) Remains if # of alive neighbor cells = 4
Possible rules to program the Game of Life 3^9 = 19683
Game of Life 3
Modified Game of Life New rules
Dies if # of alive neighbor cells = { a, b, c, … } Lives if # of alive neighbor cells = { a’, b’, c’, … } Remains if # of alive neighbor cells = { a’’, b’’, c’’, …} Ex). Rules= { 001200000 } => same as conway’s
Way to find a new rule To acquire the wanted interestingness, use G.A.
Game of Life 4
Modified Game of Life – cont. Interestingness
Actively changing with each generation The wanted number of live cells
The fitness function of interestingness Fitness1 : The change in the 3x3 window Fitness2 : The difference between the current
live cells and next generation’s live cells
Game of Life 5
Genetic Algorithm Main routine
while(generation<MAXGENS) {select();crossover();mutate();evaluate();elitist();
} Population size : 25 Generation number :50 Probability of crossover : 0.25 Probability of mutation : 0.01 Evaluation number : 100 generations
Game of Life 6
Genetic Algorithm – cont. Variables
Rules[0] ~ [8] = { 0 1 0 0 2 0 0 1 0 }; Rule has any possible choices of 3^9
Fitness (1) The variation of live cells
Find a interesting variation : 22.5
1 0 1
0 1 0
1 0 0
7 8 9
4 5 6
1 2 3
0 0 1
0 0 0
1 1 1
7 8 9
4 5 6
1 2 3
Diff_a = 1x1 + 5x1 + 7x1 + 9x1=> 22
Diff_b = 1x1 + 2x1 + 3x1 + 9x1=> 15
Game of Life 7
Genetic Algorithm – cont. Fitness
(2) The wanted number of live cells Difference =
|Init_num_of_live_cells – current_num_of_live_cells|
Fitness = factor1 x fitness1 + factor2 x fitness2
Game of Life 8
Result ( example at 100 generations )
Log files during the simulationRules Generation Best Average Standard [0] - [8] number value fitness deviation
…0 0 1 2 1 0 0 2 0 7 0.122640734 0.092708531 0.000000002 0 0 1 2 1 0 0 2 0 8 0.122640734 0.093905819 0.005986441 0 0 1 2 1 0 0 2 0 9 0.122640734 0.095103108 0.008287852 0 0 1 2 1 2 0 0 0 10 0.215213906 0.101200611 0.025732998 …
Solution from the G.A. Best member of 1-th run : { 0 2 0 2 1 0 0 0 1 }Best fitness = 0.487417219 for 100 generation
Game of Life 9
Conclusion I made a method to find an interesting rule
by using G.A. But, I can’t find an interesting examples
because of the simulation time is too short to find a interesting result.
To find a useful rule, I should extend the generation number in the G.A.