/dice-roll-distribution

A script which adds the result of dice rolls and plots the distribution curve

Primary LanguageJupyter Notebook

Dice Roll Distrubution

Overview

A Jupyter Notebook that randomly generates values for die_count dice with die_sides amount of sides iterations times and finds the sum. The distribution is then plotted with a bar chart using Matplotlib


Examples

2 6-sixed dice, 100000 times     3 5-sixed dice, 50000 times     4 4-sixed dice, 20000 times

Options

  • Number of dice - die_count
  • Sides on each dice - die_sides
  • Number of trials - iterations

Todo

  • Make graph height adapt to largest value rather than iterations/(die_sides/die_count*1.5)
  • Adjust graph and bar width for larger die_count and die_sides values
  • Make y-axis percentages

Acknoledgements

Created by Nasser Kessas

Contributing

PRs accepted, feel free to dive in! Open an issue or submit PRs.

Dice Roll Distribution follows the Contributor Covenant Code of Conduct.