Woohoooo, the first post-Kickstarter AtG update! This is going to be a fairly short one, but I wanted to let you guys know what I’ve been up to, lest you worry that I’ve run off to a Caribbean island or something. My intention is to post one major update every month, with smaller unplanned ones in-between going up here and over on our forums.
So for the past couple weeks I’ve been heavily focused on designing the basic structure of the AI. As I’ve noted in previous articles, the basic goals are effective behavior and minimal mistakes, achieved with simple, targeted systems.
I’ve been creating several “scenario sandboxes” in the AI brainstorming docs to establish what an AI response should be to various situations, along with the process for how decisions are made. [Shameless Plug] If you’d like access to these and other documents, you can use PayPal on our website to get up to the $125 tier! [/Shameless Plug]
Right now my brainstorming has led me to an AI design with four main systems:
- Objectives AI (OAI) – The meat of the AI where strategic plans are laid. Its varied Objectives range from, “I’m out of Metal… spawn an Objective to grab that Iron deposit over there” to “The resources in this area are diminishing, I need find and head for a more fertile one” to “I don’t like the Picts and they’d be easy to attack, so let’s prepare an invasion.”
- High Command AI (HCAI)- This divvies up the player’s Units between various “Military Goals” and orders them around. If we’re trying to muster an invasion force on the eastern flank and need to draw strength from various parts of the kingdom, the HCAI is what makes that happen.
- Tactical AI (TAI) – This system takes over from the HCAI when there are very specific, intricate tasks that must be accomplished (typically when there are enemies nearby). It runs through and scores a large number of possible action combos, choosing the best option. An approach like this is necessary if the goal is to reduce the number of mistakes to the absolute minimum – trying to teach it to “do everything right” in one go is basically impossible when there’s as much to consider as there is in AtG. If the TAI slips up just once and forgets to protect a single Supply Camp, it could very easily be the end of everything.
- Economic AI (EAI) – This handles production, spending of resources, etc. For the most part it hums along happily enough, just keeping things running. However, the OAI and HCAI can make “requests” of the EAI, such as “build more Units, ASAP!” (because we’re being invaded from two sides – but the EAI doesn’t know or care about that). The EAI does its best to balance these competing priorities.
There’s a lot more detail I could go into here, but I’ll save that for future updates, as I want to keep this one fairly high-level. In your guys’ opinion, what should the AI always/never do? What’s the most important thing for it (and me!) to focus on?