Awesome :> Really looking forward to being able to create a solar system, I have the maths for it all figured out already. :> I am also quite tempted to try to create a reusable mathematical model of gravity. Technically it's already possible to calculate gravitational forces acting on each asteroid, but moving asteroids would be needed in order to reflect it.
Anyway, for now I am still working on this new AI. Last night I finished off the extremely complicated metric calculation section, which is responsible for identifying which paths the AI might like to send a given asteroid's seeds along. It has a lot of similarities with computer networks, actually..
In terms of coding the actions, I've covered every possible branch up to the "Elligible for reinforcing other roids! Is my torch metric nil?" part. So currently the AI is still pretty useless - it will make its asteroids "call for help" if attacked, but it won't send seedlings to assist neighbouring asteroids when they call for help. It will build the maximum number of trees on its starting asteroid(s), but it will never send seeds out to colonise a new asteroid. Neither will it send an army to defend an asteroid attacked by the player. Neither will it hold elections to set a gather point, or attack any of the player's asteroids.
I also realised the AI is vulnerable to having its empire split. If one part of the empire has no way of reaching the other half, whichever half has the gather point will be the only half used for attacks against the player. This gets to be a real problem if one AI asteroid is left on its own. It could potentially win a gather election and become the new gather point, but with no friendly neighbours it will be inaccessible to the seedlings in the rest of the AI's empire, and they will simply wait at their asteroid of birth until the player tries to attack, at which point they will respond.
The point is that the attack-the-player functionality will be severely compromised if this situation arises. I will need to think of a good way to figure out whether a split has occurred, and which side of the split is largest. Quite tricky when the code is designed to only analyse one asteroid at a time..
I don't really expect anyone to read this by the way, but I need to type this out so I remember all this stuff tonight :P