Lately I've been studying Machine Learning from various sources on the web, including the great lecture series by Andrew Ng at Stanford (videos, course website). Why? It's really cool and people are doing amazing things with it these days (Exhibit A). On top of that it should provides some useful tools to have in my toolbox as an astrophysicist.
So far I've been surprised to learn that I am already pretty well versed in many of the underlying methods of machine learning (the course has mainly involved a bunch of model fitting using Maximum Likelihood estimation to this point and I happen to know a little something about that), although I expect that once we get to the topics of "unsupervised learning" and neural networks I will start swimming in uncharted waters. Regardless, the course already has me thinking about data in different ways and considering a variety of new and interesting applications like robotics, speech-recognition, machine vision, etc.
As I go along I want to have a simple project that I can use to play around with because it's hard to truly learn something without getting some hands-on experience. Taking inspiration from Arthur Samuel's checkers-playing program (thought to be the first self-learning program), why not write an algorithm that would learn how to play a game? I could work with with checkers of course, but I don't have a checkers program lying around and am not keen on writing one. Connect Four (aka Four-In-A-Row) on the other hand is a rather simple game but should still have enough complexity to give me something to work on. OK then, Connect Four it is.
In just a few hours this past weekend I managed to build a "sandbox" for machine learning in the form of a Python based Connect Four application. On top of defining the game rules, I've also developed a database for storing information about board configurations. This is all a work in progress. I haven't come up with a satisfying solution for teaching the software how to play the game yet, but with this foundation in place I can finally start tinkering around.
In the next post, I'll describe the Connect Four software that I've written including the features designed to help write ML code. Future posts will follow my progress in developing an ML algorithm that will learn how to play the game.
Until then, I've put the project up on GitHub, so feel free to check out the code as I go along.
https://github.com/mrbell/connectfour
No comments:
Post a Comment