AI Cogitations
The biggest coding challenge for War Plan Pacific was the AI. Easily. Why? Two reasons – first it was unstable. Not in terms of crashing, but in terms of suddenly delivering bogus results after a minor tweak. In some ways this is an unavoidable side-effect of not using a scripted AI. Two, it had a huge search space (all the possible situations the AI might find itself in during a game) and I didn’t have effective tools for validating the AI behaved reasonably across the whole search space.
How to fix? Well, both problems are related, since the lack of a comprehensive test suite exacerbated the dangers of destabilization. Destabilization can be overcome by brute force mapping the possible results, but that requires a mondo test suite. A mondo test suite is expensive to write, unless of course you can get the computer to write it for you…
Hey, wait. There’s an idea.
Stellar Squadrons, since there’s a tactical component, has an ever bigger search space for the AI than WPP. WPP used a hybrid rule-based AI with three planning levels. Squadrons is using genetic algorithm techniques to evolve the weightings for a neural network. I’m calling it a mutated neural network for fun. It doesn’t (at least for the moment) include back-propagation and dynamic learning. Instead, it can choose one of several net weightings to use based on the situation. Developing the GAs requires a fitness test, which gets us to problem #2 – test suites. The fitness test for the GAs is a round-robin tournament (using the game engine sans graphics) against all the other chromosomes in the population, with randomized (computer writing the test case for me) forces and setups on each side.
The GA routines are still in the development phase, and the real proof will be when I can play against one of the evolved routines, but so far I’m both excited and optimistic about this. If it works as well as I hope, I might even be tempted to retofit it onto WPP...
How to fix? Well, both problems are related, since the lack of a comprehensive test suite exacerbated the dangers of destabilization. Destabilization can be overcome by brute force mapping the possible results, but that requires a mondo test suite. A mondo test suite is expensive to write, unless of course you can get the computer to write it for you…
Hey, wait. There’s an idea.
Stellar Squadrons, since there’s a tactical component, has an ever bigger search space for the AI than WPP. WPP used a hybrid rule-based AI with three planning levels. Squadrons is using genetic algorithm techniques to evolve the weightings for a neural network. I’m calling it a mutated neural network for fun. It doesn’t (at least for the moment) include back-propagation and dynamic learning. Instead, it can choose one of several net weightings to use based on the situation. Developing the GAs requires a fitness test, which gets us to problem #2 – test suites. The fitness test for the GAs is a round-robin tournament (using the game engine sans graphics) against all the other chromosomes in the population, with randomized (computer writing the test case for me) forces and setups on each side.
The GA routines are still in the development phase, and the real proof will be when I can play against one of the evolved routines, but so far I’m both excited and optimistic about this. If it works as well as I hope, I might even be tempted to retofit it onto WPP...


0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home