Basic Decision Matrix
Let’s take a look at a simple decision matrix for an RTS.
| Rush | Produce | Defend | |
| Rush | 0,0 | 1,-1 | -.8,-.5 |
| Produce | -1,1 | 0,0 | .8, .2 |
| Defend | -.5,-.8 | +.2,+.8 | 0,0 |
Your action is on the left, theirs is on the top. The numbers say how much you can expect to gain (first number) and how much they can expect to gain (second number) for that combination.
So, if you rush an opponent that’s producing/expanding, you should expect to win. Other combinations are less drastic, and if you do the same thing your opponent does, it’s a draw.
Should I Stay or Should I Go?
Based on some weighting mechanisms, the AI is going to determine what is the best strategy to use. At first glance, it looks like rushing is the best strategy. The loss you suffer from a defending opponent is bad, but not terminal, and you can dominate an expanding/producing opponent easily.
But, that’s not the whole story. If the computer always does what the best option is, then this can be taken advantage of - the computer, in this case, will always rush, and so the human player can always defend and get an early lead.
This is the danger of AI today - it’s predictable. And while this is a pretty easy situation, the same pattern emerges in most games.
Looking at the three stages of decision making, we take out the stage of actually making the decision. Once we’ve got a workable decision matrix, we can determine what the opponent will do, and so we can determine what we should do… in this case, we know the opponent will rush, so we should defend.
Most players, admittedly, aren’t going to think about things in this way, and even then, I highly doubt that they’ll actually draw up little boxes. But, at some level, they’ll internalize these concepts. That’s why playing against humans is so different from playing the computer.
Why’s It So Dull?
Decisions aren’t easy if there’s a playbook. You can play blackjack in Vegas and get these little cards that will tell you what to do based on the cards. And that will get you optimum odds outside of counting. And guess what? It’s boring to do. It’s Progress Quest, only with drinks.
So, what can we do? There’s a few things that can be done to keep games interesting.
- Make ‘em hard. I mean, Nintendo Hard. Even if you know what to do, crank up the difficulty so much that doing it is still a pain. This is basically emphasizing the execution stage of decisions.
- Vary the challenges. Throw enough different things into the mix that the player constantly has to re-evaluate his strategies as he faces new combinations of opponents/whatever. This forces players to re-analyze their gameplan significantly, as the old models fall apart.
- Complicate the analysis. Add lots of factors, so that the player has to worry about a lot of things. This also targets the analysis stage.
- Make AI that actually reasons about things and understands higher-order decisions. This may not always be optimal! It’s a lot of work, and sometimes, players want AI that’s predictable, so that they can learn how to defeat them.
The usual game seems to take option 3 - making the game more complex. This often shows up as additional features or extra moves.
Unfortunately, this also has the effect of killing genres.
Personally, I think some combination of 2, 4, and 1 (in that order) is the way to go. Make challenges that are different enough that they feel fresh - this is where truly good designers come into play. Make the AI at least a little unpredictable, and then make the game hard in general.
I’m Sorry Dave, I Can’t Let You Have That Gold
You can probably make reasonably good AI reasonably easily. If you can build a decision matrix like the one above, the AI can choose randomly from the choices based on the overall effectiveness - in this case, choosing to rush frequently, defend infrequently, and expand rarely.
This kind of basic randomization can work. One old text-mode game (that I believe ran on Novell) featured enemies that, players claimed, set up ambushes, and were nearly psychic in their ability to sense the player’s plan. In reality, they just did the most obvious movement, except for a small random chance that they would do the opposite.
Game Design the Wrong Way » Complexity vs. Depth | 20-May-08 at 11:08 am | Permalink
[…] dealing with a single player game, one thing to look at is AI. As discussed here, if the AI always chooses the “best” option, it is predictable and therefore […]