M2M Day 361: I made two weeks of progress in two hours

Max Deutsch
2 min readOct 27, 2017

--

This post is part of Month to Master, a 12-month accelerated learning project. For October, my goal is to defeat world champion Magnus Carlsen at a game of chess.

Yesterday, after a focused, 90-minute coding session, I was nearly able to get my program to read a CSV representation of a chess position, and then, use it to train a machine learning model.

Today, I was able to identify and fix the bug in yesterday’s code, letting me successfully run the program and train my model.

I then wrote some code that takes the parameters of the outputted model and writes them to a CSV file like this:

With this done, I’ve officially completed the full chess algorithm pipeline.

Here’s what the pipeline can do:

  1. Takes a chess game downloaded from the internet and converts it into a correctly formatted CSV. The CSV file contains the bitboard (i.e. 1’s and 0’s) representation of the chess position, and labels each chess position as either “good” or “bad”, using the Stockfish chess engine to compute all the evaluations.
  2. Reads the CSV file into a machine learning program, randomizes the order of the data, divides the data into a training dataset and a testing dataset, trains a machine learning model on the training dataset, and tests the model’s performance on the testing dataset.
  3. Once the model is tuned so that it can properly determine “good” and “bad” chess positions, it outputs the algorithmic parameters to another, properly-organized CSV file. Soon, I’ll use this file to memorize all of the algorithmic parameters, effectively transforming my brain into a chess computer.

Almost all of this code was written in the past two days (over the span of two hours), which is pretty amazing considering I’ve made very incremental progress for the past two weeks.

Clearly, a fully focused and committed approach goes a long way.

Read the next post. Read the previous post.

Max Deutsch is an obsessive learner, product builder, and guinea pig for Month to Master.

If you want to follow along with Max’s year-long accelerated learning project, make sure to follow this Medium account.

--

--