Git Product home page Git Product logo

Comments (2)

JustArchi avatar JustArchi commented on July 19, 2024

I think it might be connected with wrong range for some internal python randomizer, such as 0-3 range when it should be 0-2 only, and that wrong value overlapping last answer index, since it's always the last answer that is doubled.

This is only a wild guess though, maybe everything is OK, just RNG is pretty bad - that could be improved as well though if that's the case, since the difference is too big to claim it pseudo-random.

from program-y.

Thielak avatar Thielak commented on July 19, 2024

I ran the same test with different amounts of possible answers in <random> and got the same results, with the last one being twice as likely as the others.

2 options out of 1000 tries:

317     answer: "Answer 1"
683     answer: "Answer 2"

5 options out of 2000 tries:

340     answer: "Answer 1"
324     answer: "Answer 2"
302     answer: "Answer 3"
356     answer: "Answer 4"
678     answer: "Answer 5"

from program-y.

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.