Conway's Life

David Eppstein eppstein at ics.uci.edu
Thu Jul 19 22:29:30 EDT 2001


On Fri, 20 Jul 2001 01:10:56 GMT, Doug Newhouse <n at .com> wrote:
> > I'm a recreational programmer with some pretty basic experience in
> > Python and I'm looking for a good way to implement the grid needed for
> > Life (or other cellular automata) in Python.

Rather than using grids, Life implementations can really benefit from the 
sort of more complicated data structure that Python makes easy.  A couple 
non-Python examples worth study are in

http://tomas.rokicki.com/hlife/
uses hash tables to avoid recomputing evolution of previously-seen patterns
(he's not kidding about running 2^3000 generations of a breeder)

http://hensel.lifepatterns.net/
nice (and fast, but not as good as hashlife) Java Life pattern viewer 
applet, source in http://hensel.lifepatterns.net/lifeapplet.html
-- 
David Eppstein       UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/



More information about the Python-list mailing list