When Jim Dietz and I discussed the final form that Championship Formula Racing (CFR) would take, one item in particular stood out on Jim’s wish list - a way to race against the best drivers in history. The vision was to create a Historical Driver system where different drivers had different personalities, tendencies, and difficulty levels. It was important that the top historical drivers in the world would be hard to beat, not just rolling obstacles.
I wasn’t sure how this would work when I started but this ended up as one of my favorite parts of CFR. The challenge forced me to consider some core concepts for creating Automated Opponents. Below I’ll share what I learned for any other game designers or tinkerers who might also want to go down this road.
My first step in creating an Automated Opponent (AO) was to figure out what broad strategies I wanted each to pursue. Most hobby games have multiple paths to victory. Write down those paths and variations and note which are more popular than others. Don’t worry if some strategies are not as good as others. If people pursue a strategy, include it on your list.
Having multiple strategies that an AO can follow allows you to have multiple AOs that end up doing different things. Some games are just better with a lot of players so the ability to have multiple diverse AOs can fill in that gap. If only a few AOs would ever be used at the same time, a variety of AOs will keep each use fresh.
I like an automated system that makes me feel like I am playing against actual opponents. Real players have tendencies and goals. Making popular strategies better represented or more frequent in your AO design will keep the meta game consistent with or without AOs.
Decision Trees and Set-Up
Now that we’ve identified the broad strategies that our AOs will pursue, we need to build a decision tree for each.
For each strategy, figure out what their ideal play would be and rank all of their other options based on how that will help their strategy. As a general example, if an AO is pursuing a military strategy in a game, their first choice for an action on a turn could be to buy the largest sword, second choice might be to buy more armor, third choice… etc.
You’ll probably figure out pretty quickly that there are variations on how an AO could pursue the same basic strategy. Maybe one flavor of military AO buys swords first, while another makes sure to balance swords with armor.
Don’t forget set-up. Are there set-up options that might favor one strategy over another that individual players can choose?
Tactics Change as the Game Progresses
A diversion into my theory on the three phases of game play, as illustrated by Ascension. This structure does not apply to all games but it does apply to a lot of medium to heavy weight modern board games.
Many games can be split into three parts: Build the Engine, Run the Engine, Grab Points.
Early in a game, you want to acquire the tools that you need to pursue your strategy. When I play Ascension, I spend the early game acquiring cards that let me best acquire more cards or kill off the junk cards I started with. Initially, I don’t care how many points cards are worth, and I don’t care how cool its special power is unless it gets me more cards or kills more junk.
Once you have your tools, its time to augment that engine and run it. Twenty points into a sixty point game of Ascension, I switch over to buying cards that have synergy with what I’ve already acquired. I’ll pay a little more attention to point values now, but mostly I’m running my engine. I’m probably not continuing to acquire more ways to thin my deck.
Near the end of the game, there are no long term consequences for your actions - it’s all about the short-term play that helps you win. In the last twenty points of a sixty point Ascension game, I no longer care if the card works with what else is in my deck, and I stop thinning out junk unless it’s harmless to do so. It’s all about acquiring maximum points.
Now think about the game for which you are designing your AOs. Are there recognizable phases? How do you measure which phase you are in. Is it based on the progress of the game, or a player based metric? Should your AOs’ decision trees change based on the phase of the game?
If I know what the AO is going to do before the AO does it, that AO will be a lot less effective. This will be more or less true depending on the level of player interaction. If there is little player interaction, you might be able to skip this step. If there is a lot of player interaction, this step is crucial to creating a competitive AO.
Randomness is your friend here. Each AO should have at least 2 things it might do on a given turn, or two ways it might do those things. This way, human opponents are not completely sure what it will do. Be careful not to resolve that randomness until you absolutely have to -- right before the AO needs to take an action or figure out if they will take an action.
But don’t take the randomness too far unless that is the actual strategy. You want the choices an AO takes to make sense for its strategy. The choices may just be slight variations of each other. They probably should not be completely opposite.
Simplify then Cheat
After all of this, your AOs are likely bad at the game and your decision trees are so complicated that it takes twice as long to take an AO turn as a real turn.
Go back over your decision trees and simplify them. Then do it again. Pay particular attention to anything you had previously done to obfuscated or randomize AO actions. Does the obfuscation or randomization make it more time consuming to play an AO turn then a human turn?
Now find ways to have your AO "cheat". Cheats can do three things: speed up AO play, make AOs harder opponents, and give AOs more character.
For instance, consider some mechanics that might take a while to resolve. Having an AO always succeed at performing one or more types of actions will speed up play, make them better at the game, and reinforce their personalities and strategies. Having an AO "cheat" more or less will also make some AOs better than others.
Diversify Your AOs
Look at your AOs. Are there parts of each that can be swapped into another similar AO to create something new? That’s a great way to generate a lot more AOs then you thought you had.
For instance, maybe you built 3 AOs that are variations on a military strategy. Each has a slightly different set-up and slightly different decision trees. If you separate the set-ups from the decision trees and randomly recombine them before each game you now have 9 different AOs, where you used to have 3.
Or maybe you find that you can split each AO’s decision tree into 3 parts. Now you have 3 early game decision trees, 3 mid game decision trees, and 3 late game decision trees for each military AO creating even more variety and obfuscation.
The most important part of designing AOs is the same as all game design: testing. Very few games come with Automated Opponents. So there is a lot of space to practice using the games already on your shelf.
I’ve started designing AOs for one of my son’s and my old favorites, Valley of the Mammoths. I’ll share the results of that project when I’m done. Below is what I ended up with for CFR (development, not final version).