2012 J Paul GibsonTSP: Mathematical FoundationsMAT7003/L6-XO-Answer.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson, A207.

Slides:



Advertisements
Similar presentations
Todd W. Neller Gettysburg College
Advertisements

Franklin Township Elementary School Career Day: Computer Science
Craps. /* * file : Craps.java * file : Craps.java * author: george j. grevera, ph.d. * author: george j. grevera, ph.d. * desc. : program to simulate.
2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.Computability- Answers.1 MAT 7003 : Mathematical Foundations (for Software Engineering)
TIC-TAC-TOE FELIX CHEN CLUSTER 5: Computers in Biophysics and Robotics.
CS 4700: Foundations of Artificial Intelligence Bart Selman Reinforcement Learning R&N – Chapter 21 Note: in the next two parts of RL, some of the figure/section.
PLANNING THE TIC TAC TOE GAME BY NEEL DAVE. TIC TAC TOE INSTRUCTIONS Tic Tac Toe Instructions The basic concept of Tic Tac Toe 1.This is a game for two.
Top-Down Design CSC 161: The Art of Programming Prof. Henry Kautz 9/16/2009.
For the ultimate in entertainment, play with 2 or more people, individually or as a team Players alternate turns Each player picks an “answer” and must.
Directed Investigation Dice Differences Your Name.
MATH CLASH Integer Addition Game 1. Player Rules Players must be paired with another person Cards must be evenly divided at the start of the round Players.
2010: J Paul GibsonTSP: Mathematical FoundationsMAT7003/Logic-SampleAnswers.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson,
BINGO! Topic Create Your Game Card You will need a blank piece of paper.
CS70 L23 Hashing (1)Dan Garcia © UCB Dan Garcia ( inst.eecs.berkeley.edu/~cs70/ 1 Handout: notes Computer Science.
The rules are just like the regular game of Tic-Tac-Toe. The class will be divided into TWO teams. One will be the X team, and one will be the O team.
True/False. False True Subject May Go Here True / False ? Type correct answer here. Type incorrect answer here.
Determine whether each curve below is the graph of a function of x. Select all answers that are graphs of functions of x:
2012 J Paul GibsonTSP: Mathematical FoundationsMAT7003/L6-ProbAndStat.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson, A207.
Choose level of difficulty
Math Race By Rob Humphrey for MAT 675 Assignment 2.1a National University Race Directions.
Check it out! : Simple Random Sampling. Players of a dice game roll five dice and earn points according to the combinations of numbers they roll.
Lucky Candies Probability Game By: Laura Santa Maria Isabella Moreno.
1 9/8/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
Minimax.
MATH 1107 Elementary Statistics Lecture 8 Random Variables.
Brute Force Average of 88 checks Worst possible algorithm if there is a ship in the bottom right cell Best search: 25.
Think About Ten 3-2 Carlos Suzy x
2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.ProofsWithRodin.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul.
Cookie Monster Game By Sailifale Tuiolosega and Johnny Mahu.
Practice with Rotations Tic-Tac-Toe Questions. Practice with Rotations Divide the class into two teams, named “X” and “O”. Draw a large tic-tac-toe grid.
Lesson 10.6a AIM: Variations on Linear Nim. DO NOW.
Functional Question Foundation (Statistics 4) For the week beginning ….
WOULD YOU PLAY THIS GAME? Roll a dice, and win $1000 dollars if you roll a 6.
Our project main purpose is to develop a tool for a combinatorial game researcher. Given a version of combinatorial puzzle game and few more parameters,
2012: J Paul GibsonTSP: Mathematical FoundationsMAT7003/Project.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson, A207
6.5 Find Expected Value MM1D2d: Use expected value to predict outcomes. Unit 4: The Chance of Winning!

Random Numbers Random numbers are extremely useful: especially for games, and also for calculating experimental probabilities. Formula for generating random.
A: A: double “4” A: “34” 4.
Jane wins $21 if a die roll shows a six, and she loses $2 otherwise
Multinomial Distribution World Premier League Soccer Game Outcomes.
- Saie Deshpande. Game Design Idea 1 Can be played by or.
Hypothesis Testing Steps for the Rejection Region Method State H 1 and State H 0 State the Test Statistic and its sampling distribution (normal or t) Determine.
A Group Communication Game Year 10 Psychology: Human Relationships.
Computer Programming 12 Lesson 6 – Loop structure By: Dan Lunney.
CS 121 – Intro to Programming:Java - Lecture 4 Announcements Course home page: Owl due soon; another.
What is in the Bank? Quarters, Dimes, Nickels, and Pennies.
YOU COMUTER WANT TO PLAY NOUGHTS AND CROSSES WELL NOW YOU CAN! JUST CLICK ON THE PLAY BUTTON BELOW AND YOU CAN BEGIN IF WINNER APPEARS BELOW CLICK ON IT.
Chapter # - Chapter Title
MAT 142 Lecture Video Series
CHAPTER 6 PROBABILITY & SIMULATION
Factors, multiple, primes: Factors from prime factors
Statistics 1: Elementary Statistics
Factors, multiple, primes: Prime factors
True or False: {image} is one-to-one function.
Decimals: Multiplying by 2.5
Work out (if you can, simplify your answer) 8 6.
Straight line graphs: Horizontal and vertical lines
Convert to scientific notation
Factor Game Sample Game.
Unit 10 Review Around the World.
Factors, multiple, primes: Multiples
Fractions: Simplifies to a unit fraction?
Straight line graphs: Horizontal and vertical lines
Homework Due Friday- Study Island-Maintenance Sheet 25
Standard form: In standard form?
True or False True or False
Coordinates: Naming 2D coordinates – quadrant 1
Jeopardy.
Agenda Warmup Lesson 1.9 (random #s, Boolean variables, etc)
Presentation transcript:

2012 J Paul GibsonTSP: Mathematical FoundationsMAT7003/L6-XO-Answer.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson, A207 XO Sample Answer

2012 J Paul GibsonTSP: Mathematical FoundationsMAT7003/L6-XO-Answer.2 TO DO - Probability and statistics for game analysis In a game of noughts and crosses. If 2 players play completely randomly (correctly following the rules of the game, but showing no other intelligence regarding where/how to play at each turn) then : What is the probability that the player who starts wins the game? What is probability that the player who goes second wins the game? What is probability that the game ends in a draw? Calculate the probabilities (+/- 0.1), and test your answer through a computer simulation

2012 J Paul GibsonTSP: Mathematical FoundationsMAT7003/L6-XO-Answer.3 Number of random games = Number of wins for X (starting)= Number of wins for O (second) = My results by Java simulation of random game 1 million times My results by Java simulation of all possible games: Number of games = Number of wins for X (starting)= Number of wins for O (second) = Wins after rounds = 5 : : : : : Prob(X wins) = Prob(O wins) = Prob(draw) = 0,127 NOTE: I did not simplify for symmetry

2012 J Paul GibsonTSP: Mathematical FoundationsMAT7003/L6-XO-Answer.4 do{ permutation =gameIterator.next(); XOBoard game = new XOBoard(); gameCount++; gameOver = false; game = new XOBoard(); int playCount =0; do { game.playX(permutation[playCount]+1); playCount++; if (game.checkFull() || game.checkWinX()) gameOver = true; if (!gameOver){ game.playO(permutation[playCount]+1); playCount++; if (game.checkFull() || game.checkWinO()) gameOver = true; } } while (!gameOver); if (game.checkWinX() ) {winXCount++; winCount[playCount]++;} if (game.checkWinO() ) {winOCount++; winCount[playCount]++;} gameOver = false; } while (gameIterator.hasNext() && !gameOver); Test_Complete_Play.java (main algorithm)

2012 J Paul GibsonTSP: Mathematical FoundationsMAT7003/L6-XO-Answer.5 int winXCount =0; int winOCount =0; int NUMBER_GAMES = ; boolean gameOver = false; XOBoard game = new XOBoard(); XORandomPlay rules = new XORandomPlay(); for (int gamecount =0; gamecount< NUMBER_GAMES; gamecount++){ gameOver = false; game = new XOBoard(); do { rules.apply(game, 'X'); if (game.checkFull() || game.checkWinX()) gameOver = true; if (!gameOver){ rules.apply(game, 'O'); if (game.checkFull() || game.checkWinO()) gameOver = true; } } while (!gameOver); if (game.checkWinX() ) winXCount++; if (game.checkWinO() ) winOCount++; } Test_Statistics_RandomPlay.java (main algorithm)

2012 J Paul GibsonTSP: Mathematical FoundationsMAT7003/L6-XO-Answer.6 Probabilistic Analysis Has Been Published Elsewhere: Scientific American, Mathematical Recreations, Tic-Tac-Toe (January 2002) Steve Schaefer How many Tic-Tac-Toe (noughts and crosses) games are possible? Henry Bottomley