2. Simulations
Game systems with random component are
complex
Simulations can help to understand how a part of
the system behaves
One does not need ready game for simulation
Does not replace playtesting
But simulation can show the features work in the long
run
Balancing weapons & troops
non-symmetrical things are hard to balance
Petri Lankoski
Södertörn Univeristy
3. Simulating a game system
Model
sum of two six sided dice -> sum of two random
numbers between 1 to 6
Weapon: change to hit, damage dealt & fire rate
Simulating system
Run model many times to learn how the system
behaves
Run 50000 times and calculate distribution or
averages, average damage per minute, etc.
Petri Lankoski
Södertörn Univeristy
5. Simulation
How the players gain resources
Simplified
Robber vs no robber discard
Only resource amount simulated, not types
Assumptions
Four player game
0-3 resources at hand when ones turn ends
Model for using resources
One specific board set-up
The results does not vary much board to board
The results can vary with not optimal settlement placements
50 000 iterations used
Petri Lankoski
Södertörn Univeristy
6. Simulation set-up
• 4 victory point set-up
• Settlements -> cities
• 6 victory point sim
• 1&2) 8 victory point sim
Petri Lankoski
Södertörn Univeristy
7. Model
#!/usr/bin/python
import random
from collections import Counter
# board model (2 victory points)
field1 = {
2: {'white': 0, 'blue':0, 'red': 0, 'orange': 0},
3: {'white': 0, 'blue':0, 'red': 1, 'orange': 1},
4: {'white': 1, 'blue':1, 'red': 0, 'orange': 0},
5: {'white': 0, 'blue':2, 'red': 1, 'orange': 0},
6: {'white': 1, 'blue':1, 'red': 1, 'orange': 1},
8: {'white': 1, 'blue':1, 'red': 1, 'orange': 1},
9: {'white': 1, 'blue':0, 'red': 0, 'orange': 1},
10: {'white': 1, 'blue':0, 'red': 1, 'orange': 1},
11: {'white': 0, 'blue':0, 'red': 1, 'orange': 1},
12: {'white': 0, 'blue':0, 'red': 0, 'orange': 0}
}
The above model does not contain handling for
robber
The code for simulating this model is bit more
complicated
Petri Lankoski
Södertörn Univeristy
11. What can one learn?
Easy to run what if scenarios
Robber -> discard all
Discard if more than four resources
Estimating the costs for building
Balance of the the initial set-up
Petri Lankoski
Södertörn Univeristy
13. Board & Movement
A player can
increase
probability to
land to
These squares
(out with doubles)
Chance to end
Up In a square
1/40 = 2,50%?
1/16 Card takes
to Jail
3 doubles
in a row
14. Chance to Land at a
Square
Petri Lankoski
Södertörn Univeristy
16. What we learned
Staying in prison strategy alters changes to land
other squares
Long prison stay good at the end game
Break even time downward trend is good
Breakeven times are long
Slow start
Note that one cannot build before owning all
squares with that color
Petri Lankoski
Södertörn Univeristy