TomBolton.io

Tom Bolton’s AI and Machine Learning Lab Notebook.

Machine Learning

Yesterday, I put some of the plumbing in place to eventually run a checkers game for one or two AIs. Specifically, the board is represented, the fundamentals of pieces are represented, and the system has a way, for any given piece, to see which moves are legal and illegal given the board state. So far so good.

I’m implementing this in an object oriented fashion. At least partly. The board is an object with a matrix representing the state. And the pieces are objects representing their location, whether their a king or not, etc. What I’m missing is an explicit connection between the pieces and the board. They’re completely independent, meaning that I could set up the board in the starting state (which I do) with no pieces actually created. And what pieces I do create have no impact on what the board state is. At first, I was thinking I didn’t want to go too crazy with the OO setup, thinking that it was unnecessary infrastructure to support what the real work is here: implementing the NN. Also I was worried about the added processing and memory burden of having to maintain that structure. But my experience setting up the board and testing piece locations to see whether the system returns the correct matrix for legal moves has led me to realize that if I don’t build a system that integrates the state of the pieces with the state of the board, it’s going to be a bit of a mess to keep that stuff organized and updated. So I’m going to integrate them.

Tagged:

LEAVE A RESPONSE

You Might Also Like