by bhasker » Tue Oct 26, 2010 1:45 pm
My defense strategy is quite simple. It calculates how many ships are needed to keep the planet taking into account all enemy inbound ships. Then it does a calculation which averages out number of ships incoming per turn and adds that many ships to the mix. The reason I do that is because I tend to support planets from far off planets at times and if the enemy has a closer planet and you just send enough to hold the planet, you won't be able to match his rate of flow.
As for launches, the way I do it is a bit like the following.
1) build a list of available ships from each planet and put it on a priority queue
2) pick a planet ( can be neutral/enemy/mine) depending on its value
3) calculate if we should take the neutral /attack the enemy. I always support my planets.
4) launch fleets.
5) resort availability queue by distance from target, so that closest planets are evaluated first as possible launch sites
6) start an order Queue
7) the for each source planet calculate how many ships need to be launched to acquire/hold the target planet taking into account ships already launched in this order
8) if at any point numShipsRequired-shipsSent > totalAvailable cancel the order queue.
9) if we have enough ships launch them
10) launching is synchronized so, i launch from planets that are further away first.