Git Product home page Git Product logo

Comments (2)

apoelstra avatar apoelstra commented on July 22, 2024

I think it's okay. Similar with using a deck of cards reduced to 32 elements, and drawing with replacement and shuffling in between.

But it's hard to recommend. It really depends on how well you're "thoroughly mixing" the marbles and personally I worry that humans would have some reliable bias when doing this. But I'm not aware of any studies and don't really know how to obtain the information that I'd need to make me comfortable with this.

See this Ars Technica article on dice though which is the kinda thing I'd like to see with marble-drawing.

Having said this, if I used this technique for my personal coins, I wouldn't lose any sleep over it. Some bias in key-generation is fine; what you need to worry about is entropy. And even if you're losing a whole bit of entropy with every draw, after 26 draws you'll have 104 bits rather than 130 bits. Which is more than enough. And losing a whole bit already seems implausible. It would mean like, half your alphabet was missing.

from codex32.

roconnor-blockstream avatar roconnor-blockstream commented on July 22, 2024

Certainly the idealization of drawing balls from a urn is the prototypical way of defining a uniform distribution.

Still balls in practice will not be equal weight/density, and there will be a tendency for some bias as the lighter ones to rise to the top of the urn and heaver ones to fall down. (And the marbles will slowly change over time as they rub against each other).

I think the quality of randomness isn't a good as debiased dice, but I would guess that it is acceptable (and much easier to produce). I would close and shake the jar rather than mixing by hand.

You could add multiple copies of characters to the jar which has some tradeoffs. Entropy would be slightly better, but at the cost of needed to count that there are exactly equal number of marbles beforehand, (something I suppose you will have to do even with one of each marble). Also you want to make sure there is plenty of room in the jar for shaking to be effective.

from codex32.

Related Issues (20)

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.