Giter VIP home page Giter VIP logo

aaronson-oracle's Introduction

aaronson-oracle

In a class I taught at Berkeley, I did an experiment where I wrote a simple little program that would let people type either “f” or “d” and would predict which key they were going to push next. It’s actually very easy to write a program that will make the right prediction about 70% of the time. Most people don’t really know how to type randomly. They’ll have too many alternations and so on. There will be all sorts of patterns, so you just have to build some sort of probabilistic model. Even a very crude one will do well. I couldn’t even beat my own program, knowing exactly how it worked. I challenged people to try this and the program was getting between 70% and 80% prediction rates. Then, we found one student that the program predicted exactly 50% of the time. We asked him what his secret was and he responded that he “just used his free will.”

- Scott Aaronson, Quantum Computing Since Democritus.

Can you use your "free will"? Try your hand.

how does it work?

I asked Scott if he remembered what he did, and he said,

As it happens, I do remember! All the basic program did was to examine all 32 possible 5-grams (sequences of five f's and d's), and see which 5-grams were more likely to be followed by f or by d in the user's previous keypresses, and then use that to generate a prediction based on the most recent 5-gram. There might have been various enhancements on top of that -- e.g., if you're not taking enough data for 5-grams to be useful, then you can also look at 4-grams and 3-grams, and you can also "seed" the predictor with 5-gram data from the previous users (hoping that the next user will be pretty similar).

This repo implements the no-enhancements version.

testimonials

OMG I'm a caged bird! A caged bird with clipped wings!!!!!

- My dad

this is art

- Noura Howell

Scott himself referenced this oracle at the end of his reply to Roger Penrose

verifying the trickery

No tricks up my sleeve, I tested it with a PRNG. And you can too - just clone this repository and

npm install; npm test

developing

npm install
npm run build

now open index.html

to build continuously (e.g. while editing

npm run watch

license

BSD

aaronson-oracle's People

Contributors

christianbundy avatar elsehow avatar

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

aaronson-oracle's Issues

Do have any acedemic summary?

The project has implications in terms of both psychological and commuter science research. I am wondering if you have made any latex summaries of the method you use to make predictions, and also if you have investigated more generally terminology regarding people's reaction to various results when told a computer predicts their actions.

Also just a small bug, there is no way that I guessed enough times for that trailing 1 to be meaningful. make sure you handle floating point error appropriately.

Interesting results...

Always guesses d first

Is it a problem or intentional that it always guesses d first regardless of the first five letters entered?
Also if you hold down f forever* it seems to only get to 99% accuracy but holding down d gets to 100%

*more than 201 guesses

Another 0% attack

Or maybe it's the same if you didn't deploy since 2016.

ff dd f dd f dd f d ff ddd f dd f dd f d f

and if you are lazy as I am:
sleep 4s; xdotool type 'ff dd f dd f dd f d ff ddd f dd f dd f d f' and focus your browser in 4 seconds afterwards.

Wait before calculating rolling average?

Should we make some "training set size," collecting a certain number of keypresses before we start displaying the Oracle's guesses, and calculating a rolling mean of its accuracy? The first 10 guesses, for example?

Deterministic 0%

Are there any plans to circumvent the 2^5 "attacks" such as ddddd ffffff d ffff dd fff d f d fff ddd ff, which always yield a 0% prediction rate? Or is this project specifically aimed at implementing a 5-gram prediction with no enhancements?

I've been having fun with this, thanks!

Pure JS implementation

I would like to port this to C. And then put it into Arduino board. Is it possible to provide pure JS implementation without using external libraries? Or a c/c++ implementation?

Make it mobile-ready

Currently you cannot use the demo on mobile devices. as you - well - have no keyboard there.

And even if you would make the software keyboard showing up, this is still very inconvenient.

bundle.js is not found

I downloaded, unzipped and ran the index.html file from the example directory, but it seems that it cannot find bundle.js.

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.