Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Software Programming Entertainment Games Science Technology

Next-Gen Game of Life 99

SQL31337 writes "Jecology is a life simulator created in the spirit of Conway's Game of Life. It touches on many topics such as cellular automata, ecological balance, and the food chain. There is only one type of creature in Conway's Game of Life(CGoL). They reproduce, but do not mutate or evolve. They do not have to find food, but instead simply die based on scarcity or overpopulation. Jecology encompasses these aspects of ecology with a more complex simulation, but retains much of the elegant simplicity found in CGoL. Jecology is not merely a life simulator, but an ecology simulator. It is also an example of a complex system arising from simple rules, as described in A New Kind of Science. Screenshots and info about Jecology here."
This discussion has been archived. No new comments can be posted.

Next-Gen Game of Life

Comments Filter:
  • by QuantumG ( 50515 ) <qg@biodome.org> on Thursday July 07, 2005 @08:43PM (#13009836) Homepage Journal
    Even when people like Ray Kurzweil actually take Wolfram's work seriously they conclude that he's written the biggest book about nothing to ever lay claim to the title of Science. Nothing "new" or worthy of the title of "science" came out of Wolfram's 10 year hiatus into cellular autonoma. Certainly nothing useful or enlightening either. However we did get to tolerate his smug superior "I invented the universe" style for 1488 pages.
    • I don't really care about Wolfram's book. I read it all, and feel much the same way about it that you do. Did you try my program? :)
      • Of course, got up to L.
      • It is neat, however you should reset the playing area to pure black before the game begins as my terminal's default background is not black and it looks a bit screwy before it gets going.

        BTW, I'm using OSX. No errors or warnings, compiles just fine out of the box.
        • Will do. ;) I've always run it on a black terminal. Nice to know it works on OSX as well.
          • First run the highest I saw was a 'P'.

            The big problem with it is that there seems to be die-back is pretty much inevitable because the later letters are constrained in what they eat. If there aren't enough immediate ancestors they eventually die out.

            If there were an injection of 'fresh blood' when things got stagnent that might help. I noticed that after a while I was left with 'C', 'D' and 'H' pieces which just didn't find each other. Sometimes new letters such as 'L' would appear and not even move -

            • I ran it with a rather large universe (terminal window stretched across two screens) and some favorable initial conditions (1000 As and 1000 Bs to start with), and it managed to survive for over 7800 generations. The highest creature I saw was a ']', which appeared slightly before the universe self-destructed.
        • You might also want to call attron(A_BOLD) in your display initialization function. It makes everything much easier to see.
      • I tried some variations such as having them stop eating when the population of their prey gets too low. They still manage to extinct themselves eventually. If I get past Z, it just keeps going into higher characters.
      • It compiles just fine under Win2k running Cygwin. Just gotta make sure to have g++ and ncurses installed. The ncurses binaries wouldn't install for me, and the build shell script wouldn't work, so for anyone running into that, just uzip the ncurses tarball in /usr/src, go in and do a make, then a make install. Cleared it up for me (this has nothing to do with your program, btw, it was Cygwin giving me problems).

        Under default settings, I got to G and H, then everything started to go extinct. Then I st
    • I was, er, privileged enough to hear Wolfram speak at the Artificial Life 9 conference last year. Going in, I fully expected his head to expand to fill all available space in the room. But as it turned out, the self-ego-stroking was far less than I expected, and the only particularly ridiculous thing to come out of the talk was his unnecessary use of an acronym - NKS - which stood for nothing more than "New Kind of Science". (The book goes on to suggest that this new kind of science, which is not much mo
      • The book goes on to suggest that this new kind of science, which is not much more than Yet Another Computational Model, would revolutionize a wide variety of scientific fields.

        No, what Wolfram claims in the book is that he developed a framework by which other scientific fields will be reshaped. The key part of a framework is that the actual work part has been left to somebody else. I love this bullshit, you can tell can't ya? I like saying to my prewife that although I havn't taken the trash out today,

        • I then go on to state how my framework will revolutionise taking out the trash and how I was in a "unique" position to develop such a framework, being that I both have trash and am responsible for disposing of the trash in our household.
        • He claims it to be a framework, yes, but in reality it's just Yet Another Computational Model. I wasn't clear about that in the sentence you quoted - sorry.

          By the way, note that there's nothing inherently cheesy about developing a framework for something. One could argue that programming languages are merely frameworks for developing software, but nobody tries to downplay the importance of (commonly used) programming languages in the field of engineering computing devices.

    • well, he proved that rule 110 [wolfram.com] is universal [wolfram.com]. He also discovered the smallest set of NAND/NOR axioms [wolfram.com] for boolean algebra [wolfram.com].
  • I did this a long time ago using SDL and OpenGL with spiffy colored blocks and a huge world you had to scroll around in using the mouse. One color would eat the other color, reproduce differently, had different basic rules, etc. I guess it was a cellular automata. I may have had a 3rd species, but at some point I started to lose interest and moved on to bigger and more 3D things.

    I like simulations like this, but I fail to see what is revolutionary about it. I'm sure thousands of people have implemented
    • It's just eye candy. Some people tend to watch it for hours. The rules are essentially the same for each creature (except for what they eat), actually, but there's theoretically no limit to how high they could evolve. All that stops them are the constraints of a food chain. I have a genetic version, where each creature's knowledge of how to move towards food, mutate, etc is genetc. However, the system eventually starts looking exactly the same as the one you're looking at, so I left that stuff out.
      • I like it. An interesting development could be to allow creatures to devolve; that is, to allow them to occasionally spawn creatures of a lesser level. This would allow the universe to not ever die out due to lower level life forms becoming extinct.

        Another interesting (IMO) modification would be to have the creatures that die to somehow form a fertiliser/garden bed for more A's, and also to allow A's to be eaten to death (meaning there will possibly be some kind of equilibrium forming). Great work; I might

      • I'm astonished that slashdot posted a story about yet another "life" simulator. Surely anyone who's programmed to any degree has made their own.
    • Re:Neat. (Score:2, Interesting)

      Have you looked at Thomas Ray's Tierra simulator? I saw results from that in the early 90s when he was at U. Delaware, and he got quite complex behaviour from a few simple rules, and a single parent organism.

      One of the interesting byproducts of Tierra was that one of the first organisms to evolve was a more optimzed version (fewer instructions) of his hand made one, which then went on to give rise to parasites, anti-parasites, predators, etc.
  • Is this new ruleset turing complete? That is, in my opinion, one of the most astonishing and impressive examples of emergent complexity re: the conway ruleset.
    • I'm not sure what you mean by Turing-complete in this context. You need a Turing-complete language to implement the ruleset, I think. It deviates pretty far from Conway's original ruleset. The rules are still fairly simple, and are described pretty well on the rules page [sourceforge.net].
      • What he means is that Conway's Game Of Life was so amazing that you could actually implement a turing machine in it.
        • Well, no then, this isn't Turing complete. I actually call rand() to determine where each new creature spawns and how many will spawn and whether there are mutations. That precludes Turing-completeness.
          • Well, I wouldn't quite say precludes, just that such a machine would probably have to be pretty big to have a chance of working reliably (and maybe you could never prove that it would always work). Consider that it's likely that God does play dice with the universe, though this doesn't interfere with computers too much.
          • Actually why do you use rand() at all? Conway's game didn't have anything random. You could use "chaotic" rules for evolution instead (for example "when a predator eats a creature surrounded by three others, it evolves one level").

            I would find it much more elegant, specially since a population behavior would be repeatable.
      • Re:Computation? (Score:5, Informative)

        by addaon ( 41825 ) <addaon+slashdot.gmail@com> on Thursday July 07, 2005 @09:38PM (#13010129)
        I mean that the physics of the ruleset can be used to implement a universal turing machine. See this [server.org.uk] for a pre-universal example.

        This means, of course, that the game of life can emulate itself. An open question (as far as I know) is whether there is a more efficient emulation method that takes deeper advantage of the rules, rather than passing through a "general computation" layer.
    • The answer, I suspect, is almost certainly "yes", but it's not very interesting.

      The way the Game of Life implements a Turing machine is extremely complicated, so it's not interesting as a way to make a Turing machine. It's interesting because the result that it can be done at all is surprising. It's interesting that a simple game gives rise to the full power of the TM. It also gives you a new way to study the basic properties of the TM: anything you prove about Life can be applied to the TM.

      This game he
  • by szyzyg ( 7313 ) on Thursday July 07, 2005 @10:00PM (#13010254)
    I made loads of notes back when I had an Atari ST - the idea was to basically have a scrolling shooter with lots of aliens travelling around the landscape. The aliens would breed and through survival of the fittest they'd get stronger - the player would essentially be the force of natural selection....

    Maybe it's time to revisit the idea.
  • Modern research.. (Score:4, Insightful)

    by jericho4.0 ( 565125 ) on Thursday July 07, 2005 @10:05PM (#13010293)
    I don't want to knock anyone hacking on code, but hasn't this been done? We've been using genetic algorithims and studying emergent behaviour for a while now, and there are some very advanced code bases out there.

    I like the eye-candy aspect of it, though. Maybe you could port it to OpenGL. :-)

    • I actually thought it could make a good Linux screensaver, as is, or even with different bitmaps or animations to represent each creature. And it is just eye-candy. :)
    • Re:Modern research.. (Score:2, Interesting)

      by SQL31337 ( 255397 )
      Most of the life simulators I've played with (gLife comes immediately to mind) turn me off with their complexity. I was actually aiming for something almost as simple as Conway's game. The code really isn't very large. And to be honest, everyone I have shown it to in person has wound up zoning out for hours and watching it, while I try to move on to different things. They begin talking about "Cancers of D's defended by G's" while the other people around them just stare at them blankly. I really would
    • Oh yeah, and I'm not sure anyone has ever made a system with rules identical to this one's. If you are aware of such a system, please inform me.
    • We've been using genetic algorithims and studying emergent behaviour for a while now, and there are some very advanced code bases out there.

      Roughly, the modern day equivalent of alchemy: put a newt, a cat's paw, and three hairs into a retort, and then see whether something "emerges".
  • by EngMedic ( 604629 ) on Thursday July 07, 2005 @10:13PM (#13010338) Homepage
    complex behavior from a simple model? That just sounds like a parameter-sensitive system of differential eqations. Am I missing something? A "complex" ecological system (or any other system) is normally modeled well (or well enough) over a set of conditions with a linear second-order system, and if it isn't, there exist well-tested tools for nonlinear analysis for high-order systems.
    • And what the hell is this guy talking about? Try modeling that rand() function. :) In fact, come up with a system of linear or non-linear analysis for this system. Or better yet, just run the program and watch the little things gather food until they starve or are eaten. ;) I hate the superior attitude people take, especially when it seems they barely know what they are trying to tell us. The program is EYE CANDY! You're supposed to enjoy it. It doesn't solve any real world problems whatsoever.
      • This is slashdot, where the immediate response to just about anything is to whine.

        In an attempt to be more constructive, I hacked it a bit so that mature As now occasionally produce a B offspring, which seems to give a more stable ecology, although Ms always starve to death, and I feel sad about that because they look so noble.

        I shouldn't anthropomorphise letters, but hey, I used to play Rogue ...

        Pretty diversion!
    • Complex behavior from simple rules is different. A simple model could include the concept that the earth orbits the sun rather than vice versa, while simple rules could be as simple as, "look at your predecessor and his neighbors who are all either black or white, and based on their colors, choose a color for yourself from the set {black, white} (256 rules total)."

      More here:
      http://www.wolframscience.com/nksonline/chapter-3 [wolframscience.com]
    • complex behavior from a simple model? That just sounds like a parameter-sensitive system of differential eqations.

      There are other ways of getting complexity from simple rules. Can the mandelbrot set be generated with differential eqations?
  • If it is a real "ecology", where is the waste recycling? When a higher level creature dies, it is a large collection of useful energy. In real life something would evolve to eat the corpse.

    I'd like to see whether this sort of system would develop "lichen" (combination of fungus and algae), or other perpetuating synergies.
    • You mean when things starve they should leave a corpse that can be eaten by a scavenger, I assume. That is a really interesting idea.
      • Either that or eventually turn into a plant or something.
        • That would leave far too many "base" life forms (which I visualize as plants) crowding the universe. It would have to be a one-time thing...with "a" being an expended form, "A" being a re-matured form, perhaps "@" as a one-time use form, or something like that.

          Perhaps if I'm bored in the near future I'll see about implementing this in my spare time.

          It will be interesting to see what this does to the populartion of B's and C's...though I don't think it will have much effect, since those evolve rapidly
    • depends on the "simulation" - what level of complexity is the simulation? A 'model' is always a simplified version of a real environment - as you note .."in real life..." things are more complex. So it's down to how closely you want to move towards 'reality' and what is 'sufficient' for your purposes in the simulator. A simplified approach might be a closed energy model where the energy that leaves one part of the system is transfered to another, maybe it has to be more abstract than extending the ecology
  • I compiled it using DJGPP on Windows. First I had to add the pdcur24b module, which I had never needed before, from the v2tk download section. Second, the strtof (string to float, I assume) function came up undefined, so I commented out one line. This appears to disable, in some sense, the "t" option, whatever that is.
    • You should be able to use atof instead, I think. And I will now use DJGPP to make a native windows version, thanks to your tips. :) I began to use Microsoft Visual Studio the night before last to build a console application, which would require a full rewrite of all the console display functions. Your way sounds easier. ;) And yes, you've disabled the "t" option. The t option is fun because you can set it to a very low value and the universe runs by very fast. I will attempt to use atof or something el
    • I'll put up the DJGPP tomorrow, probably. I am playing with it right now. Thanks again for the tip. I have no way to get in touch with you outside of slashdot. Feel free to drop me an email if you want.
      • Glad to have helped.

        I do most of my playing around programming using DJGPP, so that was my natural choice for compiling your program. I posted about my minor troubles in case someone else was trying to do the same thing with less success.

        Posting a reply to my Slashdot messages is probably the BEST way to contact me, I'm really bad about checking my email.

        Oh, and I enjoyed your program. I'm a bit of a sucker for silly things like that.
  • This is clearly not a next gerneration version of life. The point of life is not that every cell represents an organism, but that patterns can arrise or be designed that express complex behavior despite the fact that the rules underlying them are simple. The phenomena of simple rules leading to some amazing patterns is what made life exceptional. Creating a overerly complicated rule system is not an improvement on life, but a hinderance. What is much more interesting in the future for cellular automat
    • That's a pretty neat website. I've always found COnway's Life kinda static and boring, that's all. To be honest I got interested in it again tonight because I found out you can implement a Turing machine inside of it. But anyway, this is a 0-player game in which cells attempt to emulate life. So that's at least two things it has in common. There's actually many others. I have implemented Conway's Game of Life in the past and feel like I understand it pretty well. My comparison of this program to CGo
      • Well, I've seen 2-player implementation of Game of Life.
        In Populous 2. A spell called "fungus". You plant fungus in given pattern on your land, and the cells start growing according to rules of Game of Life. Upon contact with a human being, the human dies, fungus lives on. But it can't spread over hills or water etc. The trick is to make it grow in direction of the enemy settlements to kill the enemy people. Send floaters there, plant some exploding pattern, or grow a floater gun on your own land, directing
        • I loved that game! wtf happened to bullfrog, populous 3 was shit.
        • Hehe, I never officially owned that game so figuring this out was a big Eureka moment. Afterwards, I'd always play so as to get the best glider shots at the enemy. That and the baptimal fonts made the game.
  • I mean does anyone's game of life spinner still work?
  • a new version of NetHack? ;)
  • A demilich! Run away! Run away!
  • The easiest framework to write simulations of this type is Netlogo [northwestern.edu].
    It's free, it's easy and quite powerful.

    Skim through the models library (File->Models Library) for a large selection of simulations written. Almost every model you open, while it seems to be very complex when run, the code is usually no more than 50 lines.

    For example try Biology->Ants. It shows a simulation of ants searching for food and when they find it, they will spread feromones to attract others.
  • Evolution of ethics (Score:3, Interesting)

    by Flyboy Connor ( 741764 ) on Friday July 08, 2005 @07:06AM (#13012216)
    The first time I encountered work like this was in A.K. Dewdney's column "Simulated Evolution" in Scientific American, May 1989. He presented the program "Palmiter's Protozoa", of which a nice implementation can be found here [ethics.ubc.ca].

    But this is all kid's stuff. Such experiments can be much more interesting nowadays, with the power of computers as we have now. A student of mine studied the evolution of morals in a similar society. His program isn't online yet (will be soon, I guess), but his thesis [unimaas.nl] is.

  • Here's a shamless plug for my similar ecology simulator with food and bugs that duke it out for survival. They occasionally mutate, too.

    bugfight [bengarvey.com] (Windows exe and perl sources included for other platforms)
    • So I checked that out and it looks very interesting. Unfortunately, I can't really tell what's going on. I'm gonna look at your code, and see what I think. I like your gui interface, and the fact that you used perl.
      • Thanks. The bugs are moving around and trying to get food. They die if their energy goes to zero and each species has different settings for how they reproduce and such.

        Feel free to email me with any questions or make modifications to it.
  • like Sim Earth. I don't know the coding behind the classic, but it does allow for mutations, and the critters do seem to move around similar to the GoL.
    • SimLife [the-underdogs.org] is a better analogy.

      I actually own the original DOS version and still have the manual and everything. One thing SimLife teaches you is that it's really hard to build up a complex ecology in a confined space. If you use the smaller maps, it's almost impossible to get carnivores to survive. There's simply not enough room for them. If you use the largest maps, I've been able to get some stable carnivore populations, but not a ton.

      Fruit trees are also darn difficult to get to spread (because they requ
  • by Tom7 ( 102298 )
    Doesn't everybody do this in high school or college? Is there something special about this one?

    In my mind, something that reduced the complexity of Conway's game would be interesting, but there seems to be no reason to increase it, since loads of interesting things (like computation!) already happen at the macro scale.
    • I dunno. I'm the only person I know that's written one. I used to write things like that in high school and college, but they all sucked compared to this one. Here's what I got out of this post: many comments about the code, offers to help me improve it, some interesting links to similar kinds of things (usually things I didn't know about), and some compliments. Even if these types of comments were critical, they provided useful insights and interesting links. Comments that fell in to the above catego
  • Have you seen wireworld [wolfram.com]? It is another cellular automata which has some very interesting properties.
  • Thanks are due to everyone who posted insightful comments and criticism, and to all the people that linked me to interesting things like this. To the hundreds of you that have contacted me via email, if I haven't gotten back to you yet I will soon. Here's the future of jecology, mostly inspired by you guys, in a nutshell:

    Immediate future (next few weeks): DOS/Windows version; A linux screensaver; A GUI interface; A universe editor; A java port written by a third party that can run from the web

    Not so im

Scientists will study your brain to learn more about your distant cousin, Man.

Working...