Mindreader == What Is It? Mindreader is an implementation of probability matrices and Bayesian analysis, and a simple illustration of how this technology could be useful. Mindreader tracks the choices you make, in terms of subject matter (category) and individual topic (item). Then it evaluates what individual topic you are most likely to want to click in a particular category, and learns to recognize people by the topics they are interested in. == Getting Started To use this demo, create a DB, then run this rake task: rake db:auto:migrate Next simply enter Rails console and type: populate_mindreader_with_dummy_data As you can probably guess, this will populate Mindreader with dummy data. :-) Now start the Rails app and visit it in your Web browser. Choose some users to log in as, choose some topics to read about, and choose some individual subjects in those topics. This mimics the act of visiting a web site and clicking on particular articles or blog posts in particular sections of the site. == Choice Prediction And User Identification Mindreader develops simple probability maps for each user you log in as, such that after you've used it a few times, it will learn to predict your favorite individual subjects within any given category. Mindreader also learns to identify users from their choices. If you consistenly choose "Ruby 1.9" from "languages" as the user "andrea", you will be able to click "use site without logging in", and again choose "Ruby 1.9" from "languages", at which point Mindreader will determine that you are probably the user "andrea." Populating Mindreader with dummy data automatically includes a training phase. The dummy-data population script creates three users - andrea, andrew, and zelda - and each of these users expresses interest in every available topic a random number of times. This means you can see choice prediction and user identification working right away if you want to. == Development / Context I wrote Mindreader very quickly. I began the project on Feb 15th and did most of the work the weekend of the 15th to the 17th, and to a lesser extent the 18th and 19th. I didn't work on Mindreader the whole weekend - mostly just Saturday - and I caught a flu, so I spent most of the 19th sleeping. I only worked on it a little the 18th and 19th, because I had full 8-hour workdays those days. The point of Mindreader is not, "look, here's a Bayes library that does everything under the sun." The point of Mindreader is, "look, this stuff can be really, really easy, as long as you approach it from a YAGNI point of view." I'm thining about plugin-izing this, but really, it might be totally unnecessary. That's kind of the point. == If The App Is Called Mindreader, Why Is The Google Code Project Named After Rock/Paper/Scissors? This code is based on a Python program I wrote which learns to win games of Rock/Paper/Scissors. http://www.gilesgoatboy.org/python/rock_paper_scissors.html It was a toy app, not serious - there's no real pattern of behavior to learn from in R/P/S. But this Bayesian version I set against an even simpler version which simply chose the same thing every time, and the Bayesian version quickly learned to defeat that version. Anyway, the real answer is, I just chose the first thing I thought of. == Why Does The Background Graphic Look Kinda Fucked Up? Well, I kinda fucked it up a little.