There haven't been any updates lately, I know. But this doesn't mean I haven't been busy. I did update most of the pages in the wiki, and I have been hard at work on a completely new AI system.
When I first launched the game, I just needed to get some kind of AI system in place so that people could test the game and play it whenever they wanted instead of having to wait for another real person to be available. So I just hacked together something quick that would suffice.
I also didn't expect that the AI would get so much use. I thought it would be mostly used for testing. But it turns out, most players that sign up for the game ONLY play the AI. This means that the AI is their only view into the game, so if the AI sucks, then the player may not ever come back and play another game. Maybe these players only want to play against the AI -- they aren't looking for a multiplayer game. Or maybe they just want to practice before playing real players. Either way, the AI is their first (and many times, only) experience with the game.
So I have been working a lot lately on a much more sophisticated AI system. The current AI just figures out who is the strongest player in the game and goes after them. It then selects that players strongest ship and goes straight for it firing as often as possible. This means it ignores smaller ships like lancers, etc and just blindly goes after the biggest ship in the game.
The new system uses two finite state machines to control the behavior of the AI fleet as a whole and to control individual ships in their fleet. A finite state machine allows the system to look at its environment and evaluate certain conditions. The result of all of those evaluations puts the system into a certain "state". That state then defines the action that the AI takes. For instance, when the "fleet-wide" AI logic is running, it will look at the distance to enemy ships and how spread out they are vs how spread out the AI fleet is. It will look at who has the numerical advantage or who has a CP advantage. That will put the "fleet" into a state of attack, defend, retreat, regroup, etc.
After that, each individual ship in the AI fleet will run its own finite state machine. That will look at things like whether its weapons are loaded or not, is there a target in front, or is there an enemy behind, or is there an enemy attacking a nearby friendly, etc. That will put the ship itself into various states that will decide who it fires on and when and where it maneuvers to, etc.
I am not 100% positive that this will result in a more challenging AI, or if it will just create a mess, but it should produce more interesting results anyway. Plus it will be configurable, so it can be changed easily and we could have different behavior for different AI players.
So be patient, updates are coming...
Thursday, November 20, 2008
Subscribe to:
Posts (Atom)