Dark Mode

Tic Tac Toe Machine Learning Lab Kit

An Interactive Game in which you Train an AI to Play Tic Tac Toe


GitHub Repository

Background

As I was learning python, I made a very simple interactive tic tac toe game. I kept polishing it instead of progressing through the tutorial I was in. In pushing myself to add and debug features I found that I got to a point where I could teach myself by referencing Python's own documentation.

Simple version

This version will work on all platforms that run Python. When I got this version complete, I continued with other tutorials to learn about object oriented programming and other Python libraries.

Machine Learning Settings
Machine Learning Settings

The Project

I followed most of the next steps on my original version. As a Data Analyst, I wanted to build something that could generate records so I could work with the data. My idea was to build algorithms that could work with historical data that could improve their performance. The first version of data storage was in csv files. Once that was established and I built the algorithms for them to learn, I learned about SQLite databases and migrated the data storage system to use that. Working with SQL was very familiar and fun to me.

This program does not apply proper machine learning techniques. The "machine learning" is aggregating in raw SQL for each occurrence. They do in fact improve and figure out how to play. I had not looked into what real machine learning was until later.

What I Learned

Machine Learning Settings
Laboratory Results

Next Steps

Next steps for this project will be to integrate proper machine learning into the the AI profiles. Then add the rest of the menu elements.

As charming as the CLI is, I may decide to do this in JavaScript and HTML with the Math.js or TensorFlow libraries. The potential for this project is educational. It would be nice to share easily and be more interactive.