The AI in Galactic Civilizations I and II has tended to get a lot of praise over the years. But it could have been better. Much better.
A big reason that kept it from being better was sheer laziness on my part. A lot of the best strategies involve algorithms that just are tedious to write.
For example, I submitted feedback to GPG for Demigod’s AI based on algorithms I knew would be effective but that I didn’t actually use in GalCiv because they were a pain to write.
My favorite example is a pretty straight forward algorithm: What is the strength of an enemy in a given area compared to mine? You provide the unit in question and a radius and it returns a value based on the relative damage potential of other things in the area and from that you can decide whether to move forward or not.
It’s a great way to mobilize units together as a cohesive mass. In Demigod, it would tend to make the AI less likely to go into harm’s way. This is one tiny example and each tiny example on its own is easy to write but taken together, they mean a lot of work that I wasn’t able to get to (or didn’t want to get to) in Galactic Civilizations.
In Elemental things are different. Oh, I’m still lazy. Dangerously lazy. But now I have Charles to work with who helps split the work on this stuff. On our previous games, I wrote the AI myself – The Politial Machine, GalCiv, Entrepreneur, etc. This time, I have a small team to help me with it.
Part of that is because the AI in Elemental is a very big deal. People are excited about the features of Elemental but to me, those features are meaningless unless there are computer players that make good use of those features. Or more to the point, intelligent use of them. While Elemental will have multiplayer (up to 32 people for starters), the focus of the game is single player. That’s the part of the game I want to make sure we absolutely nail and for that, it absolutely must have intelligent computer players.
Over the past 15 years I’ve built up an increasing library of algorithms I’ve doodled together for how computer players could play more like expert humans. Elemental will be my first real chance to see them come to life. I’m very excited.