je dois definir un predicat "pred1" tel que pred1(U,U_,N) est vrai si
l'univers U_ est le résultat de l'évolution l'univers U en N étapes ( les
bords etant constitues de cellules definitivement mortes).
et puis le predicat "pred2" tel que pred2(U,U_,N) est vrai si l'univers U_
est le résultat de l'évolution l'univers U en N étapes ( les cellules de la
bordure inferieure (resp.droite) sont voisines de celles de la bordure (
resp. gauche) , attention aux coin
est ce que quelqu' un sait ou je pourrais trouver le jeux de la vie
programmé en prolog
merci
Can you at least try formulating your problem in english ? This is an
international newsgroup, and not everyone speaks french.
cheers,
Remko
Not everyone speaks English, for that matter. Anyway:
The subject is the game of life.
He wants to define a predicate such that pred1(U,U_,N)
succeds if the universe U_ is the result of the evolution of U
in N steps. The border of the universe is composed of dead
cells which stay dead.
Then he wants to define an analogous predicate but on a
toroidal universe.
In addition, he searches for an implementation of
the game of life in Prolog
At the end he thanks. 8^)
[end of paraphrase]
I'm curious too about what data structures would be good
for implementing life in prolog with acceptable performance.
Anyone?
P.
> I'm curious too about what data structures would be good
> for implementing life in prolog with acceptable performance.
>
> Anyone?
Not sure you will find a data structure with acceptable performance, but
why not Google for
Prolog "game of life"
The second hit shows an old posting to comp.lang.prolog :-)
If you find something interesting, tell us about it please.
Cheers
Bart Demoen