Inspiration

This was originally taken from Stanford's 2007 Nifty Assignments for my AP CS class. I chose to program and improve MindReader because I was very curious about artificial intelligence and machine learning.

What it does

MindReader is able to "read" the mind of the users and play a variety of games with them, such as chess and checkers. Over time, it will improve its win rate drastically due to its machine learning capabilities.

How I built it

First, I created a hashtable to store the user's guessing patterns. The key of the hashtable is a sequence of the last four guesses made by the user. The value assigned to the key is the number of times the user picked either heads or tails given a particular pattern of the last four guesses. Eventually, the program will be able to predict what the user is likely to pick next and increase its win rate significantly. Then, I built a java applet for the user to see his or her score along with the computer's score, as well as displaying the computer's prediction in comparison to the user's choice.

Challenges I ran into

At first, I found it hard to store data from the games the computer played. I soon figured out that using a hashtable was the most efficient way to store the data and resolved the issue.

Accomplishments that I'm proud of

After submitting the initial MindReader, I went on to include different games so that users could have a variety of games to choose from.

What I learned

From this project, I learned more about machine learning and artificial intelligence which sparked my interest to delve deeper into these two topics.

What's next for Mind Reader

In the future, I hope to extend its capabilities to include more complex games such as Connect4, Chess, and maybe even Go.

Built With

Share this project:

Updates