Download SIMULATIONS - Texas A&M University

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
SIMULATIONS
Simulations are used by
engineers, programmers,
and other scientists to
produce the probable
results of an experiment or
happening.
COMING EVENTS
SIMULATIONS IN GAMES.
SIMULATIONS OF EVENTS
OR FUTURE ACTIONS.
SETTING UP SIMPLE
SIMULATIONS
ADVANCED SIMULATION –
MONTE CARLO METHOD.
FOCUS AND INQUIRY
 WHAT IS YOUR FAVORITE VIDEO
OR COMPUTER GAME?
 WHAT DOES THIS “GAME” HAVE TO
KNOW TO PLAY?
 WHAT STATISTICS ARE USED?
MAJOR LEAGE BASEBALL
SAMMY SOSA EDITION
 WHAT ARE THE STATISTICS FOR
THE PITCHER: ERA, STRIKEOUT
RATE…
 WHAT ARE THE STATISTICS FOR
THE BATTER: BATTING AVERAGE,
HOW BATTER DOES AGAINST
CERTAIN PITCHER…
 IS THE BAT CORKED?
GAME SIMULATION
 THE COMPUTER TAKES ALL OF
THE INFORMATION (IN
STATISTICAL FORM AND
CALCULATES THE PROBABILITY
OF AN EVENT HAPPENING.
 THE COMPUTER WILL CHOOSE
WHAT WILL HAPPEN TO THE
PLAYERS BY PROBABILITY.
SIMPLE SIMULATION
SITUATION:
 THE LAKERS ARE ONE POINT
BEHIND.
 SHAQ IS FOULED WITH NO TIME
LEFT ON THE CLOCK (TWO FREE
THROWS)
 RUN 25 SIMULATIONS AND GIVE
RESULTS
POSSIBILITIES
 MAKES NO SHOTS—LOSES GAME
 MAKES ONE SHOT—TIES GAME
AND INTO OVERTIME
 MAKES TWO SHOTS—WINS GAME
STATISTICAL
INFORMATION
 SHAQ IS A 63% FREE THROW
SHOOTER
 NO OTHER STATISTIC IS NEEDED
AT THIS TIME.
SETTING UP A
SIMULATION ON THE
TI-83+
USING THE PROB/SIM
APPLICATION
1. CHOOSE RANDOM NUMBERS
2. DRAW TWO
3. RANGE: 0-99
4. REPEAT YES
5. SET #’S 0-62 AS A POINT. (63 #’s)
6. SET #’S 63-99 AS A MISS.
(37 #’s)
USING THE RANDOM
NUMBER FUNCTION
 FIND THE RANDOM INTEGER
FUNCTION: MATH-PRB #5
 randInt (min#, max#, amount generated)
 randInt (0, 99, 2)—(1, 100, 2) will also
work.
 SET UP PARAMETERS AS IN
PROB/SIM.
 KEEP PRESSING ENTER 25 TIMES
AND TALLY
TALLY TIME
AFTER YOU TALLY YOUR
SIMULATIONS:
HOW MANY WINS?
HOW MANY TIES?
HOW MANY LOSSES?
WHY HAVE SIMULATIONS
COST/DANGER
NOT MATHEMATICALLY
FEASIBLE
NOT PHYSICALLY
FEASIBLE
EXAMPLES
 BOMBING OF IRAN (IRAQ EARLIER)
 DAMAGE DUE TO A POSSIBLE
HURRICANE TO THE MIAMI AREA
 DAMAGE DUE TO A NUCLEAR
EXPLOSION ON NEW YORK CITY
 FINDING THE POSSIBLE PROFIT
WHEN A SALES CAMPAIGN IS
STARTED
GUIDED PRACTICE
BUILD SIMULATIONS FOR THE
FOLLOWING: RUN 25 SIMULATIONS FOR
EACH:
 THE WEATHERMAN STATES THERE IS A 65%
CHANCE OF RAIN NEXT FRIDAY—WILL IT RAIN
FOR THE JULY 4 PARADE.
 THE SCHOOL POPULATION IS AS FOLLOWS:
43% WHITE; 37% HISPANIC; 15% BLACK; AND
5% OTHER. A COMMITTEE IS BEING FORMED –
WHAT IS THE RACIAL COMPOSITION OF THE
COMMITTEE—IF 12 MEMBERS ARE CHOSEN.
AN ADVANCED
SIMULATION
MONTE CARLO
SIMULATION
FIND THE AREA OF THE
WATER
To further understand Monte Carlo
simulation, let us examine a simple
problem. Below is a rectangle for which
we know the length [10 units] and height
[4 units]. It is split into 2 sections which
are identified using different colors.
What is the area covered by the blue
color?
VIEW THE WAVES
color?
What Is The Area Covered By Blue?
CONT.
Due to the irregular way in which the rectangle
is split, this problem is not easily solved using
analytical methods. However, we can use
Monte Carlo simulation to easily find an
approximate answer. The procedure is as
follows:
1. randomly select a location within the rectangle
2. if it is within the blue area, record this instance a hit
3. generate a new location and repeat 10,000 times
CALCULATION
BLUE AREA= # HITS x 40 UNITS
10,000
THIS CAN ALSO BE USED IN MS
EXCEL USING CELLS AS POINTS OF
CHOOSING BY THE COMPUTER.
THERE ARE MANY DIFFERENT TYPES
OF SOFTWARE THAT CAN
CALCULATE THIS
MONTE CARLO PRACTICE
 DESCRIBE HOW A MONTE CARLO
SIMULATION WOULD WORK TO
DISCOVER THE PERCENTAGE OF
WATER ON THE EARTH’S SURFACE.
 USING 10,000 TRYS—HOW CAN YOU
FIND THE RACIAL PERCENTAGE OF
THE POPULATION OF NEW YORK
CITY.
HOW ABOUT 3-D
 THE SPREADSHEET, PAPER, AND
IDEAS WITH TWO VARIABLES ARE
TWO DIMINSIONAL.
 WHAT ABOUT A 3-D OBJECT?
 THREE VARIABLES?
 WHAT ABOUT VOLUME?
PROBLEM
 HOW TO YOU KEEP AN APPLE
FRESH ON THE SHELF OF A
GROCERY STORE.
 IF IT SITS TOO LONG IT BECOMES
SOFT AND MUSHY—NOT GOOD FOR
SALES.
 IRRADIATION WILL PRESERVE THE
APPLE FOR A LONGER SHELF LIFE.
APPLE IRRADIATION
MORE PROBLEMS
 APPLE IS NOT UNIFORM THOUGH
ITS SOLID STATE
 SKIN OR PEEL IS THICKER
 SEEDS
 CORE
 UNDER PEEL IS DIFFERENT
DENSITY THAN NEAR CORE
Computer Tomography (CT)
Slice thickness
1,3,5
mm
Cross-sectional
resolution
0.2 mm x 0.2 mm
CT number
Water
Air
=0
= -1000
A slice image of an apple
( 0.9 mm x 0.9 mm)
Tasks in Monte Carlo
Transport
Random Sampling
Particle
Generation
Geometry
Information
Particle
Streaming
Particle
Interaction
Physics
Particle
Collisions
Tallies
A SIMULATION JUST LIKE
THE SIMPLE ONE
 THIS SIMULATION IS RUN BY
EITHER PARALLEL COMPUTERS
OR A VERY POWERFUL ONE
 DATA IS GIVEN ON HOW IS THE
BEST WAY TO IRRADIATE THE
FRUIT
PRACTICE
1. DESCRIBE HOW THE MONTE
CARLO SIMULATION COULD BE
USED TO RADIATE CANCER
CELLS AND WHY?
2. DESCRIBE HOW THE MONTE
CARLO SIMULATION COULD BE
USED IN THREE OTHER
SITUATIONS AND EXPLAIN.
GOODBYE
THIS SIMULATED
CLASSROOM IS
NOW OVER!