Blog > My New Project: Conway’s Game of Life

My New Project: Conway’s Game of Life

January 16th, 2009

Sometime around the start of December I was reminded of Conway’s Game of Life – a mathematical “game” that I was first introduced to in my grade 12 programming class. Unfortunately for me and my research, I found the game much more interesting this time around and have proceeded to spend almost the entire last month dedicated to it.

It started out innocently enough; I thought that a webpage that uses the canvas tag to run the Game of Life would be the perfect way to hammer home what I was talking about in this post. It turns out that the game gets quite computationally intensive for even moderately-sized patterns however, so although the tool was functional, it chugged. What would be the solution to this problem? Write the tool in a pre-compiled programming language like Java, of course.

There are several Java implementations of the game freely available on the internet, but at this point I wanted to make an online tool that does a bit more than just evolve patterns; I wanted also to be able to upload, save, and download pattern files from the tool, something that is quite impossible from a Java applet. Also, because building interfaces for Java applets is a bit of a chore, most of the pre-existing Java applets implementing the game are a bit hard to look at. All of these problems can be solved via a bit of server-side ASP and some Java-to-javascript communication, fortunately (something I will post about separately later).

The end result? Well, I don’t really know yet, but here’s the beta 0.2.0 result:

ConwayLife.com

The Java applet that runs the game itself is based on Alan Hensel’s brilliantly fast Java staggerstep algorithm, with some added file manipulation functionality and a dynamic online database of patterns. The applet is still very much a work in progress and there are quite a few known bugs, but it works well enough for now.

The real star of the website for now is the LifeWiki, which I’m hoping will fill a huge gap on the internet that I was rather shocked to find – even though there are many great homepages with bits and pieces of information about the game scattered across the internet, there really is no central resource that catalogues everything about the game; LifeWiki will hopefully fill that gap. I have started it off with some 150 articles and uploaded as many images, but I’m hoping that I can draw a few other Life enthusiasts to the wiki to help expand it so as to ease some of the burden.

Anyway, that’s about all I have to say for now about the website; I’ll likely make another post or two in the reasonably near future with coding tips/tricks based on my experience making the tool and site in general. Until then, I present to you my favourite pattern for the Game of Life, the Canada goose:

Canada goose

PS. Happy birthday to me!

  1. Elithrion
    February 3rd, 2009 at 15:52 | #1

    So that’s where you’ve disappeared to recently! There, I made some hopefully vaguely helpful contributions. Now finish up and then sneakily edit a link to your version into the wikipedia article to generate some actual attention (plus, your version is actually nice and pretty and stuff).

    Also, on a random note, I’ve actually been to a few Conway lectures, some 5.5 years ago now, albeit more about Knot theory and some games and some general things about dealing with infinity, and not about Life. He’s fun to listen to, and quite cool, anyway.

  2. February 3rd, 2009 at 16:49 | #2

    Yeah, silly me always getting sidetracked with new projects :$

    I have a few things I wanna fix up with the tool itself and a few more pages I wanna fix up/add to the LifeWiki before I advertise it around too much, but it’s coming along pretty nicely. And thanks for signing up at the wiki, I got way too excited when I saw that someone else finally added a page ;)

  3. anders Horn
    March 15th, 2009 at 02:07 | #3

    It seems quite nice and very useful but It’s not working with my browser, all the menus and controls except for the slider on the left hand side are visible for just enough of a second to catch the flash of them existing before being over written with the field. I was really hoping to get to look at long term patterns since this has the ability to be the largest grid I could find on the internet.

  4. anders
    March 15th, 2009 at 02:13 | #4

    I forgot to say that my browser is safari which strikes me as rather ironic in some way.

  5. March 15th, 2009 at 09:34 | #5

    @anders

    Strange, I use Chrome which also uses Webkit, so I assumed it would behave the same as Safari. Until I get this fixed, you could try using it in Firefox, since that for sure works. Alternatively, Alan Hensel’s applet at http://www.ibiblio.org/lifepatterns/ can be scaled to be a large as you want, though I’m not sure if you can load in external pattern files or not.

    Thanks for letting me know.

  6. March 15th, 2009 at 11:54 | #6

    Upon looking into this deeper, it looks like there genuinely isn’t a solution to the problem for Safari (Safari just doesn’t play nicely with drawing stuff over top of Java applets — see http://discussions.apple.com/thread.jspa?threadID=1936634&tstart=135)

    Anyways, I’ve added a “compatability mode” to the site that at least makes the webpage usable for Safari users. If you access the website via Safari, the controls now appear at the top-right corner of the page rather than the bottom-right. Let me know how that works for you.

  7. anders
    March 15th, 2009 at 22:24 | #7

    thank you

  8. anders
    March 15th, 2009 at 22:33 | #8

    well, I tried fire fox and it has the exact same problem for me, so I don’t know where the problem is coming from.

  9. przemo_li
    November 27th, 2009 at 16:43 | #9

    Hi I’m making a Game of life implementation for C++ at my University. And I wish to add your online database to my app. Is this possible ? Ok I know that if I ask Your database will let me see any pattern I know. But the problem is that I need to discover names of patterns first. Is this possible with your database.

    (Simple string with names will be enough).
    And can you tell me how often new patterns are added to database ? (To avoid querying database every start looking for new ones).

  10. November 27th, 2009 at 18:28 | #10

    @przemo_li – New patterns aren’t added terribly frequently (basically just as they are discovered at this point). Certainly no more than one or two are added a week nowadays.

    As for the accessing the pattern database itself, you could have your program access the following HTML file, which auto-updates itself on my server:

    http://www.conwaylife.com/gollycomplete.html

    Note though that the links on that page are not normal HTML links (for example, the link for the first file is “get:pattern.asp?p=101.rle”), so you will have to alter the link a bit to access the actual RLE file on my server (for example, the correct link would be “http://www.conwaylife.com/pattern.asp?p=101.rle”).

    Alternatively, if you just want to download the entire pattern collection to have an offline version of it, here is a reasonably up-to-date .zip file of it:

    http://www.conwaylife.com/forums/download/file.php?id=32

    All the best!

  11. przemo_li
    November 28th, 2009 at 03:35 | #11

    Thank You. I think downloading .zip and checking for new not listed in zip file would be the best.

    And I’ll add links to your wiki as your applet do.

  12. January 25th, 2010 at 05:39 | #12

    Your project seems to be very nice and ambitious. I think your site will be the best Conway’s Game of Life site when you get your applet to work. As it is now, it makes my firefox browser to crash and it doesn’t work at all in Chrome.

    I have started a similar project for similar reasons. At the time I started, I was looking at Google Web Toolkit (compiles Java code into JavaScript) and did some searched on Google for Game of Life and found that the top results where not so very impressing. I thought I could do something better with GWT with the additional benefit that no Java plug-in would be necessary.

    The result can be found on:
    http://www.conwaysgameoflife.net

    I also plan to add a pattern archive and maybe possibility to save patterns. I would like to spend more time on it but to get that time is a problem for me. I will probably make it open source soon so other people can add futures to it.

  13. Paul Wilson
    January 5th, 2013 at 16:02 | #13

    BOO

    I have not seen any new material in your LIFEWIKI in a good while. I found this link while seeing if any new LIFE website has arisen. Today I extirpated 6 websites from my favorites links ,two were app. abandoned by their managers and I was tired of waiting, two were schlubby cartoon sites, and two were unwanted BINGs. I schelduled their deletion today, having given their managers more than enough time to quit their games and revitalize their websites.

    Hopefully I won’t have to delete YOU and Lifenews(Pentadecathlon.com – laptop just sits on its hands if I try to log on).

    I have ~365 oscillators (I can’t get an exact count),~136 spaceships (again unable to get an exact count), 14 puffer trains, 5 guns, 1 factory, 3 Rakes, 6 stretchers *, 1 Space-Filler. I can’t manage the HUGE patterns that calculate prime numbers, etc. My highest oscillator is P256, but I have schematics for a P598 system (needs finer resolution graph paper).

    I hope this is not a deadened website,that my comment won’t be just spit back with a ADDRESS NOT FOUND message.

    I also have many,many ancestors to still-lifes AND to common patterns. Both long-term and not so long-term

    * Stretchers include 2 Growing Spaceships, 1 wick-stretcher …

  14. January 6th, 2013 at 12:45 | #14

    @Paul Wilson – LifeWiki is, as its name suggests, a wiki. You’re very welcome to start/refine articles on it if you think it is missing important/new information. Myself and other editors try to keep it up-to-date as new important patterns are discovered (e.g., Gemini), but we can’t just make up new information to add to it if we’re not made aware of it.

    Post your patterns on the ConwayLife forums (www.conwaylife.com/forums) if you want other people to see them.

  15. July 27th, 2014 at 12:38 | #15

    Once you find the best skin care product for healthy skin that works well for you, then your search is over and
    you should not readily try new products unless you are pretty well
    convinced that they have something that your current skin care line doesn. Water is important for not only hydrating and energizing our body, but our skin as well.
    Another way to prevent sun damage is to arm the body from the
    inside out by eating plenty of cancer fighting deep red and green vegetables such as
    broccoli, swiss chard, beets and greens.

  16. July 27th, 2014 at 15:15 | #16

    The President just said he’s dialing O for O’Malley.
    It has become the quintessential social event of any pre-game festivities and, what was originally an underground subculture, is now part of the mainstream sports atmosphere.

    A refrigerator is one of the most complex and important items to consider while you are moving.

  17. July 28th, 2014 at 06:13 | #17

    They commit their selves to specific exercise and a healthy diet to help them regain their
    body shape and curves before they got pregnant. Janet Henderson was awake for the whole Smart
    - Lipo procedure. The need to lose weight fast has increased the popularity of the liposuction procedure.

  18. July 29th, 2014 at 22:29 | #18

    I always spent my half an hour to read this website’s content all the time along with a mug of coffee.

  19. July 30th, 2014 at 17:27 | #19

    Great delivery. Solid arguments. Keep up the
    amazing work.

  20. July 30th, 2014 at 19:29 | #20

    A word of warning though, the top is more for the smaller girls so a
    C cup would probably be the largest you should
    try with this maternity swimwear. A cruise is a great time to add a bit of extra style to one’s wardrobe, since
    one will be wearing the maternity swimwear so much. February 27 – March 1, 2011 – JA New York Winter Show:.

  1. No trackbacks yet.