Skip to content

frekkoz3/Dice-Probability-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎲 Dice Distribution Visualizer

An interactive Python GUI application to simulate dice rolls and visualize probability distributions, comparing empirical results with the exact theoretical distribution.

The project is designed to be:

  • simple
  • modular
  • extensible (2D now, 3D later)

✨ Features

  • 🎲 Define arbitrary dice sets (e.g. 2D6, 3D4 1D20)
  • πŸ” Roll dice interactively or run large Monte Carlo simulations
  • πŸ“Š Live histogram of simulated sums
  • πŸ“ˆ Exact theoretical distribution overlay (via convolution)

πŸ“Έ What you see

  • Bars: empirical distribution from simulations
  • Line: exact probability distribution
  • As simulations increase, the bars converge to the line (law of large numbers)

🧠 Architecture Overview

    DICE PROBABILITY VISUALIZER/
    β”‚
    β”œβ”€β”€ source/
        β”œβ”€β”€ dice_set.py   # Dice and DiceSet logic
        └── viz.py        # PyQt6 GUI
    β”œβ”€β”€ main.py           # Main file to run the application
    └── README.md

Core concepts

  • Dice: single die (e.g. D6, D20)

  • DiceSet: collection of dice with:

    • rolling
    • simulation
    • exact distribution computation

πŸš€ Installation

Requirements:

  • Python β‰₯ 3.9
    pip install numpy pyqt6 pyqtgraph

▢️ Running the app

    py main.py

About

Tool to visualize dices probability distribution

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages