In advance of tomorrow's GT meeting, I have my my first online version of VatLife up at www.ripplingloop.com. Comments are welcome.
Right now I have a single environment and two different single controllers (which are almost identical), both dynamically loaded from JAR files. In this environment, each a-life is a simple 2D polygon of up to five vertices, and gains energy by having an upward facing face that isn't shadowed by another a-life. The energy of each a-life is gray when low and more saturated when high.
Also, just to keep it interesting, the critters don't get energy if the "sunlight" hits them on the very top of the screen.
I decided to give each critter two different genotypes: one used by the environment to determine the initial form, and one used by the controller to determine the mind. My original thought was to use the same for both, but decided this would prevent the possibility of critter migration between environments.
In this environment, each "critter" has the same number of pins as it has faces, with the pin value returning the amount of energy that face received. Writing to a pin adds force in a particular direction.
Periodically the worst performers (the lowest energy a-lifes) are killed off and the best performers are reproduced with occasional mutations.
And incidentally, this could run way faster. I profiled it and found that the collision detection (from the Phys2D library I'm using) is taking about 90% of the time. I'm sure this could be cut down significantly. But of course, the environment is really just another proof of concept.
Tuesday, September 30, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment