Unit Testing LEVEL GAME.  A student has pointed out that there’s a slight chance for our random tests to fail. RANDOMNESS probability our test will fail.

Slides:



Advertisements
Similar presentations
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Savage/Tyler, Kaplan/Gazes 2.P(flop a full house) 3.Bernoulli random.
Advertisements

Chapter 5 Discrete Probability Distributions. Probability Experiment A probability experiment is any activity that produces uncertain or “random” outcomes.
Games of probability What are my chances?. Roll a single die (6 faces). –What is the probability of each number showing on top? Activity 1: Simple probability:
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 12 Jim Martin.
Assignment Feedback. You need to be really clear about the difference between: an actor a use case what goes into a use case template.
Stat 217 – Day 27 Chi-square tests (Topic 25). The Plan Exam 2 returned at end of class today  Mean.80 (36/45)  Solutions with commentary online  Discuss.
Today Today: Finish Chapter 3, begin Chapter 4 Reading: –Have done –Please start reading Chapter 4 –Suggested problems: 3.24, 4.2, 4.8, 4.10, 4.33,
CHAPTER 17 Ted Shi, Kevin Yen Betters, 1st PROBABILITY MODELS.
Binomial Distributions. Binomial Experiments Have a fixed number of trials Each trial has tow possible outcomes The trials are independent The probability.
Game city International Starting on the road to programming. This project is all about learning how to program using scratch and other languages. The aim.
Powerpoint Viewer Demo If you’re seeing this, you’ve got the Powerpoint viewer installed correctly. To move to the next slide, click your left mouse button.
Kate Schwartz & Lexy Ellingwood CHAPTER 8 REVIEW: THE BINOMIAL AND GEOMETRIC DISTRIBUTIONS.
Bootstrapping (And other statistical trickery). Reminder Of What We Do In Statistics Null Hypothesis Statistical Test Logic – Assume that the “no effect”
Probability (Grade 12) Daljit Dhaliwal. Sticks and Stones game.
Chapter 6 Lesson 6.2 Probability 6.2: Definition of Probability.
4.5 Comparing Discrete Probability Distributions.
Slide 11-1 Copyright © 2004 Pearson Education, Inc.
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 10, Slide 1 Chapter 10 Understanding Randomness.
REVIEW. IS THE FOLLOWING A PROBABILITY DISTRIBUTION? XP(x)
1.3 Simulations and Experimental Probability (Textbook Section 4.1)
Expected Value. Expected Value - Definition The mean (average) of a random variable.
The Probability Game Week 6, Wednesday. Teams This game affects your Quiz 4 Grade First place:+4 points Second place: +3 points Third place: +2 points.
1.5 Independent and Dependent Events. Flipping a Coin.
World Religions Tabulate Game. wild cards wild cards ordinary cards.
Football – a game of chance How do managers choose which players they’ll buy for their teams? There are a mixture of factors they consider. For a striker.
1 Week of August 28, 2006 Refer to Chapter
Inequalities Symbols and line graphs. Symbols  < is less than  > is greater than  < is less than or equal to  > is greater than or equal to points.
 m C r =m!/r!(m-r)!  Property: m C r = m C (m-r)  Example: ◦ If you have 10 pens, all in different colors, and you want to bring two of them to class,
Remember Playing perfect black jack – the probability of winning a hand is.498 What is the probability that you will win 8 of the next 10 games of blackjack?
Sect Probability. Def: Probability is the measure of the chances of an event happening A desired outcome is called a success Any other outcome is.
Simulating Experiments Introduction to Random Variable.
12.1 – Probability Distributions
Introduction to Probability – Experimental Probability.
4.4 Hypergeometric Distribution
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Chapter 10 Understanding Randomness. Why Be Random? What is it about chance outcomes being random that makes random selection seem fair? Two things: –
Example 31: Solve the following game by equal gains method: Y I II I II I X II II
1 Chapter 11 Understanding Randomness. 2 Why Be Random? What is it about chance outcomes being random that makes random selection seem fair? Two things:
Press the Spacebar or Click on the Fortune Teller.
Solving equations with variable on both sides Part 1.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Expected value. 2.Heads up with AA. 3.Heads up with Gus vs.
The Binomial Distribution Section 8.1. Two outcomes of interest We use a coin toss to see which of the two football teams gets the choice of kicking off.
Copyright © 2009 Pearson Education, Inc. Chapter 11 Understanding Randomness.
Probability Distributions. Constructing a Probability Distribution Definition: Consists of the values a random variable can assume and the corresponding.
1 Copyright © 2014, 2012, 2009 Pearson Education, Inc. Chapter 9 Understanding Randomness.
Stats 8/26/13 1. Check homework C11 #2-9 Ch 11 Practice
Copyright © Cengage Learning. All rights reserved. 8 PROBABILITY DISTRIBUTIONS AND STATISTICS.
Probability and statistics - overview Introduction Basics of probability theory Events, probability, different types of probability Random variable, probability.
Unit Testing CLUE PLAYERS.  How much design do we do before we begin to code?  Waterfall: Design it all! (slight exaggeration… but not much)  Agile:
Introduction to probability (3) Definition: - The probability of an event A is the sum of the weights of all sample point in A therefore If A1,A2,…..,An.
Thomas Young Woodstock Academy Woodstock, CT Casino Projects A risky approach to teaching probability on.fb.me/1wZetto Click here for more.
CHAPTER 4 Designing Studies
CHAPTER 4 Designing Studies
Probability 5: Binomial Distribution
12.1 – Probability Distributions
Understanding Randomness
Birthday “Paradox” There are N people in a room.
CHAPTER 4 Designing Studies
Statistical Tests P Values.
CHAPTER 4 Designing Studies
Statistical Reasoning December 8, 2015 Chapter 6.2
CHAPTER 4 Designing Studies
CHAPTER 4 Designing Studies
Probability Chances Are… You can do it! Activity #2.
CHAPTER 4 Designing Studies
CHAPTER 4 Designing Studies
CHAPTER 4 Designing Studies
From Randomness to Probability
Elements of Chance Exemplar – Card Game.
CHAPTER 4 Designing Studies
Presentation transcript:

Unit Testing LEVEL GAME

 A student has pointed out that there’s a slight chance for our random tests to fail. RANDOMNESS probability our test will fail Where: i is the number of successes required to pass n is the total number of trials and p is the probability of occurrence For the example test, i=10 n=100 p=1/3 will fail with a probability of 5.28*10^-8 changing i to 1 probability is 1.25*10^-16

 Solution has public variables – why?  What are some pros/cons of approach? SOLUTION

 Yes, clicked is the location of the player making the suggestion. (it can't be the card the player clicks on... BoardCell is not a card). This will be needed to move the accused player to that location. It is not really needed for the main logic of handleSuggestion.  My calls to handleSuggestion look like: suggestion = new Solution("Miss Scarlet", "Dining Room", "Lead Pipe"); Assert.assertEquals(pipeCard, board.handleSuggestion(suggestion, mrsWhite, dummyCell)); OR assertNull(board.handleSuggestion(suggestion, mrGreen, dummyCell)); I create pipeCard in pipeCard = new Card("Lead Pipe", Card.CardType.WEAPON); My card class includes an equals method, so we don't have to worry about the card returned being the exact card in the player's hand... we just care that the name & type match. I "deal" cards by just assigning cards that I created to specific players, e.g.: mrsWhite.addCard(libraryCard); VALUE OF PIAZZA