Design

The Difficulty Equation

What Makes Games Fun?

Earlier, I suggested that games are fun because they’re hard.  This is a pretty vague statement.  What’s hard?

I’m going to suggest a general equation here to describe the difficulty of a given decision, for a given player.  Please keep in mind that the values in this equation will generally vary based on the player.

Factors

A number of factors go into this equation.  They are:

  • A: Difficulty of Analysis
  • Dm:  Difficulty of decision-making
  • T: Time available make the decision
  • Nf:  Number of factors to consider
  • Nc:  Number of choices the player has
  • Dp:  Difficulty in physically performing an action
  • E: Difficulty of execution
  • Pf: Player familiarity with the scenario
  • C:  Consequences
  • Cs:  Severity of consequences
  • Cl:  Length of consequences
  • No:  Number of possible opponent decisions
  • Os:  Opponent skill (mental)
  • Oo:  Opponent opposition (physical)
  • Ps:  Player skill (physical)

General Equations

C = Cs * Cl

Consequences are determined by the severity and length of the consequences.  Consequences have a lower bound of zero.  If a decision has zero consequences, then it ceases to be an interesting decsion.

F = Nf * Nc

The factors to consider are the product of the number of factors to consider and the number of choices that the player has.

A = C * F / Pf

The difficulty of analyzing a situation is the product of the consequences of the decision and the factors to be considered, divided by the player familiarity with the decision.  This has a lower bound of one.  A decision with a difficulty of analysis of one can only be made difficult by the opponent’s decision making, or the difficulty of execution.

Dm = No * Os

The difficulty of making a decision, after analyzing a situation, depends on the number of choices the opponent has and the opponent’s skill in making those choices.  This has a lower bound of one.  A decision with a decision-making difficulty of one can only be made difficult by difficulty of analysis or execution.

E = Oo * Dp / Ps

The difficult of executing a decision is based on the difficulty of performing the action, the ability of the opponent to oppose the action (physically), divided by the skill of the player.  This has a lower bound of one.  In the absence of opponent opposition, the difficulty of execution will trend to one.

D = A * Dm * E / T

In English, the difficulty of a decision is based on the difficulty of analyzing the decision, the difficulty of outsmarting your opponent, and the difficulty of physically executing the decision, divided by the time available.

The difficulty of analyzing a decision is based on how much data the player must consider, how many choices the player has, and how familiar the player is with the situation being presented.

The difficulty of making the decision is based upon the number of possible choices the opponent has, and the ability of the opponent to “outsmart” the player.  Physical opponent skill is handled in analysis of the decision, and execution.

Flavor

While the equation suggests ways that are roughly equivalent to make a decision more or less difficult (increasing the number of decisions, or reducing the time available), a given combination will result in a different flavor of game.  Decreasing available time will result in a more frantic style of play, while increasing the consequences of a decision will result in a more deliberate, planned style of play.

As an example, speed chess (chess with a very low timer) plays very different than “normal” chess.

Difficulty Thresholds

Players will have a maximum difficulty they can deal with at any given time.  Players will simply not go beyond this level.  If players are given decisions that are beyond their difficulty threshold, they will disregard factors to stay underneath that threshold.

Players may choose to modify Time (by disregarding certain decisions entirely), certain Factors (by ignoring some data available), or certain Choices (by disregarding them completely).

Difficulty as a Function of the Player

A given decision may be more or less difficult for any given player.  This may happen because of several reasons:

  • The player, through knowledge of the game, can trivially disregard some Factors when making certain decisions
  • The player, through knowledge of the game, can trivially disregard some Choices when making certain decisions
  • The player, through practice, has a higher skill, making Execution easier and less of an issue
  • The player, through experience, can analyze Factors and Choices more quickly due to experience.

The last point is similar to the first two, but not exactly identical.  In the first two, the player is disregarding certain information or options as being irrelevant.  In the last point, the player is still considering the remaining choices/data, but is processing them at a much faster rate.

Analysis Difficulty Trends To One

For a given scenario, as player familiarity increases, the difficulty of analysis will trend to one (trivial/no effect).

Humans are incredibly good pattern matching machines.  Exposing a player to a given scenario repeatedly will allow him to eventually trivially (though probably subconsciously) analyze the situation and recognize the best possible options.

Decision-Making is Based On The Opponent

Given an analyzed decision, the difficulty of making a decision is solely based upon the opponent, specifically, the number of ways that the opponent may react.

If an opponent will always react to a given scenario in a specific way, this will reduce to one.

This will also reduce to one if the opponent has no ability, directly or indirectly, to interfere with the player.  For instance, this reduces to one in bowling, but not in darts (where the opponent has the ability to “close out” certain numbers).

Apparent and Real Complexity

Apparent complexity is the total number of choices and factors to be considered for a given decision.  Real complexity is the number of choices and factors that cannot be trivially ignored by an experienced player.

The important thing to note here is that apparent complexity can act as a barrier for new players, but does not add any significant depth to the game for experienced players.  Some apparent complexity is probably unavoidable, however.

Difficulty of Execution and Opponent Opposition

In most video games, opponent opposition is non-existent.  Executing a dragon punch in Street Fighter cannot be actively interfered with by the opponent - either you successfully execute the move, or you do not.  This is not the case in many physical games, where the player must not only execute a given skill, but do so given active resistance by an opponent.

An example of opponent opposition would be executing a throw in judo.  The opponent is actively thwarting the player’s attempt to perform the throw.

Opponent opposition is not the same as interference.  A quarterback throwing a football is not opposed - he either throws, or he doesn’t.  His throwing may be interfered with if he is hit while throwing.  In this case, he has made an error in his decision, not in his execution.

Similarly, our dragon-punch throwing Street Fighter player can be interfered with in the course of executing a dragon punch.  However, the actual act of performing the dragon punch is not made easier or harder by the skill of his opponent.  His chances to use the dragon punch without interruption may decrease, but the skill required is a constant.

(the difference seems fuzzy to me, but I think there is one.  I may be wrong)

Design

Comments (2)

Permalink

Good post on savepoints

Located here.

The game designer is able to choose the size of each unit of play, allowing the designer to fix the size of the unit and adjust the unit’s difficulty by tweaking the individual challenges, or to fix the difficulty of each challenge and adjust the size of the unit to add new challenges and therefore manage the unit’s overall difficulty. These two strategies are complementary and may be employed in alternating fashion for the greatest control over each unit’s difficulty.

This pretty well aligns with my views on the subject.  Save points should be used to break up challenges into discrete chunks.

The problems arise when designers do not think of them in these terms.  An additional problem is the default use of “go back to the last save point” as the only failure condition.  That’s pretty much just laziness.

Design

Comments (2)

Permalink

All Genres are Doomed

Well, mostly.  But headlines like that are great for stirring up controversy.

The game industry has seen a number of genres die out over the course of its lifetime.  Some of these deaths have been due to technological advantages, but I’d argue that most of them haven’t.

Flight Sims

Flight sims are a great example.  Sure, they still sell a few copies, but mostly to actual pilots or old grognards of the genre.

But they didn’t start that way.  One of the first flight sims, Flight Simulator (a descendent of which is still published by Microsoft), was a landmark title for its day (1979!).

Soon after Flight Sim came the combat flight simulator games, most notably F-15 Strike Eagle by Microprose in 1984.  For the next decade, flight simulators were released constantly, across all genres, and with increasing graphics and realism.

Sometime in the mid 90s, the genre started to die.  Fewer titles came out, and the ones that did started to sell more and more poorly.

So, what happened?

The early flight sim games were complex, but not so much that they could not be grasped by an average person.  Any game simple enough to run on a Commodore 64 has a certain ceiling to its complexity!  However, as the genre grew older, players became accustomed to certain features, and demanded more and more realism.  And this made the genre much more inaccessible to new players.

As an example, F-15 Strike Eagle started players out in the sky, with a loadout, and a couple of enemies directly in front of them.  Shoot ‘em down!  Even the flight model was simplistic, in comparison to modern sims.  Landing was often optional.

In a late-era game, however, the player would have to sit through a briefing, make plans for how to approach the target, decide on a loadout, launch the plane, deal with multiple radar modes, etc…

And the genre started to sell less copies (but to very rabid consumers), and become a small niche where it was once a major genre.

Lifecycle of a Genre

Genres seem to go through a few major stages in their lives.  This model can, generally, be applied to just about every genre in existence.

Inception

Genre lifecycle starts with inception.  Somebody has an idea for a groundbreaking game.  It isn’t much like any other game previously seen, even if it shares a few things in common.  It generally won’t sell many copies, but it’ll get a relatively large share of buzz. 

The game may not be particularly well balanced at this point, but it’s a new experience, and accessible to a wide variety of players.

Growth

The second game in the genre comes out, either a sequel to the first one or a similar game from a competitor.  Either way, this game will represent a major upgrade from the original.  It will generally fix the rough spots of the first one, add a few new features, and be a lot more fun than the first.

This game will start to gain a larger market, and the genre will grow a following.  This will also happen for a few subsequent releases.

Peak

At this point, the genre will have pretty well refined itself to a razor’s edge.  To keep players interested, game developers will start to add additional features on top of the game.  At some point, this additional complexity will start to put off new players to the genre - it’s a little hard to get into the game, but worth it once you’re past the learning curve.

Decline

Additional features are keeping the old fans buying new games, but new players are so overwhelmed with the complexity that they find the game boring.  Since the folks making the games are usually the biggest fans of the genre, they tend to dismiss these complaints as people wanting "dumbed-down" games - ignoring the fact that the "dumbed down" versions are what got the developers interested in the genre in the first place.  Sales numbers start to dwindle, and revenue to make the games starts to dry up.

Death

The genre has died, outside of a few low-budget, independent titles.  People will frequently say things like "<genre name> sucks, those games are boring."  Grognards boot up the old versions of the games, and find ways to tweak the data files to come up with more content.

Rebirth

"Hey, remember those flight sims we used to play when we were teenagers?  Wouldn’t it be cool if someone made a game like them, and just stripped out all of that complex crap that took 5 hours to learn but didn’t really do anything?"

Avoiding Genre Death

Don’t be Afraid to Remove Stuff

Evolution is a neat thing.  In addition to adding stuff, evolution can also remove things that no longer serve a purpose.

Every feature you add changes the game.  And it may make some previously-needed features utterly irrelevant.  Getting rid of useless features is a great way to keep the complexity of your game under control, giving the grognards new things to play with while keeping overall complexity under control for new players.

Ease ‘em In

This can be hard to do, especially in some games, but incrementally exposing the complexity to users is a great way to have complexity in the game, while not hammering newbies with it immediately.

The biggest catch here is making sure that the "intro" period is either short enough that more experienced players can zoom through it, or enjoyable enough that they don’t mind.

Also keep in mind that there’s a difference between "inexperienced" and "low-skilled."  A veteran fighting-game player may struggle with a new game if he doesn’t know the movelist and new concepts.  However, once he gets up-to-date, he’ll probably be a relatively good player.

Build in Layers

Sometimes, the best answer is to build upwards.  Leave the core game more-or-less untouched, but add in additional layers of gameplay above the core.  To add complexity to a flight sim, you can require more buttons and management in the cockpit - or you can add a strategic layer that has to be managed that impacts, and is impacted by, your success and failures in the cockpit.  The strategic layer stops the new player from being overwhelmed initially in the cockpit, while still giving the advanced player more to think about.

Limited Scope

Add additional features, but limit areas where they can be used.  If Mario can only fly when he eats the right mushroom, then it’s very easy to make sure that the players never have to worry about flying, fireball-shooting, metal, ice, bee Mario - only one extra set of features can be active, or generally even available, at once.

This also makes content easier to develop, as you don’t have to worry about every combination of abilities in every scenario.

Know What’s Important

When looking at adding or removing features, know what’s important to your game, and what’s not.  Look at the decisions you want your players to make, and make judgements based on that.

Every feature you add will change what the important things in your game are.  If you take an RPG that’s mostly about strategic battles, and add a lot of items, you will shift some of the focus to item-gathering.  That’s not a bad thing, just be aware of it.

Avoid Busywork

If a feature that is being considered only adds steps that must be followed, instead of allowing for different decisions to be made, don’t add it.  You’ve added no real value to the game, while adding complexity to the user.

Similarly, if a new feature is only useful in some situations, don’t make the players deal with it all of the time - leave it as an extra option to be used if the player needs it.  For instance, if making a sub dive normally sounds off a dive alarm, great.  Players shouldn’t have to do that, it should just happen.  However, if there’s a reason a player might not want to sound of the dive alarm, then you can leave it open to the player to do so or not. 

If not sounding the dive alarm is only useful in a small number of situations, and is dangerous otherwise, though, then sounding the alarm should be default and automatic, unless the player specifically specifies not to.  Not only does this avoid a checklist of things the player must do at every step of the game (making the game feel more like work, and less like fun), but it also allows the player to be unaware of the dive alarm toggle until he actually needs it, removing an unnecessary complication from the player’s mind in the early stages of learning the game.

Keeping Them Alive - Civilization

Not all genres have to die - it’s just the natural progression.  To keep a genre alive, you have to be aware of the genre lifecycle (at least in a general sense) and take measures to prevent the decay and death of the genre.

Civilization was heading down the road of genre death.  Even as a player of Civ I, Master of Magic, Alpha Centauri, and a smattering of Civ II, I found Civ III simply overwhelming.  Too much information was thrown at me from the first second of gameplay.  Even buying the game, I played it about 45 minutes.

Enter Civ IV.

Civ IV did an excellent job of keeping the genre alive.  The initial resources, units, and techs to consider were limited, and very clear in what they did.  Many of the more advanced options only came into play later, and individual citizen assignment only was brought up if you deliberately clicked into the cities.

In addition to simply having easier AI, lower levels of difficulty also lowered the impact of factors that would normally have to be dealt with and managed - health, happiness, taxation.  They still existed, providing players with a gentle introduction to them, but upping the difficulty a few notches forced players to deal with the full brunt of them, having been made familiar at the easier levels.

Additionally, the unit counts were reduced, and replaced with the ability to customize units with additional bonuses.  This gave players the ability to have specialized units if they wanted them, while still only requiring them to deal with a few base unit types.  Some of the specializations were simple bonuses, so if players did not need or understand the more niche specializations, they did not have to worry about them.

And yet, all of these factors were available for the player to delve into at any time.

While I don’t have particular sales figures, I don’t think it’s a coincidence that CivIV has won numerous awards and generated several add-on packs.

Complexity Kills, Not Depth

Genres tend to become more complex over time, and this leads to their doom.  The key to keeping your genre alive is to actively manage the complexity of the games, and how that complexity is presented to new players.  New players are the life blood of any genre.  If you exclude them, you are committing a slow suicide.

Design
Meta-design

Comments (1)

Permalink

Positive and Negative Feedback

Okay, time to back off of game-theory land for a bit.

One thing to look for in game design is feedback loops, both positive and negative.  By feedback, I don’t mean people praising or insulting you on your board, I mean feedback within your game.

Positive Feedback

Positive feedback occurs when the act of succeeding makes it more likely that you will succeed.  The impact of this is that an early lead becomes difficult, if not insurmountable, to overcome.

In Quake 2, an early lead generally meant that your opponent was respawning with bad weapons, while you would generally have some armor left and decent health (even if not full).  Recovering to full health was generally not a big issue, but the lack of weapon availability was.  Because of this, many Quake 2 matches started out very tight, but quickly became one-sided after the first kill or two.  Even in professional/tournament play, it was normal to see the scores of individual games (1 on 1 or team) be extremely lopsided, even when the teams themselves were rather close.

Similarly, in more realistic racing games, an early lead can become insurmountable.  The lead car not only has a lead that can be protected, but doesn’t have to deal with other cars forcing him out of the optimal line.

Negative Feedback

While positive feedback has the effect of protecting a lead, negative feedback does the opposite.  Negative feedback either constrains the player in the lead, or gives an advantage to the player or players trailing.

An excellent example of negative feedback in a non-video-game scenario is 8-ball pool.  An early lead in 8-ball simply means you have more of your balls off of the table.  This produces a state where there is a greater chance of your opponent’s balls blocking your shots, making it harder for you to increase your lead.

Another good example is drafting in racing games.  By drafting, a player that does not have the lead can increase their speed, an option that the lead player does not have.  This can counter the effect of the positive feedback inherent in racing games, but only if the lead is sufficiently narrow.

The Civilization games are filled with negative feedback.  Tech leads must pour resources into research, while those behind can often pick up the same technology for a song.  Larger empires create higher overhead, and so become harder to expand.  Even though tech and buildings can be created to overcome this, those buildings carry their own price, both initial and ongoing.

Natural and Artificial Feedback

Natural feedback is feedback that is a “natural” consequence of the game rules overall.  For instance, in a hypothetical racing game with only front-firing weapons, there is a negative feedback to being in the front - more people can shoot at you, and you can’t shoot at anyone.

Artifical feedback is feedback that is put in the game arbitrarily, without a core mechanic backing it up.  For instance, the “rubber-banding” seen in many arcade-style racing games is a good example.

While negative feedback can help games remain more competitive, it’s important to realize that many players will act negatively to artificial feedback, especially if it causes them to lose.  On the other hand, making use of natural feedback is often simply “good strategy.”  In a realistic racing game, if one player drafts behind another one and uses that speed to pass the leader in the last second, this is “good strategy.”  However, in a less-realistic game, if the rubber-banding effect causes the same result (a last second loss) this can be considered to be a “cheap loss because of stupid rubber-banding.”

This doesn’t mean that artificial feedback is universally bad, but that you should be aware of the psychological impact that it may have, especially on more competitive players.

Feedback in Single Player

While this article has mostly focused on multiplayer games, single player games are also filled with feedback loops.  These commonly involve either powerups gained for strong play (positive feedback) or depletion of stores if you play poorly (positive feedback).

This can pose a problem in two ways.  If a given stage/area is balanced at a certain difficulty, and the assumption is that a player will enter the stage with certain resources, then it is likely that a player that just “squeaked through” the previous area will find himself under-equipped (to the assumed resource set) in an area harder than the one that he barely made it through.  This can quickly make the game nearly unplayable.

On the other hand, if a player was able to waltz through a previous area, and now has additional resources beyond what is assumed, it is likely that the next area will become even easier than intended.

The real trap in this case is thinking that the game is too easy because the testers or developers (who are all experts at the game) always have all of the bonus items, and so assume the bonus items when balancing the levels.

Design

Comments (2)

Permalink

Complexity vs. Depth

These are terms that are thrown around a lot, but are not well defined.  So, here’s an attempt at a definition.

Complexity is a measure of the possible choices a player has at any given moment, as well as the number of factors the player must consider.

Depth is a measure of the number of choices a player can  make at any moment that are not dominated strategies.

Example: Tic-Tac-Toe

Tic-tac-toe is a great example of a game with no depth.  At each turn, there is a single move that is definably the best move to make.  Some moves seem to have more than one “best” move, but that is because the moves are functionally equivalent - picking any corner on move 2 is essentially the same move.

Tic-tac-toe is boring.  The reason tic-tac-toe is boring is that it has no depth - at any given move, the player’s response is dictated.

Interestingly, game theory states that any sequential game with perfect information can be “solved.”  So chess, for instance, is solvable.  There is, theoretically, a single best opening move, if you have full and perfect knowledge of every possible move after that.

Depth Isn’t Necessary

Many games are successful without much depth.  Almost all puzzles fall in this category - there is a single solution.  By extension, most adventure games fall into this category as well.  The challenge and enjoyment of these games comes from analyzing the puzzle and determining the correct solution.

If you’re going for a game that is not based on depth, there are two ways of approaching it.  You can either increase the complexity of the rules, or you can present different configurations of the puzzle to the player.

Sudoku, for instance, has very simple rules.  The reason Sudoku is fun is that players can play different puzzles, giving them new challenges within the same ruleset.  Crossword puzzles are similar.

On the other hand, most computer games that don’t increase depth increase the complexity - once players have mastered making the correct decision between A, B, and C while considering factors 1,2, and 3, games will either increase the options available, or increase the factors the player must consider.  Either of these increase complexity, but not necessarily depth.

Increasing complexity has the side effect of eventually becoming a barrier to entry for new players.  By the time our hypothetical game has choices A-Z, and factors 1-100, new players will find themselves unable to grasp the game sufficiently to play.

Another way to make a game fun without depth is to focus not on the gameplay aspects, but rather on the entertainment aspects - the graphics, sound, writing, plot, etc.  This is completely valid, but a bit beyond the scope of this blog in general.

Increasing Depth 

How, then, do we increase depth?

Simple.  Make more valid options at each decision point, and make sure we don’t fall into any pure strategy equilibrium. 

A pure strategy equilibrium is an equilibrium where the players do the same move every time, compared to a mixed strategy equilibrium where the players choose different choices with a certain probability - humans are very poor randomizers, so actually properly executing a mixed strategy, for a human, is very nearly impossible.  In RPS, choosing each symbol 1/3 of the time for both players is a mixed strategy equilibrium, however people are almost incapable of doing so, which is why things like Roshambot can beat humans.

If 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 defeatable.  One option is to have the AI randomly choose between a certain number of the best strategies (or between strategies that are within n% of the best, or…).  This will prevent the game from having a single, best strategy due to AI predictability.

Another thing that can be done is to hide information.  If not all information is known, the player will have to make choices to take into account a number of possible scenarios.

Randomization is a form of information hiding - if the results of an action are unknown, then devising a single, best strategy will be hard to do, if not impossible.

Complexity can also be increased by adding choices.  However, be careful when doing this, and do it slowly, as adding a choice can often invalidate others, leaving your game with less depth, but more complexity, than it previously had.

In some cases, you can increase complexity by removing choices.  If a particular strategy dominates two others, then removing that one strategy can increase depth while simultaneously reducing complexity!  In most cases, that’s a win-win.

Adding a skill requirement is another possible way to increase depth - requiring a certain level of skill to execute a given strategy effectively will essentially randomize the outcome.  For instance, in Street Fighter, a player may not be able to execute a Shoryuken 100% of the time.  This introduces a decision point for him - weighing the benefits of executing properly against the drawbacks of a failure.  Be careful with this, however, as it can lead to a situation where the game has less depth at the high end if everyone can eventually perform the skill 100% of the time (or at least close enough as to be functionally the same).  While I don’t like making general proclamations, I think a good general rule is that games should have more depth at the high end of ability, not less.

Design

Comments (2)

Permalink

Adaptive Difficulty

Gamasutra - The Designer’s Notebook

Adaptive difficulty is something of a hot topic. I think there’s ways to do it relatively easily, using existing mechanisms, in ways that gamers will find natural. In fact, I’d argue that a lot of games already use adaptive difficulty, they just don’t call it out.

Take Puzzle Quest. It has an interesting feature in that losing a “combat” (puzzle) doesn’t cost you anything. You just have to redo the puzzle from the beginning.

But, even more, you will gain experience and gold from even a failed attempt, meaning that a few failures can often be enough to level you up, giving you a better chance against the tougher creatures.

And beating tougher creatures gives you more exp, causing you to gain levels faster, so that you can fight even tougher creatures.

So, if you are having a hard time on a part, the game will eventually make your character stronger so that you can have an easier try of it. If you’re regularly defeating tougher challenges than you “should” be capable of, the game will zip you along to the harder content.

That sounds like adaptive difficulty to me, and it doesn’t require any insane AI, or convoluted design mechanisms.

Parallel ideas are seen in other games, as well. Many side-scrolling adventure games (Metroid, Castlevania, etc.) will have hidden powerups in areas. If a player is just stumped, they might just explore around previously “finished” areas, gaining powerups, and coming back to take on the challenge with more power.

Even grinding in some RPGs can be seen as a kind of adaptive difficulty, as you can still choose when you wish to try to go into the Dark Dungeon of Doom, depending on how penalizing the math is.

A lot of the answers are right in front of our faces. Good games, past and present, do things well. They might not understand what they’re doing, or why it works, but it works anyway.

Design

Comments (0)

Permalink

Balance is not Equality

Some Background Info

A couple of links, first.

Sirlin - RPS

Sirlin - Yomi

These posts are basically about RPS, and indirectly hint at game theory.

First off, RPS.  Now, I’d never argue that RPS is a particularly good game.  What it does do, however, is completely remove the analytical and execution phases of decisions, leaving only the decision itself - outguessing your opponent.  And it can be done, if you play more than one game.

Roshambot - go ahead, try to beat it.  Don’t say I didn’t warn you.

What’s interesting is that game theory can pretty much explain what Sirlin was trying to say, only a bit more succinctly.

Pai and Akira

Pai/Akira Throw Big Move
Counterthrow .5,-.5 -.5,.5
Block -.8, .8 .8, -.8

So, what we see here is pretty close to Sirlin’s description.  If Pai counterthrows successfully, she gets to put some hurt on Akira.  If Pai tries a counterthrow and Akira gets his big hit off, Pai takes some damage, but not as much as if Akira got the throw out.

This is good balance.  The moves don’t have to be equal, but what’s important is that there are no strategies that are dominated - for each character, each move is useful in some situations.  Complete balance wouldn’t necessarily hurt - but it’s not necessary.

Dominated Strategies - Rock, Paper, Scissors, Bomb

Let’s look at a bad example of balance:  Rock, Paper, Scissors, Bomb.  It’s just like RPS, except that there’s a new move, the Bomb.  The Bomb blows up Paper and Rock, but gets its wick cut by Scissors.  Bombs blow each other up for a tie.  So, the decision matrix looks like this:

  Rock Paper Scissors Bomb
Rock 0 -1,1 1,-1 -1,1
Paper 1,-1 0 -1,1 -1,1
Scissors -1,1 1,-1 0 1,-1
Bomb 1,-1 1,-1 -1,1 0

So, what impact does the Bomb have?  The important thing to see here is that in every situation, the Bomb does as well, or better than, Paper.  So in this case, the strategy of Paper is dominated by the strategy of Bomb.

That’s bad.  Why have an option in the game that doesn’t do anything?

But the Bomb isn’t unbalanced in comparison to rock or scissors.  Rock still outperforms the Bomb against Scissors, and Scissors outperforms the Bomb against both Scissors and the Bomb.

In fact, there’s an interesting fact about both a "normal" RPS matrix and a RPSB matrix, minus the Paper (since nobody would play that).  Here’s RPS:

  Rock Paper Scissors
Rock 0 -1,1 1,-1
Paper 1,-1 0 -1,1
Scissors -1,1 1,-1 0

And here’s RBS:

  Rock Bomb Scissors
Rock 0 -1,1 1,-1
Bomb 1,-1 0 -1,1
Scissors -1,1 1,-1 0

Look familiar?  They should… they’re exactly the same!  The only thing that adding the bomb did to the strategy of the game is to make Paper obsolete - once you ignore Paper, the game has the exact same strategies it did before.  This is a good example of adding complexity (the player has to know never to play paper) without adding any depth (once the player knows that, it’s the exact same game).

Equilibrium

Another thing to look out for is equilibrium.  Equilibrium just indicates a point of balance, that creates a general state of lack of motion.

The most common type is a Nash Equilibrium.  This is a situation where neither side can make a gain by changing their strategy, unless the other side makes a change as well.

Consider:

  Hide Run
Hide 0,0 1,-1
Run 1,-1 1,1

This represents a shootout.  If both sides hide, they don’t get anything.  If both sides run, they both get away.

But, if one side runs while one side hides, they get shot while running away.  Their opponents then get away and take out the dastardly other team.

So what happens if both teams start by hiding?

Well, if either team runs, the other team shoots them.  So neither team can move, even though neither team gains anything by hiding.  This is a Nash Equilibrium.

Avoid these.

Smash Brothers

Some people like to play the Smash Brothers games without items.  Personally, I think it’s missing the point.  The items are there for a reason.

Here’s an example - some levels in tournaments are banned, because players can get in a defensive position that is basically unassaultable.

This leads to a simple decision matrix, almost exactly like the shootout one above.  Neither player can gain anything by moving, but the first player to move puts himself in a weaker position than they were in.

Well, let’s go back to an earlier post - Opportunity Cost.  What’s the opportunity cost of sitting in an unassaultable spot?  The fact that you’re in exactly one spot.  And, if items are turned on, there’s lots of items that can break an "unassaultable" position quite easily.  And if you’re in one spot, you don’t get them.

Maybe those Nintendo folks aren’t as dumb as they look, eh?

Design

Comments (2)

Permalink

AI and the Single Player Game

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.

Design

Comments (4)

Permalink

3 stages of decisions

It seems that, in general, there are 3 stages of decision-making.

  1. Analysis
  2. Opponent
  3. Execution

 Analysis

The analysis stage is about gathering information.  This doesn’t have to be done at the exact moment of the decision - it’s based on all information gathered to that point.  Once the information has been gathered, it has to be analyzed, to turn it into a series of likely outcomes, dependent on what your opponent does.

At the beginning of an RTS game, if you assume the “classic” 3 choices of defend/expand/rush, the analysis stage would result in how much you’d gain or lose based on each option, for each choice that your opponent could take.

Opponent

Once you’ve analyzed the information available, you have to make a decision.  Obviously bad choices are simply thrown away - choices which may be better or worse dependent on what your opponent reacts are considered.  This is where a lot of the “mental game” occurs in any game - figuring out what your opponent is going to do, or leading him into thinking you’re going to do one thing when you actually do another.

Execution

Once you’ve decided what to do, you have to actually do it.  This is the area where pure skill comes into play.

Emphasis on differing stages by game

Different games place different emphasis on stages of the process.  The execution phase is essentially non-existent in chess, while it’s always a large factor in bowling.

Even variants of the same game can place different emphasis on various stages.  For instance, 7-card stud poker places a great deal of emphasis on the analysis stage, while Texas Hold’Em streamlines the analysis stage and places a greater emphasis on the opponent stage.  And neither of them are particular based on skill, in the “pure physical” sense.

Emphasis on differing stages by player ability

Players also seem to emphasize different aspects of the decision making process, even within the same game.  For a game which includes all three stages of decision-making, the order in which players emphasize them (lowest skill to highest skill) seems to be:

  1. Execution
  2. Analysis
  3. Opponent

This makes sense.  At low levels of skill, the ability to effectively perform a technique will be more important than choosing the right action to take.  If both players have little skill, a successful execution will be somewhat rare, and so the cost of choosing a poor action is not immediately apparent, while the results of performing the technique well are.  Games played by players at this ability level are often characterized by an extreme focus on offense, and of attempting any “scoring” opportunity, no matter how improbable.

Once basic skills have been mastered, good decision-making becomes the next most important aspect.  A player at this level will start to see the consequences of his decisions, as his opponent becomes more able to effectively take advantage of his mistakes.  Analysis of the situation then becomes more and more important, as weaknesses in the opponent’s play can then be taken advantage of.  While skill, and increased skill, still are valuable and provide an advantage, bad decisions can nullify them, allowing a lesser-skilled (but still competent) opponent to win.  Games played at this level become characterized by an increasingly well-organized and tighter game, relying upon their opponent to make a mistake.

Once both players are able to analyze the situation effectively, the game becomes, primarily, a mind game.  At this point, you are considering what is the likely outcome based upon what your opponent will do.  Simply making the “best” play is no longer enough, as your opponent will expect it, and be aware of how to counter it (assuming that the game isn’t horribly broken, that is).  This is also the aspect of decision-making that game theory primarily covers, as it assumes both players are capable of executing decisions, and have the ability to analyze the outcomes accurately.

This is the highest level of gameplay.  At this level, the general rules discovered in the previous stage become a starting point, rather than an absolute.  At this stage of the game, the players become more actively involved in influencing the play of their opponent.

Computer and video games, and the three stages

Generally, computer games have AI that is very predictable - in a given situation, it will always make the same choice.  In some games, the opponent is a system that is designed to be entirely predictable.  Because of this, solo computer games typically emphasize the analysis and execution stages of decision-making.

This is somewhat interesting, then, because if your opponent is predictable, then any given scenario will always result in exactly one best decision, for any set of circumstances.  The game becomes learning how to analyze the best decision to make, and improving the ability to execute it.  As players become better at the game, the only way to increase the interest level is to either require higher levels of skill, or introduce more factors into the decision-making process.

Both of these options have the unfortunate side effect of making the games less accessible to new players.  At the early stages of this process, new players will have a more difficult time getting into the game.  However, as this continues over the course of years, eventually the games will become so complex that new players will be all but unable to learn how to play the game.

Complexity and depth

We hear these terms a lot when dealing with games.  I’m going to try to define these:

Complexity refers to the difficulty of analyzing the available choices.

Depth refers to the number of choices available that are not dominated strategies.

BTW, “dominated strategy” refers to a choice that, no matter what your opponent does, is inferior to a specific other choice.  In rock paper scissors, there are no dominated choices.  If you add in the “bomb” (blows up rock and paper, fuse is cut by scissors), then the choice of paper is dominated by the bomb.  No matter what the opponent chooses, “bomb” always does at least as well as paper if not better, so there is no reason to ever choose “paper” if “bomb” is available.

If we assume a predictable AI that will always choose the same option in a given situation, then that game can only increase in complexity or skill, not depth.  That’s not necessarily a bad thing.  One of my goals in this blog is to not make judgements about what is good or bad in games or game design, but to rather help devise a framework that can explain observations.  Increasing in complexity is fine, so long as you’re doing it deliberately, and for a specific reason.  But, be aware of the side effects of increased complexity, especially the increasing difficulty to attract new players to the game/genre.

Design

Comments (2)

Permalink

Opportunity Cost

Opportunity cost is a very simple concept.  The opportunity cost of any action is any other actions that are then precluded.

If I have one hundred dollars, and I use it to buy a bicycle, the opportunity cost of that purchase is all of the other things that I could have purchased with that hundred bucks.

When looking at games, and specifically decisions within games, it’s a useful concept, as thinking about the opportunity cost of a decision can help us define what the actual decision is at any point.

If a decision has no opportunity cost, then it’s not a decision.  This is rare - usually, even *not* doing somehting is a viable alternate, and so the opportunity cost of any action is, generally, that you lose the ability to not perform the action.

As an example, if casting a particular spell is free, and that spell has some lasting effect on the player, then the opportunity cost of casting that spell is *not* having that effect on you.

For another example of how thinking about opportunity cost can help in game design, let’s look at RTS games.  In a typical RTS game, you will have some type of gatherer unit that collects resources.  A typical decision early in most games, is whether the player should build more gatherer units, start building offensive units, or start building defensive units.

Any of these choices does not preclude you performing the others in the future.  Building production units at the immediate moment doesn’t stop you from building offensive or defensive units later - in fact, it makes it easier.  In many games, you could actually, to some extent, build all three at once.

So, what’s the effect of building production units early?  You get an early boost to your economy that (generally) will give you an early bonus in production, assuming that you live long enough to see it.  Similarly, early production of offensive units gives you the ability to do an early attack before your opponent has had a chance to build any defense, and early production of defensive units will defend your base against an early attack.

When you look at these three choices, the traditional 3 early game strategies (expand, rush, defend) become very obvious.  The opportunity cost of “early production” is early defense and offense - you become vulnerable to an opponent doing an early attack.  The opportunity cost of early defense is production and offense - you can’t take advantage of your opponent if they don’t defend early, and you lose any production boost you could use against a defensive opponent.  The opportunity cost of early offense is that you don’t get the production boost, and are still vulnerable against early attacks (although you can meet the opposing force head-on and at least have a chance).

Another interesting place to look at opportunity cost is MMO abilities.  In typical MMOs, abilities have sufficiently long reuses that casting a spell or using an ability does not, in any meaningful way, preclude using the other abilities.  And, with the generally slow regeneration of power, abilities usually don’t cost enough power for power to be a truly first-tier consideration in what you should do.

So, what’s the opportunity cost?  Generally, it seems to be tied to a few things:

  1. Time to execute the ability.  Since, in most MMOs, abilities hav an execution time that prevents you from doing other activities, the opportunity cost of an ability is the fact that while it prevents you from doing other things during that time.
  2. Side effects of the ability.  Casting a large, damaging spell may have side effects such as angering the opponent so that it will attack you.  In many cases, this is undesirable.
  3. Abilities that are mutually exclusive.  This is often seen in “stances” that some classes can take which are mutually exclusive, but it can also be seen in spells where a spell can prevent another type of spell from being cast on the same target, either offensively or beneficially.
  4. Power can be a consideration, as it can prevent you from casting other spells, but this usually happens later in the fight (especially when things have already taken a bad turn)

BTW, opportunity cost is an economic term, and you’ll be seeing a lot of things from economics in this blog over time.  Mathematical game theory is often used in economics, and games are often about resoure allocation, which is, in many ways, what economics is about.

Design

Comments (4)

Permalink