40
Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Embed Size (px)

Citation preview

Page 1: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Introduction to Cognition and Gaming

9/25/02: Von Neumann’s Game Theory, Game Balance

Page 2: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance
Page 3: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

John von Neumann

Taught at Princeton University during the 1950’s

Colleague of Kurt Gödel Colleague of Albert Einstein Students called von Neumann “The Genius”

Page 4: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

The Theory

It is always possible to find an equilibrium from which neither player should deviate unilaterally in any game that satisfies the following criteria: The game is finite – both in number of options at each

move, and in total number of moves to the end of the game

The game is zero-sum – one player’s gain is exactly the other’s loss

The game is one of complete information – each player knows all options available to her and to her opponent, as well as outcome values and scale of values

Page 5: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Cutting the Cake

Choose bigger piece

Choose smaller piece

Cut cake as evenly as possible

Half the cake minus

a crumb

Half the cake plus a

crumb

Cut one piece bigger than the other

Small piece Big piece

CutterStrateg

y

Chooser

Strategy

Page 6: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Finding the Saddle Point

Page 7: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Rock-Paper-Scissors

Simple, symmetric two-player game

Rock defeats scissors Scissors defeat paper Paper defeats rock Same item results in a

tie Von Neumann

equilibrium – play at random with probability 1/3

R P S

R 0 -1 1

P 1 0 -1

S -1 1 0

Page 8: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

John Nash

Generalized coalition-free games for several players

Nash equilibrium is the strategy that results in all parties being satisfied by playing the strategy allotted to them

i.e., With such a strategy, no player, after learning the moves of all his opponents, cannot come up with something better, provided the opponents do not change their strategies

Page 9: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Nash and the Prisoner’s Dilemma

P2 cooperates

P2 defects

P1 cooperates

3, 3 0, 5

P1defects

5, 0 1, 1

Page 10: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Nash and Chicken

P2 cooperates

P2 defects

P1 cooperates

3, 3 2, 4

P1defects

4, 2 1, 1

Page 11: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Game Balance

An unbalanced game is ugly and unsatisfying

Important to avoid wasted development on features that are never chosen

Aesthetic purity Marriage of design and function

Page 12: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Three Types of Game Balance

Player/Player Each player gets no special advantage but their skill

Player/Gameplay Learning curve is match with rewards to keep player

playing Gameplay/Gameplay

Features within game must be balanced against each other

Page 13: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Player/Player Balance

Half the fun of games like Virtua Fighter is seeing how different fighting styles compete with each other

If all the characters have the same moves, the game would be rather dull

Can Sarah beat Lion every time? If so, it’s not terribly unbalanced unless a beginner playing Sarah consistently beats an expert playing Lion, and even then, it may not be not critical if there is a large range of characters to choose from

Page 14: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Player/Player Balance

Victory should be achieved by skill and good judgment

This doesn’t mean there shouldn’t be an element of luck

Most strategies involve a gamble Deciding whether a risk is worth taking is part of the

fun for many people Random elements should not favor just one player

Page 15: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Symmetry

The simplest way to ensure perfect balance is by exact symmetry

Not only symmetrical in weapons, maneuvers, hit points etc., but symmetrical in level (i.e. no player starts with a better position)

Although a fair solution, it is rarely interesting

Page 16: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Symmetry

Symmetric maps would look unrealistic, and is a too obvious solution to equalize the odds

Better to have a level which is functionally symmetrical, but not obviously

Have players be flanked by different geographical barriers, needing different units to proceed.

The tough (but best!) solution is to give each player different choices, but giving them the same chance to succeed

Page 17: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Symmetry

If players are able to choose their starting positions, then you don’t want any position on the map to have an overwhelming advantage

Most general solution in this scenario is to avoid making the initial setup important (e.g. there’s resources everywhere!)

Page 18: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Symmetry

Remember, only games should be fair If you’re making an historical simulation, then

balance is a less important issue In a Conquest of Mexico simulation, it would

be terribly unbalanced to have one player be the Conquistadors, and the other play the Aztecs

Page 19: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Player/Gameplay Balance

“There is not a university in the world that I am aware of where in order to graduate with a Computer Science degree, you need to have written a program that is used by another individual, much less be graded on your ability to do so.”

- Bill Buxton, Chief Scientist, Alias|Wavefront

Page 20: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Player/Gameplay Balance

Sometimes developers get so enveloped in implementing “nifty ideas” and coding bells and whistles, that they forget that people will actually play it!

Think about the player’s relationship with the game

Page 21: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

A Bad Example (that will be offensive to

some)

“By using the plus and minus keys next to each trait on the menu, you can take points away from some traits and add them to others to get the balance you want. If you really don’t like the hand you’ve been dealt, you can click REROLL to get a different set of values for the various traits.” The Baldur’s Gate Official Strategy Guide

Page 22: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Player/Gameplay Balance

Balance challenges along the player’s learning curve

RPG’s – don’t just make the monsters tougher as I gain experience – give me more options and abilities!

Reward the player Let the machine do the work Make a game you don’t have to play against

Page 23: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Reward the Player

Players will make mistakes in the beginning In order to keep encouraging the player to continue

playing, give him a reward for learning something new and applying it properly

Gameplay payoff and graphics need to be worthwhile

Widen the gaming experience! “Now that I can do the flying scissors kick, I see a

whole new use for the reverse punch!”

Page 24: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Let the Machine do the Work

If the game involves tedious tasks that aren’t fun, don’t make the player do them

Often a question of interface Don’t bother the player – make the AI do it Some designers cross the line between

gameplay feature and chore Example: RPG’s that come with graph paper

for you to map the dungeons

Page 25: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Don’t Play Against the Game

Player should succeed with skill and judgment, not because he goofed up so many times that there’s only one possible solution left.

Some games are designed around the need to save – BAD BAD BAD!!!

A game that requires reloading as a normal part of the player’s progress is fundamentally flawed.

Page 26: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Gameplay/Gameplay Balance

We want there to be a variety of interesting choices rather than a single choice that always dominates

This isn’t easy to establish because the optimum choices depend on the choices other players make

It’s not easy to see how frequently different choices will be worth making, but this must be known in order to balance the game

Page 27: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Intransitive Relationships

transitive, adj. - being or relating to a relation with the property that if the relation holds between a first element and a second and between the second element and a third, it holds between the first and third elements

intransitive, adj. – not transitive (duh)

Page 28: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Intransitive Game Mechanics

Consider a SF II style game with three main attacks. Forward kick, stomp, and leg sweep

Leg sweep beats forward kick Forward kick beats stomp Stomp beats leg sweep Sound familiar?

Page 29: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Intransitive Game Mechanics

Against an AI that chooses randomly, you can equal its score by continually executing one move (e.g. leg sweeps). You will win, lose, and draw 1/3 of the time

A human opponent would recognize this behavior, and adapt by using more stomps, which would force me to use more forward kicks, etc.

Page 30: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

The Interaction Matrix

Leg Sweep Forward Kick Stomp

Leg Sweep 0 +1 -1

Forward Kick -1 0 +1

Stomp +1 -1 0

• Shows payoff for playing a maneuver vs. your opponent’s maneuver

• Game is zero-sum

Page 31: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

What if the Costs were Different? Suppose a stomp costs 3 points, a forward

kick costs 2 points, and a leg sweep costs 1 point

Also suppose that by beating your opponent, you gain 5 points, and you lose 5 points if you are defeated

The net payoff matrix now becomes…

Page 32: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Net Payoff Matrix

Leg Sweep Forward Kick Stomp

Leg Sweep 0 +6 -3

Forward Kick -6 0 +6

Stomp +3 -6 0

Thus, if I choose leg sweep and you choose stomp, you spend 3 points and I spend 1 point, meaning the difference is +2 points in my favor. But because stomp beats leg sweep, I lose 5 points, netting me -3

Page 33: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Finding the Ratio of Use

We’ll call the net payoff for using each move L, F, and S. We’ll call the respective frequencies l,f, and s. Thus, the net payoff for using the leg sweep is:

L = (0 x l) + (6 x f) + (-3 x s) These values are taken from the net payoff

matrix

Page 34: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

The Equations

L = 6f – 3s F = 6s – 6l S = 3l – 6f Since it’s zero-sum: L + F + S = 0 Since we’re looking for the equilibrium: L = F = S = 0

Page 35: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

The Equations

Solving the equations gives us the ratio: l:f:s = 2:1:2 What this means is that for the game to reach

equilibrium, the leg sweep and stomp need to be used 40% of the time, while the forward kick is used 20% of the time

This isn’t immediately obvious, hence the need to do the math

If one option is expensive, often the other options are most affected

Page 36: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Odd-Number Intransitive Relationships

Samurai Shugenja Ashigaru Archer Ninja

Samurai 0 +1 +1 -1 -1

Shugenja -1 0 +1 +1 -1

Ashigaru -1 -1 0 +1 +1

Archer +1 -1 -1 0 +1

Ninja +1 +1 -1 -1 0

Page 37: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Or…

Samurai

Shugenja

AshigaruArcher

Ninja

Page 38: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Even-number Intransitive Relationships

Archer Warrior Barbarian Sorcerer

Archer 0 +1 -1 0

Warrior -1 0 +1 +1

Barbarian +1 -1 0 -1

Sorcerer 0 -1 +1 0

Some players find this asymmetry appealing, since the player doesn’t merely have to learn a cyclical pattern of win-lose relationships

Page 39: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

Or…

Archers

Sorcerers

Barbarian Warrior

=

Page 40: Introduction to Cognition and Gaming 9/25/02: Von Neumann’s Game Theory, Game Balance

The Three Magic Rules of Balance Player/Player – A player should never be put in an

unwinnable situation through no fault of their own Player/Gameplay – The game should be as fun to

learn as it is to play, and it should be more fun the more you master it

Gameplay/Gameplay – All options must be worth using sometimes, and the net cost of using each option must be proportional with the payoff you get for using it