PDA

View Full Version : My current pet project


Pointy
11-12-2002, 05:13 PM
I'm working on a project which basically is going to develop into a life form simulator of a kind. I'm right now on phase 3



Here's my scribble pad:

Aivolution

Phase I
- A “petri dish”, consisting of an X by Y matrix of nodes.
- Critters that run around the matrix randomly



Use the “setbitmap” function to manipulate the graphical interface. An array is given to represent the bitmap, and this suits us since we need to work with arrays in the algorithms.



The TICK function in Simulation will call each critter’s TICK function, which will determine the AI for the critter. After that, the Simulation will extract each critter’s position and place it in the petri dish.

The petri dish will have a “fade” value on each layer. A fade of 1 means the old values are lost after one move, and a fade value of 10 means the color will degrade into the background color over 10 moves. Before each critter is positioned, the simulation will call “Degrade” which will follow this degradation of color pattern. After that, the simulation class will plot each critter into the dish.


One cell can only be occupied by one critter at a time, therefore critters must have knowledge of each other. More specifically, they will know if they are trying to enter a cell that already contains a critter. if a critter tries to enter a cell it will poll the crittermatrix for any close by critters.

Phase II
- Critters have random initial energy values
- Critters spend 1 unit of energy per move
- Critters expire when energy reaches zero

Background is still white, critters fade from purple to red as they lose energy. A red critter is a dead critter.


Overload the critter base class, add the variable to the daughter class, have TICK deduct a unit each time, bypass tick if energy is zero. Getcolor should be overloaded and return a proper number.

Phase III
- A static temperature matrix overlapping the petri dish. Each node has its temperature randomly assigned.
- Critters run around randomly
- Critters have temperature boundaries and a temperature sweet spot
boundaries acknowledge the 200% mark. sweet spot marks the 100% mark
- Critters spend more energy in sensitive areas, accd to a linear formula (if Te<SS:S=Te*(200/HiTe) else:S=abs(Te*(200/LoTe)).

Phase IV
- Critters get “sensitivity” if spending more energy than their sensitivity value, they are “unhappy”
- Critters get memory, and AI.
Memory consists of last node visited (direction and temp)
If the current node is making them “unhappy” they will move back to the memorized one
if the memorized one is an unhappy node, they won’t go there from the current one.

This phase marks the point where Critters get a goal in life – to survive the longest. The will of survival consists of the “will” to move away from an energy-expensive area.

Phase V
- Experiment with critter memory. 1, 2, 4, 8, 16 node memory capacity.


Phase ?
- Critters get “warmer” and “colder” sensitivity modifiers.
Which make the curve logarithmic, exponential, etc.
-

recluse
11-19-2002, 02:23 AM
Sounds interesting Pointy. Make sure keep us/me updated.