The thing about programming a game you enjoy playing yourself is that as you play it, you can keep improving it. So this weekend I continue my never-ending quest to keep improving the computer AI in various ways.
I took care of an exploit today with regards to people "buying" resource starbases from the AI. It was way undervaluing them.
For GalCiv II, I wasn't really involved on the diplomacy AI. That was a team effort. But since release, I've started looking at how to improve it. So I've been trying to make it do better deals for itself and also be more reasonable with players on things it is likely to trade. I'm hoping to eventually get APIs to color code each item in the list so that players can see how valuable each item is to the AI.
But tonight I've been doing a number of things such as updating the AI's "picks" to deal with the changes in 1.1's ability costs and political party choices.
I think people will find the final 1.1 to be both more challenging at higher levels and more forgiving at lower levels. Still not perfect, but IMO, the only people who are likely to be able to reliably win at levels above "intelligent" are either taking advantage of an exploit or have found some legitimate but missed loophole in the AI.
That's why the AI keeps needing to be updated. In multiplayer, loopholes exist too. But top players have to adapt. In Total Annihilation, there was a cheese tactic called "Com napping". This is where someone would fly in with a air transport, pick up the enemy commander and then self-destruct the unit. Players would adapt. And so in GalCiv II, the computer AI has to adapt. Hence the updates which I suspect will continue for a long time.
That said, I do plan to eventually have an XML file that people will be able to use to tweak the AI themselves. But that's still in the future.
One of the hardest things for me to do is come up with effective ways for the AI to research tech. I want to stress something that many people don't know: The GalCiv II AI is NOT SCRIPTED. Most game AIs are scripted and people take great pleasure in "modifying" scripts. But I personally find scripted AIs to have a very short lifespan. I'll go one more step - scripted AIs are one of the reasons why people demand multiplayer in games.
Scripted AIs mean that the AI follows a hard coded set of rules to play effectively. But once the opponent masters the pattern, the game is over and will never be challenging again. The GalCiv II AI has nothing like that. I doesn't have any sort of expert system but it does work on a "Doing X resulted in an improved position and Doing Y resulted in a worse position". My work is often trying to tweak the AI so that it knows better when something is good or bad for it.
So tonight I played my duel (Human vs. Drengin) wars.
Here's what the AI researched and in the order:
- Space Militarization
- Xeno Engineering
- Xeno Engineering
- Planetary Improvements
- New Propulsion Techniques
- Xeno Economics
- Missile Weapon Theory
- Stinger
- Starship Defenses
- Ion Drive
- Xeno Communications
- Diplomatic Relations
- Trade
- Soil Enhancement
- Basic Logistics
- Impulse Drive
- Advanced Computing
- Armor Theory
- Titanium Armor
- Enhanced Logistics
- Research Centers
- Basic Miniaturization
- Planetary Invasion
- Titanium Armor II
- Advanced Logistics
- Titanium Armor III
- Impulse Drive Mark II
- Stinger II
- Expert Logistics
- Habitat Improvement
At that point I had beaten him. An interesting set of choices that probably won't happen in a second game quite the same.