Hacker News new | ask | show | jobs
by florian_s 2656 days ago
I tried:

  let left = () => captureBtnLeftFunc($.Event())
  let right = () => captureBtnRightFunc($.Event())
  () => captureBtnRightFunc($.Event())
    setInterval(() => {
      console.log("Guessing");
      if (Math.random() < 0.5) {
          left()
      } else {
          right()
      }
  }, 1000)
2 comments

The third line is a mispaste btw. You can delete it. ;)

Running this myself, the guesser is correct 46% of the time after 100 iterations.

What was the result? 50%?
Yes, when running over many iterations