// Genesaver: copyright 2003 Sam Stafford. class DNA; class Animal : public Thing { public: Animal( DNA* dna ); ~Animal(void); virtual void Render(); void RenderEnergy(); virtual void See( float d2, Color c, float diet, float angle ); virtual void Step(); Animal* prev; Animal* next; Color color; // animal color float diet; // 0 to 1, 0=herbivore, 1=carnivore int pchewing; // number of turns till next time to eat a plant int achewing; // number of turns till next time to eat an animal int fighting; // number of turns till next time to attack a friend int mating; // did creature just mate? float muscles[4]; // x-accel, y-accel, v-accel, turn // Velocity vector in linear and polar coords. float velocity_x; float velocity_y; float speed; float angle; // radians bool tagged; //is World->tagged Brain brain; DNA* dna; };
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#6 | 4572 | Sam Stafford |
New "smudge" feature. REALLY COOL. Off by default (pctsmudge=0) since it's a CPU hog. |
||
#5 | 4452 | Sam Stafford | Fix a couple of small bugs. | ||
#4 | 4446 | Sam Stafford |
Finished neural inputs, made size hereditary, auto-rotation of images once a certain amount of diffs have been consumed, saving genomes at finish. |
||
#3 | 4440 | Sam Stafford | Bug fixes, new features, the usual. | ||
#2 | 4433 | Sam Stafford |
More work on this little project. The AI is still nonexistent. |
||
#1 | 4430 | Sam Stafford |
Start importing alife/AI code from Genesaver. Much tweaking will need to be done. |
||
//guest/sam_stafford/genesaver/src/Animal.h | |||||
#1 | 3052 | Sam Stafford |
Add Genesaver to the Public Depot. It's not in any way Perforce-related, but it does share a bit of code with Jamgraph, and it feels strange to have an open-source project that's not in the PD. |