Madivin: a Neural Network
Have you ever tried this 20Q device? I saw one in a store and tried it about 20 years ago. You think of a common everyday object, then it asks you 20 yes/no questions. At the end, it tries to guess your object. I thought I was too smart for it, but it guessed mine: a fart. I was impressed. A similar game can be played online with Akinator, who will guess whatever fictional character or celebrity you are thinking of. Akinator also guessed mine correctly on the first try: Shadout Mapes, from Dune. Maybe not so obscure, but I was still impressed. I’m sure there are others, if you look.
So how do they work? At first I thought it might be a simple binary listing... If you encode each yes/no as 1/0, then Mickey Mouse would be 101010111010001010 and Bottome would be 010101110100010101. After 20 questions, there are over a million distinct combinations of ones and zeroes, so wouldn’t every fictional character or object occupy one of those? Or, another way to think of it is that with every question you are cutting all the possible answers in half. One million can only be cut in half 19 times. However, this doesn’t work very well because the data becomes unruly, and many questions can’t be answered with a yes or a no. If you were thinking of Goofy, and the question was, “Is the character you are thinking of a dog?” Then binary doesn’t help, and that might destroy your whole chain of ones and zeroes. What happens when you want to add a new question? You need to figure out in advance what the answer is for every existing possible object/character you already know about. It is not capable of learning, all the knowledge has to be hard-coded.
Another fun part of a neural network over a binary tree is the nature of the questions. The questions you ask in a binary system are very straight-forward and robotic. “Does your character have two legs?” “Does your character have four legs?” etc. In a learning system, the questions are more natural, and can be objective. “Is your character attractive?” “Has your character betrayed someone who loved them?” etc.
While the people who make Akinator won’t tell their secrets, the 20Q gadget is known to be a neural network. The device itself doesn’t learn, it has a memory snapshot of a program that is capable of learning. It learned by playing and guessing many thousands of times. When it guessed wrong, the player could add a new object, and the program would record some indications that were helpful for itself to guess that correctly again.
I wanted to try this, so I’ve set up Madivin, a bot that guesses colors. It’s a limited set of data, and it is the simplest of neural networks. Please go and play it so that it can learn. There is a chart of how well Madivin is doing on the bottom half of that page (my first foray into d3.js!).
I think it needs some more questions that will help it make some more subtle differentiations. Do you have any ideas?
You can also check out my other machine learning project, the Fashion Model.