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

Life game

Unread post by Ferenc Nagy »

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

Unread post by globaltechno »

is this Game play?
User avatar
Ferenc Nagy
VIP Member
Posts: 215
Joined: 24 Apr 2007 12:26

Unread post by Ferenc Nagy »

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 state
<br />birth_condition([1,2]).
<br />death_condition([5,6,7,8]).
Initial state
birth_condition([1,2]).
death_condition([5,6,7,8]).
Initial.png (4.56 KiB) Viewed 41615 times
Final state
Final state
Final.png (7.78 KiB) Viewed 41615 times
TIA, Regards,
Frank Nagy
Post Reply