Coder Social home page Coder Social logo

dice-stats's Introduction

Dice Probability Distribution Software

This software generate probability distribution for a given dice throw.

Dice Logo

Download

System 32-bit 64-bit
Windows dice-stats-windows-386.tar.gz dice-stats-windows-amd64.tar.gz
Linux dice-stats-linux-386.tar.gz dice-stats-linux-amd64.tar.gz
OSX dice-stats-darwin-386.tar.gz dice-stats-darwin-amd64.tar.gz

Throw query format

{n}d{m}(k{p}) where:

  • n: number of dice to throw
  • m: number of faces of each dice
  • p: number of best dice results to keep

Examples: 2d6, 3d10, 7d6k3.

Prompt use

> Throw query:

Requires a string that must follow the Throw query format.

> Versus throw query (leave empty to ignore)

Can be a string that must follow the Throw query format or be empty in order to skip.
If provided, it will generate win probabilities for first throw quiery against this one.

Command use

The only argument required is a string query following the Throw query format.

Command Option

Iterations

  • Syntax: -i
  • Type: int
  • Default: 1000000
  • Example: > ./dice-stats -i=10000 2d6

Number of iterations to use in order to define probabilities accuracy.

Versus

  • Syntax: -vs
  • Type: string using throw query format
  • Default: none
  • Example: > ./dice-stats -vs=3d6 2d6

Use another dice throw and compare chances to win against this one.

Example

Generate probability distribution for throwing 2 dice with 6 faces:

> ./dice-stats 2d6

Output: 2d6 Generate probability distribution for throwing 3 dice with 10 faces:

> ./dice-stats 3d10

Output: 3d10 Generate probability distribution for throwing 7 dice with 6 faces and keeping the 3 best results:

> ./dice-stats 7d6k3

Output: 7d6k3 Generate probability distribution of winning throwing 7 dice with 6 faces and keeping the 3 best results against 5 dice with 6 faces and keeping the 3 best:

> ./dice-stats -vs=5d6k3 7d6k3

Output: -vs=5d6k3 7d6k3 Generate probability distribution of winning throwing 17 dice with 4 faces and keeping the 9 best results against 25 dice with 4 faces and keeping the 6 best:

> ./dice-stats -vs=25d4k6 17d4k9

Output: -vs=25d4k6 17d4k9

dice-stats's People

Contributors

kmecnin avatar

Stargazers

Roberto Casotto avatar Samantha Mazzei avatar Stéphane Sabalot avatar Arnaud Le Blanc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.