For Programmers: Free Programming Magazines  


Home > Archive > Prolog > November 2007 > Still life search in Prolog









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Still life search in Prolog
Chip Eastham

2007-11-21, 7:09 pm

On Nov 4, 4:41 pm, Ecirbaf <fabrice.march...@orange.fr> wrote:
>
>
> Thanks a lot !
>
> I see. that's perfect for the magic square.
>
>
> So there is no general method to program this symmetry breaking...
> And I absolutely do not see now how I could break the symmetry in
> the search of still lives for Conway Game of life, where binary state
> cells lay on a board.
>
> But I'll think a bit more.
>
> Regards,
>
> Fabrice


Because Conway's Game of Life uses a rectangular
grid array for the state transition cells/automata,
I'd been thinking about this problem in connection
with matrices, the "missing" datatype in Prolog.

However the Game of Life assigns only binary 0/1
values for the state of cells. While driving my
daughter to school this morning, I thought of an
approach, modelling as a set those nodes with
state 1.

Of course sets are also not a native datatype of
Prolog, but determining by row and column the
presence/absence of nodes can be adequately met
by an ordered list-of-lists structure.

--c
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com