Skip to content

gkarthik/SimulateBoardGame

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

================ SimulateBoardGame

Biased vs UnBiased dice in a board game.

The idea was to see if there was a difference in the distribution of the number of times a player lands on a particular position of a board while using a biased and an unbiased die. The code generates plots with the x axis as positions on a board and the y axis as the number of times the player lands on it.

Functions

  • simulateGame(no, dist): Simulates a board game with 40 possible places for a player to land at in 1 round. The simulation runs for n rounds.
  • runSimulation(no): Runs no games and generates a plot of the number of times a player lands in a position.
  • roll(dist): simulates a dice roll. Can be a biased or unbiased die based on dist array provided.

Plots for 1000 simulations of a player playing 1000 games with 100 rounds per game - https://plus.google.com/photos/+KarthikG92/albums/6086582387871890641

About

Simulation of a board game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages