Campaign AI stuff July 20, 2010 cliffski I am working on the various chunks of code that determine the strength of AI opponents in the GSB campaign game (currently being developed). The game takes existing challenge fleets, as well as other players campaign-fleets to use as the enemy, in massively-singleplayer style. However, it needs to select an appropriate fleet, in terms of strength, to fight against you, either as a defending fleet when you attack, or an attack on one of your systems. The simplest method is just to assign a fleet size value to each planet, and let that be the strength there. Simple, but dumb, because nothing prevents the player sitting back and building up a larger fleet. A refinement would be to gradually ramp up a scalar for the enemy fleet sizes over the game, but that would mean it could spiral into insane difficulty, and doesn’t allow for different skill levels. A system I’m working on is a ‘reactive-arms-race’ style approach. The nearby enemy worlds have their fixed starting values of fleet strength. When battle is joined, the Ai will start to build up larger fleets in nearby systems when it loses, and not bother if it wins. There will be some lag here, to represent building times. The idea is that once you think you have a slight fleet-size advantage, you need to get all expansionist and start conquering, before the enemy realsies how mighty your fleets are, and builds it’s own countermeasures. If you just sit back and build up, the enemy will be doing the same. I may introduce an additional ‘anti-turtling’ scalar that starts ramping the enemy fleets up even faster if you have gone a long period without expanding your empire. All this takes ages to code and test, and you never notice it’s effects on the surface. It is important to get this stuff right though (more important than adding more shiny or features) because it’s what drives long term playability.