List of stupid things my new AI does:
1. Allows a player mine to orbit one of his asteroids, happily zapping all seeds that are born there. Better behaviour would be to set a torch metric of 0 to attract help from elligible nearby asteroids.
fixed. I sorted this with a very simple method in the end. The AI now responds thoroughly to mine attacks, which should be infrequent anyhow seeing as the flower chance is only 1.5%.
2. Seriously vulnerable to having his empire split up. If the gather point is in the smaller split, the larger split will simply not gather.
Fixed. Seems to work good now.
3. Uselessly continues to send seeds to a gather point when the player has a massive army nearby, resulting in a stupid cold war situation. A better behaviour would be to detect this situation and hold a new gather point election, so that the AI moves his swarm to a different - hopefully less-well-defended location.
fixed. changes gather points often now, looking for weak spots.
4. Sends seedlings on paths that take them past a player asteroid, resulting in their deaths. Better behaviour would be to detect the presence of a player asteroid within the right range and direction (angle), and to use this information to prevent these types of routes from being added to the list of available paths.
5. Lone, seperated "Orphan" asteroids become inactive. The AI requires at least 2 asteroids within send distance of one another in order to create a functioning metric network. Need to add some code to force orphans to do something with their seedlings.
fixed. Orphans will now judge their situation and either send their seedlings to bolt towards a friendly asteroid by bouncing off a convenient player asteroid, or attack the nearest player asteroid and try to capture it to create a new metric network. The AI can now be knocked all the way back to 1 asteroid, and if then left to recover can still come back to take over the entire galaxy.
6. The AI stupidly uses all his seedlings to build trees, even if the player has a large number of seedlings on a neighbouring asteroid ready to take the AI's asteroid as soon as he's done building 4 trees. Up until last night this was the only way to beat the test map that I am aware of.
fixed. The AI now detects this situation and stops building trees until he has more seedings, so he can keep some for defence. The player must move their swarm away from the AI's asteroid for at least 90 seconds before he will stop being ultra-conservative and start building normally again - by which time the player's tactic is going downhill as this has given the rest of the AI's asteroids time to build up lots of trees. Only threatened asteroids will display this behaviour - others will continue to build as normal unless they too are threatened by a nearby player swarm.
7. Tries to take out an asteroid with 0 seedlings and 4 defense trees, using only 50 seedlings.
fixed. AI now takes the number and type of trees on the target planet into account when deciding how long to wait and build up a bigger swarm before attacking.