1 / 9

Game of Life

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

xanthe
Télécharger la présentation

Game of Life

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Game of Life Changhyo Yu 2003. 06. 09

  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 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 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

  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. Game of Life

More Related