4 ms·
Conway's Game of Life
- twistedanimator 17y agoI've been on a little Conway's Game of Life kick for the past couple weeks myself. Such a simple algorithm like this is great for learning a new programming language. I recently started learning python, so I wrote an implementation using the pygame library. If you're interested, you can see it here: http://readysquid.com/blog/programming/conways-game-of-life/ http://readysquid.com/blog/programming/conways-game-of-life/ Feel free to take the source and play with it if you'd like.
- NathanKP 17y agoNice share. It probably can't compete with a major Game of Life simulator such as Golly, but I agree that Conway's Game of Life is an excellent little programming project that is entertaining to implement in different languages.
- cool-RR 17y agoThis article that you linked to from your site: http://lbrandy.com/blog/2009/07/computational-performanc-a-beginners-case-study/ http://lbrandy.com/blog/2009/07/computational-performanc-a-b... Is really eye opening.
- vijayr 17y agosomeone should write an iPhone app for this. it would be a big hit
- NathanKP 17y agoGreat idea. I can definitely see that taking off. I even thought it would make a great RTS game. How fast can you build spaceships and breeders to destroy the enemies spaceship fleet. Though it is a cellular simulation it is also a game.
- Zev 17y agoThere already are a number of iPhone implementations of Conways game of Life: http://ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?entity=software&media=all&submit=seeAllLockups&term=Conway http://ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa... Reading the reviews, its not really a hit; people don't always seem to get the game.
- NathanKP 17y agoToo bad. Perhaps if it was made into more of a game, with a multiplayer aspect it would be possible.
- Zev 17y agoHow could you make Life into "more of a game"? Let two people make figures and hope they move in the general direction of one another to "fight"?
- ricree 17y agoI played a version once that shipped with an old windows game pack. Each turn, each player was allowed to add one cell of their color and remove one of their opponent's, after which the rules were applied. The goal was to eliminate all of your opponent's cells. I remember finding it fun at the time, but I haven't played it in years. Edit: I found the wikipedia article for the game: http://en.wikipedia.org/wiki/Life_Genesis http://en.wikipedia.org/wiki/Life_Genesis
- RiderOfGiraffes 17y agoSo rarely are the theoretical aspects written about. At least this one mentions a Turing Machine in passing. Think about that. We can build a Life pattern that looks for a counter-example to the Goldback Conjecture (GC). We can build a Life pattern such that if the GC is true, the pattern will grow forever, but if it's false, then the pattern self-destructs. With our current knowledge in mathematics, no one can tell the eventual fate of the pattern. That's a pretty deep result, equivalent (sort-of) to the Halting Problem. I wish someone had told me that when I was writing my first "Life" simulators in 1979. Note: The GC says every even number from 4 onwards can be written as the sum of two primes. If you like you could use another unsolved problem, like the Collatz conjecture - http://en.wikipedia.org/wiki/Collatz_conjecture http://en.wikipedia.org/wiki/Collatz_conjecture
- NathanKP 17y agoGood point. The theoretical aspects of Conway's Game of Life are really eye opening. Interestingly I have found research material that hints that Conway designed the rules specifically so that it would not be possible to determine whether or not a pattern would grow indefinitely. It is not possible to prove that there is a pattern which can grow endlessly.
- sp332 17y agoThat's not quite right. Conway originally intended that no pattern could grow indefinitely, but a pattern was quickly found that could grow forever: the Gosper glider gun. http://en.wikipedia.org/wiki/Gun_%28cellular_automaton%29 http://en.wikipedia.org/wiki/Gun_%28cellular_automaton%29
- jacquesm 17y agoI posted this the other day : http://news.ycombinator.com/item?id=725017 http://news.ycombinator.com/item?id=725017 More life patterns than you can view in a week.
- teeja 17y agoInteresting, I just ran across this wiki a couple of days ago http://www.conwaylife.com/wiki/index.php?title=Main_Page http://www.conwaylife.com/wiki/index.php?title=Main_Page Conway's - too damn - interesting. After a few months I saw myself in one of those flip-flops.
- mynameishere 17y agoThis applet has a bunch of interesting patterns. Click "Enjoy Life" then "Open" http://www.ibiblio.org/lifepatterns/ http://www.ibiblio.org/lifepatterns/