FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log inLog in 


Life game

Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog Tips & Samples
View previous topic :: View next topic  
Author Message
Ferenc Nagy



Hungary
Joined: 24 Apr 2007
Posts: 378

PostPosted: 27 Apr 2016 17:16    Post subject: Life game Reply with quote

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?title=3rd:Life_Game, from November 2015 to present.
Detailed description in progress.

_________________
TIA, Regards,
Frank Nagy
Back to top
View user's profile Send private message
globaltechno



Việt Nam
Joined: 05 May 2016
Posts: 1

PostPosted: 5 May 2016 4:45    Post subject: Reply with quote

is this Game play?
Back to top
View user's profile Send private message
Ferenc Nagy



Hungary
Joined: 24 Apr 2007
Posts: 378

PostPosted: 6 May 2016 8:27    Post subject: Reply with quote

Globaltecho,

It is not such a play where you have to kill monsters.
It is a mathematical problem: https://en.wikipedia.org/wiki/Conway's_Game_of_Life.

There is a grid with empty and inhabited cells.
You have to mark the initially inhabited cells.

There are rules for birth and death, like:
If an empty cell has one or two inhabited neighbors it becomes inhabited.
If an inhabited cell has more than 3 inhabited neigbors then the central cell becomes empty.

Let you try the game on paper on pencil on an 55 grid with different initial conditions:


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.



Final.png
 Description:
Final state
 Filesize:  7.78 KB
 Viewed:  1147 Time(s)

Final.png



Initial.png
 Description:
Initial state
birth_condition([1,2]).
death_condition([5,6,7,8]).
 Filesize:  4.56 KB
 Viewed:  1147 Time(s)

Initial.png



_________________
TIA, Regards,
Frank Nagy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog Tips & Samples All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum