Life game

Share Tips, Code Samples, etc. with the Visual Prolog community.
Post Reply
User avatar
Ferenc Nagy
VIP Member
Posts: 343
Joined: 24 Apr 2007 12:26

Life game

Post by Ferenc Nagy » 27 Apr 2016 17:16

Many thanx to everybody who have answered my questions emerged during the development of my wiki contribution, the Life game http://wiki.visual-prolog.com/index.php ... :Life_Game, from November 2015 to present.
Detailed description in progress.
TIA, Regards,
Frank Nagy

globaltechno
Posts: 1
Joined: 5 May 2016 4:37

Post by globaltechno » 5 May 2016 4:45

is this Game play?

User avatar
Ferenc Nagy
VIP Member
Posts: 343
Joined: 24 Apr 2007 12:26

Post by Ferenc Nagy » 6 May 2016 8:27

Code: Select all

1 ooooo ooooo ooxoo ooooo ooooo   2 ooooo ooxoo ooxoo ooxoo ooooo   3 ooooo ooxoo oxxxo ooxoo ooooo  
The game has three outcomes:
1) All inhabitants die out.
2) You achieve a steady state.
3) The picture of earlier generation is repeating i.e. the film is periodic.

Fourth possibility does not exist because the grid and the number of possible states of its cells is finite.

Change the rules for birth and death, and try again:
If an empty cell has two inhabited neighbors it becomes inhabited.
If an inhabited cell has exactly 3 inhabited neigbors then the central cell becomes empty.
Attachments
Initial.png
Initial state
birth_condition([1,2]).
death_condition([5,6,7,8]).
Initial.png (4.56 KiB) Viewed 1545 times
Final.png
Final state
Final.png (7.78 KiB) Viewed 1545 times
TIA, Regards,
Frank Nagy

Post Reply