HexCellEnt: A 2-D Random Walk Game
-
Upload
buddy-jones -
Category
Documents
-
view
224 -
download
1
description
Transcript of HexCellEnt: A 2-D Random Walk Game
HexCellEnt: A 2-D Random Walk Game
Game Basics: Place your marker in the center hexagon; roll a die; move one space in the direction indicated by the 6-point rose. Repeat.
Goal: Move your marker off the game board (minimum number is 4 rolls).
Questions: What is the probability of exiting the board in exactly 4 rolls? How could you calculate this probability?
Brute-force Method: A Tree Diagram
Result: 15 x 6 = 90 different 4-step escape paths,out of 64 = 1296 different possible 4-step paths…
P(out in 4 rolls) = 90/1296 ≈ 0.0694 {approx. 6.94% chance of exiting in 4 rolls}
That’s swell… but what about P(out in 5 rolls)… or P(out in “n” rolls)??
111
111
62
2 2
2
22
2
22
2
22 1
1
1
1
1
1
A Better way to Count Paths
After Roll #1 After Roll #2
1215
1515
15
15156
6
6
6
6
6
6
66
6
6 6
1
1
1
1 1
1
3
33 3
3
33
33
3 3
362
2 2
2
22
2
22
2
22 1
1
1
1
1
1
Can you describe the patterns?
After Roll #2 After Roll #3
After Roll #3 After Roll #4
90 paths escape in 4 rolls: P(escape in 4) = 90/1296 ≈ 0.0694
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 290
1
2
3
4
5
6
7
8
9
Probability Distribution
Exit in This Number of Rolls
% C
hanc
e of
Exi
ting
3-ring HexCellEnt board through 30 rolls; Ptot ≈ 95.0%
1 2 3 4 5 6 7 8 9 10111213141516171819202122232425262728290
2
4
6
8
10
12
14
Distribution After 100 Games
ExpectedActual
Out in This Many Rolls
Freq
uenc
y
1 2 3 4 5 6 7 8 9 10111213141516171819202122232425262728290
2
4
6
8
10
12
14
16
18
20
Distribution After 200 Games
ExpectedActual
Out in This Many Rolls
Freq
uenc
y
1 2 3 4 5 6 7 8 9 10111213141516171819202122232425262728290
5
10
15
20
25
30
35
Distribution After 300 Games
ExpectedActual
Out in This Many Rolls
Freq
uenc
y
Do you see where this is headed?
Although the outcome of each game is random…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 300
10
20
30
40
50
60
70
80
90
After 970 Games
Expected
Observed
Out in this many rolls
Freq
uenc
y
The histogram bars represent the playing of how many games?
“Occupation Numbers” RevisitedNote that after the 2nd roll there are 36 possible 2-step paths. The numbers in the figure show how many of these lead to each cell.
If you divide these numbers by “36”, you’ll get the fraction of 2-step paths leading to each cell. In fact, this is also the probability of reaching each cell in 2 rolls, assuming you play a very large number of games!
“Occupation Numbers” Revisited
Occupation numbers Occupation probabilities, OR…Relative Concentrations
HexCellEnt: It’s not just a game… it’s a simulation… of diffusion!
First task: Determine how far, on average, a particle travels per unit time (i.e. roll number).
Fraction that have gone 0 steps: (6/36) x 0 = 0Fraction that have gone 1 step: (12/36) x 1 = …Fraction that have gone 2 steps: (18/36) x 2 = …Now add the terms! This is a “weighted average”. Use slide #4 above to calculate the average distance traveled after roll #3.
A “Famous” Diffusion Law Result
0 2 4 6 8 10 12 14 16 180
1
2
3
4
5
f(x) = 0.968955765239785 x^0.500707088161058
17-Ring Hexagon Simulation Results
Number of Steps
Dist
ance
Tra
vele
d
The graph at right shows the results of the weighted averages you just calculated, but this time for a much larger game board.
The equation for the best-fit curve is consistent with a well-known result for a random walk – a power law relationship between distance traveled and number of steps taken. In words, you would say: “The distance traveled is proportional to the ______ of the number of steps.”
Advanced Concept: Difference in Concentrations
Here, we’re focusing on the border between the 1st and 2nd rings (boldface).
For every side along this border, calculate the difference of the two numbers across the border, add up the total of these, and then divide by 6n {where n = roll number}. Do this for roll numbers 2 – 5.
Advanced Concept: The Concept of FluxFlux is a “flow rate”: the rate at which something flows through an imaginary unit of surface area. Units: (# of particles/s)/cm2
Advanced Concept: Flow Rate across a Border
Outbound flux: Notice that all cells in ring #1 have three sides exiting to ring #2. For each cell:Fluxout = (2 * 3/6) ÷ 36
Inbound flux: Some cells have 1 side leading in and some have 2 sides. Total inbound flux is:Fluxin = [(1*6*1/6)+(2*6*2/6)] ÷ 36Do this for roll numbers 2 – 5.
Alternatively – for the Inquisitive Student
Slides 15-17 above showed some advanced concepts for students interested in pursuing these ideas. Hopefully you’ve discovered some patterns, so you might consider pursuing alternative activities on your own. I have created Excel files to study the following alternatives:• Larger hexagon boards – up to 17 concentric rings• Other plane tiling arrangements (e.g. a “great
rhombitrihexagonal” tiling: dodecagon, hexagon & square)• Soccer-ball-shaped HexCellEnt board• A 3-D space-filling shape – the truncated octahedron