Monday, September 23, 2013

Probability in games


Davide Bisso
Game Design BS (Full Sail) 
Probability in games

Most games of today have several elements of probability incorporated into their base mechanics. We’ve all heard about or played World of Warcraft, Texas Hold’em and the classic Pac Man right? Although, completely different in genres and motives, each one of these games has their unique probabilistic mechanics or “random events” integrated throughout its gameplay. Some, without a doubt more advanced than others but nonetheless still using the same laws of probability.

Lets take Pac Man for example. When you first start playing this game, you’ll most likely feel as if the ghosts are on a relentless pursuit to get you. You franticly eat away at the dots trying to completely avoid each colored wraith, but as you progress you find this to become more difficult. This may leave you wondering, does the game have a patter or is the chase at random? Thanks to probability we’ve figured out that the ghosts aren’t actually programmed to chase you. If they were, the game would be impossible. Instead, each one has different patterns: Only the red ghost (Blinky) is programmed to go after you. The pink and blue ones (Pinky and Inky) only want to position themselves at a specific place relative to you, and the orange one (Clyde) just moves around randomly.

This leaves us with a basic understanding for how probability works with many of the golden age games (1970-1980) but personally, I feel that there’s much more to probability in games than the above example. Lets take a look at card games and rolling dice for the next portion. Typically you’ll find these two utensils mixed into Casino games like Hold’em, slots, craps and so on. Your main priority when playing these games is to be wary of the “gamblers fallacy” but in order to understand this fallacy you must have knowledge of independent and related events.  So what are independent and related events?

Independent Events: The chance of each event occurring does not depend in any way on what happened in the other event. For example, rolling a six-sided die (event #1) and then rolling it again (event #2) are independent events. The first and second rolls are not related in any way. The number you rolled in event #1 has absolutely zero influence on event #2.

Related Events: the chance of each event happening is related in some way to the other event. For example, drawing a card from a poker deck (event #1) and then drawing a second card from the same deck (event #2). The chance of drawing a King on event #2 is affected by event #1—if you drew a King on event #1, then there’s a smaller chance of getting one in event #2 because there are less Kings remaining in the deck.

As you can see we have a pattern. “The Gamblers Fallacy” is nothing but someone confusing independent and related events. DON’T FALL FOR THE TRAPS!

Now, because not all game designer work with cards and dice, we must also take the time to figure out how probability works with digital games. In digital games, random numbers generators aren’t necessarily random. They use a “seed number” which is a number used to initialize a pseudorandom number generator. This PRNG is an algorithm for generating a sequence of numbers that approximates the properties of random numbers. This can get pretty complex, especially when working with big games, as you will start to notice patterns (patters lead to boredom, which = people quitting your game).

What we conclude from this article is that probability has many key factors in board, card and digital games. As games and technology rapidly evolve, we must use our knowledge to create new immersive games.

Thank you for reading.

Reference:
Omey, E. “A simple game to derive probability”. EBSCOHOST.com. N/A. 9/23/2013.http://web.ebscohost.com.oclc.fullsail.edu:81/ehost/pdfviewer/pdfviewer?vid=8&sid=a43c2f53-37a5-4f4b-9eab-a29a4b76da5f%40sessionmgr10&hid=18

Peter Webb’s “Layman’s Guide to probability”. http://www.peterwebb.co.uk/probability.htm

Monday, September 9, 2013

Basic Game Theory and Design


Davide Bisso
Game Design BS (Full Sail)
Game Theory: payoff Matrix (Normal Form Game)


Seeing as I’m studying to become a Game Designer, choosing the Game Theory: Payoff Matrix seemed most logical. The reason for my decision is partly due, because of how much Game Theory influences a Game Designer. This could range from tweaking stats, adding new features and implementing gameplay. This barely scratches the surfaces for what Game Theory does to Game Design, but I will leave that for another post. The main thing to take away from this is; as a Game Designer, your overall goal is to give the player an enjoyable and satisfying experience. With the help of Game Theory we can make strategic decisions in order to achieve that goal.

Now you may be thinking, what is the Payoff matrix and how can it benefit us? To answer this question we need to understand, (1) what a game is and (2) how strategy applies to that game.  To put it simply, a game is a framework involving two or more players, where each player's success is determined not only by his/her own strategy, but by the strategies of all the other players in the game (multiplayer game). This leads us into defining strategy. A strategy is a complete plan of action for a player that explains how he/she will behave. So, now that we understand these principles we can go back to our main question: “What is the Payoff Matrix and how can it benefit us?”

This question can be answered in many different forms, but I feel the best way to truly understand the overall concept is to illustrate an example. So, lets say we’re playing a typical *RTS game where you’re given just enough resources to either make one Orc or one Elf. Pretty standard. Now, lets assume that Elves always beat the orcs (their agility/dexterity is too much for the brutish orcs). Lets also say that, when an elf fights another elf it’s an even battle. Each player will be awarded half a point. Lastly, lets assume winning the game earns the player one point. With these ingredients we can make a pretty basic illustration, which will look something like this:

Player 1 / Player 2
                                  Player 2 chooses orcs   | Player 2 chooses elves

Player 1 chooses orcs |        (1/2,1/2)            |           (0,1)

Player 1 chooses elves|           (1,0)                |       (1/2,1/2)

From looking at this Payoff Matrix, we can conclude that building an elf is the strictly dominant strategy. If my opponent builds an orc and I counter with an elf, I get 1 point whereas countering with an orc gives me an expected value of 1/2. Same goes for my opponent. If he/she builds an elf and I counter with an orc I am guaranteed to lose and get 0 points whereas countering with an elf, I can expect 1/2. With this notion, it’s clear building elves makes for a better scenario.

If I were to actually create this game, some form of balance would have to be implemented. Experienced players would come to understand that elves win the game every time and that orcs are a pointless race (sorry to all the orc fans out there). From a designer’s perspective, I can say this game has the potential to be fun, but it needs some work. By tweaking stats, creating a new race, or reducing the resources on the orcs by half are some of my quick solutions. 


*Real-time strategy (RTS) refers to a time-based video game that centers around using resources to build units and defeat an opponent. Real-time strategy games are often compared to turn-based strategy games, where each player has time to carefully consider the next move without having to worry about the actions of his opponent. In real-time strategy games, players must attempt to build their resources, defend their bases and launch attacks while knowing that the opponent is scrambling to do the same things.

N/A. “Defining RTS (Gaming)”. Technopedia.com/definition. N/A. 9/9/2013. http://www.techopedia.com/definition/1923/real-time-strategy-rts