1
Darwinbots Program Source Code / Version 3.0 status & code?
« on: June 16, 2005, 04:19:12 PM »
Numsgil, thanks a lot for the very useful reply! I read through the whole metabolicism thread (quite a discussion :) ). Lots of good ideas in there, especially your enzymes-as-bit-patterns idea.
Not sure what you mean with "angular momentum". If a bot has several ties, they should maintain the same angle in between. This is relatively simple to calculate in 2D, but in 3D it turns out to be fairly complex... I have not even found formulas for that problem yet. But it is very important, because organisms like Volvox can be crunched like aluminium foil otherwise. But I am not sure if I really want to do it 3D. Good thing is, physics for 3D work almost unchanged in 2D (but not the other way round).
Switching to assembly is not an option, because all calculations are done using real numbers. It is much simpler this way, and the modern FPUs are just as fast as the processor with integers (tested). I use D for programming, it is some changed C++ and should be at least equally fast. Slowdown seems to come mostly from the collision detection, as it is quadratic now (no use to optimize it for testing). I have commented it out and the execution speed almost explodes.
You have talked about a quadtree... what is that? Do you only divide the flat space into small squares, and sort every cell into one square? Or is it some more complex dynamic thing (I once thought about dividing the room dynamically, with the grid density proportional to the cell density, to make large space simulations possible).
I also thought of adjusting the conditions in a way that multicellular organisms are leveraged automatically. My idea was to make the single cells incapable of doing cool things like shooting, moving around fast, seeing things and stuff. Instead they are very basic, emitting enzymes and absorbing substances from the environment, merely drifting around and reacting on chemical gradients. They are simply incapable of killing another cell, they can only eat the remainders. The first thing MBs evolve is a hole in the body (=stomach) where they can rise the concentration of enzymes (which would otherwise disperse into the great wide open) to lethal levels. The question is how to calculate the substances dispersion in such a world? The system needs to be aware of the fact that substances cannot disperse through cells. Brute force approach would be to model substances as little particles moving around randomly, and colliding with cells. It would be a *lot* of particles, perhaps 100·cellcount. Collision detection for them is just impossible. :(
Ciao
uwe
Not sure what you mean with "angular momentum". If a bot has several ties, they should maintain the same angle in between. This is relatively simple to calculate in 2D, but in 3D it turns out to be fairly complex... I have not even found formulas for that problem yet. But it is very important, because organisms like Volvox can be crunched like aluminium foil otherwise. But I am not sure if I really want to do it 3D. Good thing is, physics for 3D work almost unchanged in 2D (but not the other way round).
Switching to assembly is not an option, because all calculations are done using real numbers. It is much simpler this way, and the modern FPUs are just as fast as the processor with integers (tested). I use D for programming, it is some changed C++ and should be at least equally fast. Slowdown seems to come mostly from the collision detection, as it is quadratic now (no use to optimize it for testing). I have commented it out and the execution speed almost explodes.
You have talked about a quadtree... what is that? Do you only divide the flat space into small squares, and sort every cell into one square? Or is it some more complex dynamic thing (I once thought about dividing the room dynamically, with the grid density proportional to the cell density, to make large space simulations possible).
I also thought of adjusting the conditions in a way that multicellular organisms are leveraged automatically. My idea was to make the single cells incapable of doing cool things like shooting, moving around fast, seeing things and stuff. Instead they are very basic, emitting enzymes and absorbing substances from the environment, merely drifting around and reacting on chemical gradients. They are simply incapable of killing another cell, they can only eat the remainders. The first thing MBs evolve is a hole in the body (=stomach) where they can rise the concentration of enzymes (which would otherwise disperse into the great wide open) to lethal levels. The question is how to calculate the substances dispersion in such a world? The system needs to be aware of the fact that substances cannot disperse through cells. Brute force approach would be to model substances as little particles moving around randomly, and colliding with cells. It would be a *lot* of particles, perhaps 100·cellcount. Collision detection for them is just impossible. :(
Ciao
uwe