A Statistic gathering random answer generator

I found a competition one day on Google for a minimalist code to solve simple problems. They had various incomprehensible code segments in JavaScript and c code showing previous entries on problems in a minimal amount of code. One of them was a simple answer generator 'Yes' or 'No' based on JavaScript's random utility, it was a very simple page with some icons that moved in a simulated race then produced an answer.

It wasn't groundbreaking but it caught my imagination as it was a short race with sprites supposed to give an equally weighted answer to any question asked.

For some reason when I tested it, it had a weird frequency of answers, no's far more often then yes's. It had an animated character and two straight line race tracks that the characters ran down until the end. The winner would be a 'Yes' or 'No' depending on who gets to the finish first.

Since it had peaked my curiosity, I decided to try my hand at building something similar. I ended up getting 10-15 animated GIF's to race each other on a similar but slightly more graphical race track. I started running trials and getting mostly equal results. Unfortunately, my memory was insufficient to recall them all and I had been recently working with the pChart graphing library for a Server uptime chart on another site.

I thought it would be helpful to combine the graphs with the answers generated from the system and see over the long term how the odds balanced out.

The site has been live since 2012-05-08, though I doubt many know of it, unfortunately. Hopefully, creating this article might help address that shortcoming. Feel free to take a look and let it control your life. It has so far made me go out many times when otherwise I would have piked and recently made me go swimming on a freezing cold night in Canberra. You can visit the page at;

https://lazinator.com/DecisionMaker.

After each race the results are saved to the database and a new set of charts is created. These new charts are then live updated on the page.

The site creates a cookie on the users computer when accessed that saves the current selection of graphs. This is merely so on each subsequent visit the same graphs will be preselected depending on your personal preferences.

Feel free to spam the hell out of it ;)

 

Posted by:

Share:

This page has been visited 898 times!

comments powered by Disqus