Evolution of Rules in Conway's Game of Life: Genetic Algorithm Exploration
90 likes | 206 Vues
Dive into the world of cellular automata with a focus on modifying the classic Conway's Game of Life rules using a Genetic Algorithm approach. Explore how changing neighbor cell conditions affect the evolution of patterns. Experiment with fitness functions and genetic operations to discover intriguing rule variations.
Evolution of Rules in Conway's Game of Life: Genetic Algorithm Exploration
E N D
Presentation Transcript
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 • Possible rules to program the Game of Life • 3^9 = 19683 Game of Life
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
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
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
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 Game of Life
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
Result ( example at 100 generations ) • Log files during the simulation Rules 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
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. Game of Life