Who is this guy?. Shawn Patton 2003 CMU ETC Grad 10 years at Schell Games (I apologize for my barebones slides, but focus on the learning, not the flair.)

Slides:



Advertisements
Similar presentations
Probability of Independent Events
Advertisements

What are your Chances? by Laurie Townsend.
Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
1 Some more probability Samuel Marateck © Another way of calculating card probabilities. What’s the probability of choosing a hand of cards with.
Randomness and Probability
How likely something is to happen.
From Randomness to Probability
Describing Probability
Probability Sample Space Diagrams.
Copyright © Cengage Learning. All rights reserved. 8.6 Probability.
1 1 PRESENTED BY E. G. GASCON Introduction to Probability Section 7.3, 7.4, 7.5.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 15 Chances, Probabilities, and Odds 15.1Random Experiments and.
8.7 Probability. Ex 1 Find the sample space for each of the following. One coin is tossed. Two coins are tossed. Three coins are tossed.
Section 16.1: Basic Principles of Probability
Probability Probability Principles of EngineeringTM
Probability And Expected Value ————————————
The Laws of Probability As They Pertain To Genetics.
What are the chances of that happening?. What is probability? The mathematical expression of the chances that a particular event or outcome will happen.
Bellwork What fraction of the spinner is blue? Write in simplest form.
Department Store A department store is divided into two sections, electronics and furniture. Each section offers a discount rate; items in the same section.
X of Z: MAJOR LEAGUE BASEBALL ATTENDANCE Rather than solving for z score first, we may be given a percentage, then we find the z score, then we find the.
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 13, Slide 1 Chapter 13 From Randomness to Probability.
EXIT NEXT Click one of the buttons below or press the enter key BACKTOPICSProbability Mayeen Uddin Khandaker Mayeen Uddin Khandaker Ph.D. Student Ph.D.
Copyright © Ed2Net Learning Inc.1. 2 Warm Up Use the Counting principle to find the total number of outcomes in each situation 1. Choosing a car from.
The probability that it rains is 70% The probability that it does NOT rain is 30% Instinct tells us that for any event E, the probability that E happens.
Notes on PROBABILITY What is Probability? Probability is a number from 0 to 1 that tells you how likely something is to happen. Probability can be either.
S.CP.A.1 Probability Basics. Probability - The chance of an event occurring Experiment: Outcome: Sample Space: Event: The process of measuring or observing.
Probability Section 7.1.
Dependent and Independent Events. Events are said to be independent if the occurrence of one event has no effect on the occurrence of another. For example,
Quiz 10-1, Which of these are an example of a “descrete” set of data? 2.Make a “tree diagram” showing all the ways the letters ‘x’, ‘y’, and ‘z’
Warm-Up A woman and a man (unrelated) each have two children .
Copyright © 2010 Pearson Education, Inc. Chapter 14 From Randomness to Probability.
What is Probability?. The Mathematics of Chance How many possible outcomes are there with a single 6-sided die? What are your “chances” of rolling a 6?
7th Probability You can do this! .
Copyright © 2005 Pearson Education, Inc. Slide 7-1.
Copyright © Cengage Learning. All rights reserved. 8.6 Probability.
Expected Value.
Probability Section 7.1. What is probability? Probability discusses the likelihood or chance of something happening. For instance, -- the probability.
From Randomness to Probability Chapter 14. Dealing with Random Phenomena A random phenomenon is a situation in which we know what outcomes could happen,
Math I.  Probability is the chance that something will happen.  Probability is most often expressed as a fraction, a decimal, a percent, or can also.
Probability What’s the chance of that happening? MM1D2 a, b, c.
Probability. What is probability? Probability discusses the likelihood or chance of something happening. For instance, -- the probability of it raining.
Introduction to Probability – Experimental Probability.
Probability Bingo October 3, D Mathematics.
Introduction Remember that probability is a number from 0 to 1 inclusive or a percent from 0% to 100% inclusive that indicates how likely an event is to.
Algebra-2 Counting and Probability. Quiz 10-1, Which of these are an example of a “descrete” set of data? 2.Make a “tree diagram” showing all.
13-4 Probability of Compound Events. Probability of two independent events A and B. P(A and B)=P(A)*P(B) 1)Using a standard deck of playing cards, find.
Have you ever played a game where everyone should have an equal chance of winning, but one person seems to have all the luck? Did it make you wonder if.
Warm Up: Quick Write Which is more likely, flipping exactly 3 heads in 10 coin flips or flipping exactly 4 heads in 5 coin flips ?
Expected Value and Fair Game S-MD.6 (+) Use probabilities to make fair decisions (e.g., drawing by lots, using a random number generator). S-MD.7 (+) Analyze.
Chance We will base on the frequency theory to study chances (or probability).
Probability. Definitions Probability: The chance of an event occurring. Probability Experiments: A process that leads to well- defined results called.
PROBABILITY How to win at Monopoly. Flipping a Coin Will a flipped coin be HEADS or TAILS? Can’t know for sure! Is one more LIKELY?
Essential Ideas for The Nature of Probability
Adding Probabilities 12-5
Probability…What is it?
PROBABILITY Probability Concepts
What Is Probability?.
Probability ·  fraction that tells how likely something is to happen ·   the relative frequency that an event will occur.
PROBABILITY.
Probability of Independent Events
Probability.
PROBABILITY.
Introduction Remember that probability is a number from 0 to 1 inclusive or a percent from 0% to 100% inclusive that indicates how likely an event is to.
Chapter 3.1 Probability Students will learn several ways to model situations involving probability, such as tree diagrams and area models. They will.
Probability. ·. fraction that tells. how likely something. `
Probability Probability Principles of EngineeringTM
Mutually Exclusive Events
Presentation transcript:

Who is this guy?

Shawn Patton 2003 CMU ETC Grad 10 years at Schell Games (I apologize for my barebones slides, but focus on the learning, not the flair.)

Show of Hands Comfortable with probability? Comfortable with scripting? Comfortable with Excel?

Probability (Or, the chance something will happen.)

Like, the likelihood of getting hit by lightning? No, not quite, not today at least Specifically for game design Mathematics of probability invented as a result of game design 1654: Stemmed from questions the French Nobleman Antoine Gombauld, the Chevalier de Méré, posed to Pascal & Fermat Let’s play a game. Pair up! (3 dice per pair)

Split Into Pairs Partner A: Will roll 1 die 5 times: Trying for a 6 Partner B: Will roll 2 dice 5 times: Trying for a 7 Who will win?

Show of hands: Which Partner Will Win Partner A: Partner B: Both:

6 of Jesse Schell’s 10 Rules of Probability (reordered & renumbered by me) 1.Fractions are Decimals are Percents ½ = 0.5 = 50% Divide a fraction to get a decimal (Calculators are your friends) (turn your iPhone for scientific) Multiply a fraction by 100 to get percent (or just move the decimal to the right twice) But you may want to leave things as fractions, resist the urge to simplify

2. Zero to One 0 to 100%, that’s it! No -10% No 110% Good quick check for miscalculations

3. “Looked For” divided by “Possible Outcomes” equals Probability. Roll a 6 on a normal die? 1 of 6 outcomes 1/6 = = ~17% Probability of it: Number of ways *it* can happen / Total options

4. In certain cases, OR means add Got a this or that problem? If they are mutually exclusive*

Mutually Exclusive = Can’t happen at same time Turning left and turning right are Mutually Exclusive (you can't do both at the same time) Tossing a coin: Heads and Tails are Mutually Exclusive Cards: Kings and Aces are Mutually Exclusive Not Mutually Exclusive Turning left and scratching your head can happen at the same time Kings and Hearts, because you can have a King of Hearts!

4. In certain cases, OR means add Got a this or that problem? If they are mutually exclusive* Add the individual probabilities! Ex: Draw a face card or ace from deck? 12/52 + 4/52 = 16/52 = ~31% Probability of drawing Ace or Spade? (it’s a trap) 52/4 = aces = 17 / 52 right? Ace of Spades  16/52 P(A or B) = P(A) + P(B) - P(A and B)

5. In certain cases, AND means multiply Got an AND problem? If they are NOT mutually exclusive (independent events) Multiply the individual probabilities! Ex: Get two 6s rolling two dice: (a six AND a six) 1/6 * 1/6 = 1/36 = ~3% Ex: Get 5 heads out of 5 coin flips: (½)^5 = 0.03 = 3% Ex: Rolling a 2 and flipping a head: 1/6 * 1/2 = 1/12 = = 8.3%

6. One minus “Does” = “Doesn’t” P(not E) = 1 – P(E) Sometimes it’s easier to calculate chance of something not happening Probability of Not rolling a 6? 6/6 – 1/6 = 5/6 Not rolling a 6 AND not rolling a 6 AND … 5 times (5/6)^5 = – = = ~60%

Probabilities of our Game? Partner A: Will roll 1 die 5 times: Trying for a 6 ~60% Partner B: Will roll 2 dice 5 times: Trying for a 7

Probabilities of our Game? Partner B: Will roll 2 dice 5 times: Try for a 7 Not roll a 7? How many ways to roll a 7? 3? But either die could be either number 6 out of 36 (resist urge to simplify fraction) Not roll a 7 = 30/36 Not roll a 7 five times = (30/36)^5 = – = = ~60%

Probabilities of our Game? Partner A: Will roll 1 die 5 times: Trying for a 6 ~60% Partner B: Will roll 2 dice 5 times: Trying for a 7 ~60% They’re the same! Ha!

Expected Value What are outcomes worth in your game? The value of an action, positive or negative Rule: Land on a green space, roll a six sided die, get that much power: = 21 / 6 = 3.5 expected value

Expected Value Cont. Take probability of all outcomes one by one, multiply by their values to the game, add up all those numbers. That’s expected value of that action. Ex: Roll two dice: 11 = $5. 7 = $5. Anything else = -$1 OutcomeChance x OutcomeValue 112/36 x $5$ /36 x $5$0.83 Everything else28/36 x -$1-$0.78 Expected Value$0.33

Skill vs. Chance Skill (physical, mental, social) in games can improve over time Chance, or probability, remains constant It adds surprises which normally equals fun Treat it as a spice though, too much and you’ll over power your game to its detriment

Uses of Chance Movement Attack & Defense Weighted Chance could be your AI Higher chance of shot hitting you in FPS means players think your bots are smarter Loot Drops – Rarer things are more awesome! Remember - It’s the spice!

Emotion of Chance Pre Luck vs Post Luck Post Luck: Good roll? I’m awesome at this game! Bad roll? The game or fate is against you. Boo! Pre Luck: Good roll? Capitalize on it! I’m awesome at this game! Bad roll? Make the best of it. I’m smart!

Weighted Chance Formula D Dice Different gears = different dice d4 - 1st gear 1,1,2,2 d6 - 2nd gear 2,3,3,4,4,4 d8 - 3rd gear 4,5,6,6,7,7,8,8 d12 - 4th gear the numbers 7 through 12 twice d20 - 5th gear the numbers 11 through 20 twice d30 - 6th gear the numbers 21 through 30 three times

Don’t Underestimate the Fun!

Sneaky Chance: P-BOP Actions Probability - Based On Player Actions You can, under the hood, massage probability, but your players may notice and resent you.

Excel to get Number of Combinations What the what?!? Combination is the number of combinations for a given number of items. Factorial : 4! = 4x3x2x1 Number of combinations of getting k tails in n coin tosses Excel to the rescue: COMBIN(number,number_chosen) Number is the number of items. Number_chosen is the number of items in each combination. Ex: 3 tails out of four tosses? COMBIN(4,3) = 4 2^4 = 16 4/16 = ¼ = 25%

Monte Carlo Method Simulate it with computer! Or ask someone you know to simulate it : ) Python, php, c# are all good choices

Birthday Problem Look it up : )

Thanks for listening!