GithubHelp home page GithubHelp logo

xori / gamblers-dice Goto Github PK

View Code? Open in Web Editor NEW
915.0 16.0 65.0 26 KB

A terrible idea, now real.

Home Page: https://xori.github.io/gamblers-dice

License: ISC License

JavaScript 61.19% HTML 38.81%
dice fallacy roll statistics gambler-fallacy terrible-idea

gamblers-dice's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gamblers-dice's Issues

Rolling a zero is possible

Math.random() could give 0 in which case steps is 0 and the subsequent loop would never run; therefore target would still be 0.

Changing the loop condition to steps >= 0 fixes this issue.

Make repeats less likely

I think it would be even better if rolling a 3 would make it less likely that the next roll would be a 3, and rolling two 3s would make it even less likely to roll a third, etc. This should still keep it uniformly random over time but would make it marginally funnier.

true uniformity

You could populate each side like a deck of cards...

1000 1's
1000 2's
1000 3's

Then, when people rolled, eventually they would reach true uniformity (in this example after 3000 rolls)

Maybe have this accessible by a different "engine" property, (or "algorithm", or "sampleType" or whatever you want to call it)

You could also pick the initial sample size (aka, reaches uniformity every 1000, or every 10, or every 100).

This would allow people to 'count cards' in a sense ( count die ).
Just an idea!

And, people would think "I haven't rolled 3 in a while", they'd be right to think that because there are a lot of 3's left in the "deck".

Ensure your entropy

Me? I am a data scientist for a company that makes slot machines. I know a thing or two about probabilities. I freaking love this. I can see a game being made using this. Not a gambling game, because it would never get past even the most easily bought off federal compliance officer in the land. However, regular games could benefit from this mechanism. A system where you luck is always turning on you...

Also, to ensure your odds, you need very high entropy. Sure, go ahead and use your mersene twister. Its the defacto default. However, if you ever go live with something that depends upon this for millions of game sessions (hey, think BIG), then use any one of several schemes to insure the entropy is excellent. Like sigma 15 excellent.

You can mark this closed. Its just a suggestion! Good work!

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.