I rather like the idea of some fluid dynamics, it opens quite some possibilities. At the same time I'm afraid it'll take up too much computing time.
What would be the cost of circulation/diffusion? (it seems expensive)
Normally fluid works by using a giant grid and doing operations between neighboring grid cells to propagate velocity, diffusion, etc. This is called "discretizing the domain" using a "Eulerian" perspective, and is actually entirely impractical for Darwinbots, just because of how
big a bot's universe is.
Another method for doing fluid is to use particles to represent properties of the fluid, and have those particles move around and circulate. This is a "Lagrangian" perspective. "Finite element" methods simulate the fluid as basically a huge number of circles/spheres, which works well for things like water pooring in to a bucket. But it's still wildly impractical for Darwinbots.
Finally, there's a Lagrangian method that only simulates the "vorticity" of the fluid. That is, its spin/whirlpoolness. An unmoving block of fluid has zero vorticity, so it costs 0 memory and CPU cycles if the fluid domain is empty, and then scales from there. So it's very well suited to something like Darwinbots. But that's only half the battle. The other half is preventing the fluid from penetrating a boudnary like a wall or a bot. Without getting too technical, you can simulate this as a collection of fluid particles that are stuck on to the surface of a boundary and update every cycle to prevent fluid velocity from penetrating the boundary. If those particles also push on the boundary, you've got the coupling between rigid body physics and fluids basically working.
This is the approach I'm exploring with Darwinbots, except I'm
only calculating the boundary particles and ignoring the normal free-floating particles. It should be approximately as expensive as the calculations for bot vision (which bot can see which other bot). So expensive, but definitely doable. Right now I have a simulation with a square spinning and translating through a fluid with 1000 tracer particles in it that runs in 0.5 ms (2000 cycles/sec). Based on that my guess is that each 50 bots will cost 1ms for fluid simulation. And that doesn't count speedups that are possible using SSE/AVX or multithreading, so in final Darwinbots if you throw your whole computer at it you might be able to do more like 400 bots' fluid calculations in 1ms (1000 cycles/sec). And that number might increase 5-10x again if we can get GPGPU working, but that's in the distant future.
Another question is to what level should the fluid properties be simulated? Should water freeze when it's below freezing point? Should salts have an effect on the freezing point? Should pH have an effect on the salt? How much substances should there be, to what level can they react with each other.
Each additional aspect of fluid increases the computational cost, possibly substantially. Right now I'm assuming that the fluid is isothermal (doesn't change temperature), inviscid (imagine thick molasses. Now imagine the exact opposite of that) and incompressible. It will have density (and so impart momentum on things in it), but that's about it. Which means things like flocking geese would work, as would squid-like propulsion and undulating fish swimming. At least in theory
I'll know more in a few weeks/months.
Diffusion would have to be simulated using essentially tracer particles (massless particles which float in the fluid), but we'd need a lot of them for it to simulate effectively, and I think it would be too expensive. But there might be more intelligent tricks you can do to make it more feasible.
What are the current plans in DB3 to increase diversity within one sim? So that multiple species have a habitat in different places in one sim.
Right now the main driving factor would be size. I should be able to simulate something like a whale eating plankton. The tactics a bot would have to use to feed on things larger, similar, and smaller than it are all quite different, so that should open up some interesting niches.
If fluid works out, and you disable the voluntary .up etc. commands, you'd need another bot to move at all, which would encourage multibot cooperation.
I also plan on having shapes in the world that bots can physically dig inside of. So you can have something like an ant colony, sediment on the bottom of a sim that builds up from stuff going on higher up, etc. Which should provide different ecological rolls.
And of course chloroplasts encourage one species to become sessile, passive, gigantic and defensive (the plant) and another to become mobile, lean and aggressive.