Presentation is loading. Please wait.

Presentation is loading. Please wait.

Game of Life Changhyo Yu 2003. 06. 09. Game of Life2 Introduction Conway’s Game of Life  Rule Dies if # of alive neighbor cells =< 2 (loneliness) Dies.

Similar presentations


Presentation on theme: "Game of Life Changhyo Yu 2003. 06. 09. Game of Life2 Introduction Conway’s Game of Life  Rule Dies if # of alive neighbor cells =< 2 (loneliness) Dies."— Presentation transcript:

1 Game of Life Changhyo Yu 2003. 06. 09

2 Game of Life2 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

3 Game of Life3 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.

4 Game of Life4 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

5 Game of Life5 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

6 Game of Life6 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

7 Game of Life7 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

8 Game of Life8 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

9 Game of Life9 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.


Download ppt "Game of Life Changhyo Yu 2003. 06. 09. Game of Life2 Introduction Conway’s Game of Life  Rule Dies if # of alive neighbor cells =< 2 (loneliness) Dies."

Similar presentations


Ads by Google