News for hackers. Stuff that matters.
Re:How random can you be? by empath75 on Friday March 08, 2019 @10:00AM (#19338017)
the guesser gets 14% right on that sequence, fwiw. And you can just keep repeating it indefinitely.
Re:How random can you be? by sebhtml on Friday March 08, 2019 @11:05AM (#19338728)
By using "1" for left (lastKey = 0) and "0" for right (lastKey = 1), I get 12%.

A de Bruijn sequence DB(2, k) is spelled by an Eulerian path in the corresponding de Bruijn graph, whose vertices are {0, 1}^k and where any arc (x, y) has the following property: x[2..k] == y[1..k-1].

Obviously, there are as many Eulerian paths as there are de Bruijn sequences.

Each such de Bruijn sequence has a different capability at getting a good score at the game "https://www.expunctis.com/2019/03/07/Not-so-random.html".

  diff --git a/not-so-random.html b/not-so-random.html
  index 48c04da..168a287 100644
  --- a/not-so-random.html
  +++ b/not-so-random.html
  @@ -169,8 +169,12 @@
         randomHelpFunc = function(evt) {
            evt.preventDefault();
            //document.onkeydown = null;
  -         for (let i = 0; i<10; i++) {
  -            lastKey = Math.round(Math.random());
  +
  +         // db(2, 6)
  +         var inputString = "0000001000011000101000111001001011001101001111010101110110111111";
  +
  +         for (let i = 0; i< inputString.length; i++) {
  +            lastKey = inputString[i] == "0" ? 1 : 0;
               testPrediction();
               updateAll();
               predictNext()
Re:How random can you be? by dcbadacd on Friday March 08, 2019 @01:46PM (#19340715)
How to find which sequence is the best?
Re:How random can you be? by w-m on Friday March 08, 2019 @10:20AM (#19338244)
Only if you map 0=right and 1=left.

Mapped the other way, 0=left and 1=right, the guesser gets it right ~43%.