Natural Selection Screensaver

p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
<div class="IPBDescription">Note the lower-case...</div> Not "Natural Selection" as in the game, but "natural selection" as in the principle:

<a href='http://www.leadtogold.com/software/genesaver/index.html' target='_blank'>http://www.leadtogold.com/software/genesav...aver/index.html</a>

This was an idea I kicked around for about a semester and then finally implemented over Christmas break. Try it, you'll like it. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
«1

Comments

  • LikuLiku I, am the Somberlain. Join Date: 2003-01-10 Member: 12128Members
    ^_^ I'm going to test it out!
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    If you need tech support getting it working, don't hesitate to ask me.... <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • TweedleTweedle Join Date: 2002-11-07 Member: 7581Members
    Very slick. I set this to be my screensaver (I was previously using none) and changed my powersave time to longer. I'm interested to see what grows <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • GreyPawsGreyPaws Join Date: 2002-11-15 Member: 8659Members
    edited February 2003
    <!--QuoteBegin--[p4]Samwise+Feb 12 2003, 12:09 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> ([p4]Samwise @ Feb 12 2003, 12:09 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Not "Natural Selection" as in the game, but "natural selection" as in the principle:

    <a href='http://www.leadtogold.com/software/genesaver/index.html' target='_blank'>http://www.leadtogold.com/software/genesav...aver/index.html</a>

    This was an idea I kicked around for about a semester and then finally implemented over Christmas break.  Try it, you'll like it.  <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo--> <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    ive not checked the link but is that screensaver thing where you write a simple code for your bug and watch it interact with other peoples bugs on the net?

    My russian friend wrote a sicko bug that no one could kill for a long time

    EDIT:
    LOL its says right on the main page that it isnt the game "Life"
    Thats what I was talking about
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    <!--QuoteBegin--Tweedle+Feb 12 2003, 06:21 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Tweedle @ Feb 12 2003, 06:21 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Very slick. I set this to be my screensaver (I was previously using none) and changed my powersave time to longer. I'm interested to see what grows <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo--> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    With a 1 GHz processor it takes maybe a day or so to get decently intelligent behavior. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    I'm going to post an update tonight (probably in an hour or so) that adds a new option to just show a population graph, cutting down on the rendering time and letting evolution go faster.
  • ThansalThansal The New Scum Join Date: 2002-08-22 Member: 1215Members, Constellation
    very interesting (is now my scrn saver)

    is it possible you could right up a way of decifering the gene sequences?
  • AllUrHiveRblong2usAllUrHiveRblong2us By Your Powers Combined... Join Date: 2002-12-20 Member: 11244Members
    The colors! I'm waiting for the blue ones to become Douglas Adam's-esque
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    <!--QuoteBegin--Thansal+Feb 12 2003, 09:41 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Thansal @ Feb 12 2003, 09:41 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> is it possible you could right up a way of decifering the gene sequences? <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    There already is. Grab the source code. ;-) The classes DNA, Brain, and Animal contain everything you need.

    Any particular format you'd be interested in seeing the genome in? About 95% of it is just specifying neuron thresholds and synapse weights, which is pretty dry reading and isn't that much more useful than the raw DNA itself. When you're in chase-cam mode, the creature's brain is displayed at the bottom of the screen; every line or circle in that display is one gene, which is two characters in Genes.txt. The other variables are a total of only 20 genes.
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    *thread necromancy*

    Since I originally posted this I've added all kinds of new features, most notably different "camera modes" that let you see the neural network in action, or view the population variations over time on a graph. I've also fixed a couple of bugs that were hindering the progress of the creature (like their right eyes not working).

    The download is at the <a href='http://www.leadtogold.com/software/genesaver/index.html' target='_blank'>main page</a> as before, and a list of all the changes made is in the <a href='http://www.leadtogold.com/software/genesaver/relnotes.txt' target='_blank'>release notes</a>.
  • mojojojomojojojo Join Date: 2002-11-01 Member: 2017Members
    edited February 2003
    Cool. Now I have a screensaver.

    As a sidenote Conways Game of Life isn't about artificial intellegence at all. Sort of a little about A-life. Sort of. It is Turing Complete, however.

    Oh, and something that does something similar is
    <a href='http://www.frams.poznan.pl/' target='_blank'>Framsticks</a>, but is a lot more ambitious (3d, evolving bodies). Its so ambitious in fact, that I've never managed to evolve anything better than a stick that wiggles. I've didn't pay the shareware fee, though, and you can use a more complicated gene system with that.
    [EDIT] Renoved silly uestion that revealed I hadn't looked too closely at the program [/EDIT]
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    <!--QuoteBegin--mojojojo+Feb 17 2003, 05:46 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (mojojojo @ Feb 17 2003, 05:46 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Cool. Now I have a screensaver.

    As a sidenote Conways Game of Life isn't about artificial intellegence at all. Sort of a little about A-life. Sort of. It is Turing Complete, however.

    Oh, and something that does something similar is
    <a href='http://www.frams.poznan.pl/' target='_blank'>Framsticks</a>, but is a lot more ambitious (3d, evolving bodies). Its so ambitious in fact, that I've never managed to evolve anything better than a stick that wiggles. I've didn't pay the shareware fee, though, and you can use a more complicated gene system with that.
    [EDIT] Renoved silly uestion that revealed I hadn't looked too closely at the program [/EDIT] <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Yeah, Game of Life is more Alife than AI. I didn't call it AI, did I? (check check check) Nope. Phew. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo--> Life is cool, but ultimately gets kinda boring - interesting patterns don't tend to "evolve", since there's no room for mutation, and even making a pattern that self-replicates requires a lot of manual intervention.

    Framsticks is very cool; I've got a machine at home dedicated solely to running it. I even paid the $50 shareware fee to get OpenGL rendering. Problems with Framsticks as a screensaver, though:
    1) Really CPU-intensive even for one creature, due to the full-featured physics model. It'd be impossible with current hardware to have a world with lots of complex creatures interacting in realtime.
    2) Doesn't have any "run as screensaver" mode (duh).
    3) Evolution is really slow for any task more complex than walking in a straight line. (I've spent months on that P3 trying to evolve a food-finder with no success.)

    There are actually a few other programs that are pretty close to Genesaver (I was inspired by "StrangeWorld"), but they had their own problems, with the main one almost uniformly being that they simply aren't designed to work as screensavers.
  • DubersDubers Pet Shop Boy Edinburgh, UK Join Date: 2002-07-25 Member: 998Members
    I've had this thing running for about 20 min's and it's pretty cool. But all the red animals ate the blue and green ones!! Is that supposed to happen? I have now got a screen full of red animals.
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    <!--QuoteBegin--DuBERS+Feb 18 2003, 05:20 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (DuBERS @ Feb 18 2003, 05:20 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I've had this thing running for about 20 min's and it's pretty cool. But all the red animals ate the blue and green ones!! Is that supposed to happen? I have now got a screen full of red animals. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    The way it works is like this:

    Red eats green.
    Green eats blue.
    Blue eats red.

    A given creature can be an herbivore, a carnivore, or in between; if it's an herbivore, it'll only eat plants (little grey things), whereas carnivores are far more likely to eat creatures of the appropriate color.

    So it sounds like the reds just ate all the greens, and the blues starved due to stupidity. Eventually random mutation will produce a blue carnivore, and then all hell will break loose. Once it's been running long enough, you tend to end up with an equilibrium in which there are enough carnivores of each color to keep the other colors in check.

    The "graph" viewing mode is pretty handy for seeing those fluctuations over time; a stable system produces some very pretty sine curves as the different populations compete.
  • DubersDubers Pet Shop Boy Edinburgh, UK Join Date: 2002-07-25 Member: 998Members
    This thing rocks! It looks like they hunt in little packs. Is that what they are doing or are they jus all deciding to rush for the same prey at the same time? Also what is the limit to their intelligence? Can they keep on learning from each other forever?
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    <!--QuoteBegin--DuBERS+Feb 18 2003, 08:58 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (DuBERS @ Feb 18 2003, 08:58 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> This thing rocks! It looks like they hunt in little packs. Is that what they are doing or are they jus all deciding to rush for the same prey at the same time? Also what is the limit to their intelligence? Can they keep on learning from each other forever? <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Their behavior isn't predetermined at all, but I'd guess that if they appear to be pack-hunting, they're in reality just independently seeing a food source and all chasing it at the same time.

    The limit to their intelligence is pretty much the number of neurons/connections they have (lookit the chase-cam view to see what their little brains are doing). In the section of their brain that I'd term the "cortex", they have 48 neurons and 96 synapses. Compare with the roughly 10,000,000,000 neurons and 10,000,000,000,000,000 synapses in the human brain. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->

    If you hunt around on the web site a bit there's a section called <a href='http://www.leadtogold.com/software/genesaver/chase.html' target='_blank'>The Chase Cam Explained</a> that goes into a bit more detail about the neural networks, and tells you how to interpret what you see under the chase-cam.
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    Thread necromancy, w00t!

    Thought it'd be better to necro this thread than to make a whole new one and not have people know what I'm talking about. Does anybody have any cool ideas for what I might try adding to this screensaver at some point? This was in large part a learning experience; at some point I'll probably do it again and try to make it even *cooler*. 3D, more complex ecosystem, something like that.

    The crowd around here tends to be pretty imaginative. Anyone have any ideas? <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • LikuLiku I, am the Somberlain. Join Date: 2003-01-10 Member: 12128Members
    I can't get it working, I'm running the dreaded WIN ME and It's not on the list.
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    Win ME is teh sux0r. If it's not on the list, it probably means it didn't get installed right - make sure the files are saved as:

    C:\Windows\system32\Genesaver.scr
    C:\Windows\system32\glut32.dll

    and you should at least see the entry for it.

    However, on the one Windows ME machine I tested it on, it didn't work right. Stinking ME decided that it wanted to start a new instance of the screensaver every ten seconds, rather than God forbid just starting it ONCE like it's supposed to. End result is that you get 10000 copies of the program running, which'll potentially crash you. You might get better results than I did, but don't expect much. You can still run Genesaver as a standalone program - run it from the command line with "genesaver.scr /s" to run it in screensaver mode. Not quite as cool, unfortunately.

    Haven't tried it on 98. It works great on 2000 and XP. Upgrade. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->
  • LikuLiku I, am the Somberlain. Join Date: 2003-01-10 Member: 12128Members
    Okie, I'll try again. I hope this works.
  • LikuLiku I, am the Somberlain. Join Date: 2003-01-10 Member: 12128Members
    I tried it again, and I still doesn't work... Ummm, maybe it's because I also have Win2K on this system to?
  • DubersDubers Pet Shop Boy Edinburgh, UK Join Date: 2002-07-25 Member: 998Members
    I stopped using your screensaver because after about a week the animals moved really sluggishly. They never went back to moving quickly. Why is this?
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    <!--QuoteBegin--DuBERS+Mar 11 2003, 05:40 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (DuBERS @ Mar 11 2003, 05:40 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I stopped using your screensaver because after about a week the animals moved really sluggishly. They never went back to moving quickly. Why is this? <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Maxed out the CPU, maybe? How fast is your processor? The more creatures, the longer it takes to calculate their actions (they have fairly complex neural nets), so if the ecosystem stablized enough to have a constantly high population, it might have just started bogging down your system.

    To fix that particular problem, open up the Settings and lower the plant spawning rate, say to 100 per 1000 steps.


    If you've got a fast enough CPU, though (I run it just fine on 800 MHz), maybe the problem is that you've got some other app open that's hogging it? Run the Task Mangler and sort by CPU percentage. Anyone sitting there with 99% CPU usage and doing nothing? Kill him. Eudora did this to me a little while ago and I spent 15 minutes in the debugger with Genesaver before I found out who the real problem was. (Eudora has behaved since then; I just killed and restarted it.)


    Finally, it's possible that the creatures have just evolved to a state where moving slowly is more advantageous. It depends on what you mean by "sluggish" - do you mean jerky, or languid? Jerky movement indicates performance problems (which is what the advice above was aimed at). If they're just drifting slowly, it's because they've chosen to move slowly, for whatever reason. Give them another few thousand generations and they'll probably evolve to do something else.
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    <!--QuoteBegin--Liku+Mar 11 2003, 04:36 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Liku @ Mar 11 2003, 04:36 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I tried it again, and I still doesn't work... Ummm, maybe it's because I also have Win2K on this system to? <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Win2K should work fine. My office and home machines are all on Win 2K, so I know this firsthand. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->

    When you say "doesn't work", what exactly do you mean? Not showing up in the menu? Or it's there but it won't start?
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    Tech support here... DuBERS, Liku, did you get those problems fixed?
  • LikuLiku I, am the Somberlain. Join Date: 2003-01-10 Member: 12128Members
    Yeah, I'm here. It's still not on the list, and I dont' use Win2K, because it crashes my system.
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    What directory did you save the files in? (You need both Genesaver.scr and glut32.dll.)
  • LikuLiku I, am the Somberlain. Join Date: 2003-01-10 Member: 12128Members
    I saved BOTH of the files in...

    C:\Windows\System32

    AND

    C:\WINNT\System32
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    Look in both of those directories - do you see any other *.scr ("Screensaver") files there? If not, something's amiss - go to "Find Files" and enter "*.scr" to figure out where those things are hiding.
  • GadzukoGadzuko Join Date: 2002-12-26 Member: 11556Members, Constellation
    That... is awesome. Excellent work.

    Is there any way to tell, graphically, if the creature is herbivore/carnivore/omnivore? If there isn't, that would be cool to have in another version. Triangle = herb, Circle = carn, Square = omni, something like that.
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    <!--QuoteBegin--Gadzuko+Mar 13 2003, 09:34 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Gadzuko @ Mar 13 2003, 09:34 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> That... is awesome. Excellent work.

    Is there any way to tell, graphically, if the creature is herbivore/carnivore/omnivore? If there isn't, that would be cool to have in another version. Triangle = herb, Circle = carn, Square = omni, something like that. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Thanks!!! <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->

    You can indeed tell what the creature likes to eat - look at the color of his tail. White is a carnivore, black is an herbivore, and there's an almost infinite amount of variation in between. (In a stable ecosystem, it ends up being divided between a bunch of 99% herbivores and 99% carnivores.)
Sign In or Register to comment.