Detecting X or O in a small image

I am making a robot that plays Tic Tac Toe

Currently, I have code that will parse the board and separate it into an array of 9 images, each space on the board. How can I detect if the image contains an X or and O? Also, I am running Mathematica 10

edit: This question is different from the proposed duplicate because the duplicate did not solve my problem and none of the solutions from it worked reliably with mathematica 10 for my purposes

Use the Classify[] function to train your own classification function (name it c) on a list of example photos of X's and O's (see reference pages on handwritten digits classification and the particular section in Classify)

Note that Classify is special algorithm that programs itself (it uses an artificial intelligence pattern recognition algorithm to "learn" which photo goes in which category). All you have to do is give it many different examples of X's and 0's and empty squares, point them to their "names" using -> and run it. You will need to make different images of the three categories X , 0 and emptySquare (perhaps 300 or so) to get Classify to generalise nicely and make a decent c function. (When I say "generalise" I mean "recognise the 3 patterns in new photographs".)

Here is my own attempt:

In this case (distinguishing x's from o's), it is also pretty easy to design your own classifier. Begin by binarizing, and then calculate the EulerNumber for each. The Eulernumber for x's will be zero, while the o's will have a component with Eulernumber 1 (The Euler number is the number of encircled regions). The erosion will help to make it a little more general, for instance, in case the circle isn't completely closed.

 ex1=Import["https://i.sstatic.net/4vK05.png"];
ex2=Import["https://i.sstatic.net/zzw53.png"];
ex3=Import["https://i.sstatic.net/28gkl.png"];
ex4=Import["https://i.sstatic.net/r8CJn.png"];
x = {ex1, ex2, ex3}


xb = Erosion[Binarize[#], 3] & /@ x;
ComponentMeasurements[#, "EulerNumber"] & /@ xb

{{1 -> 0}, {1 -> 0}, {1 -> 0, 2 -> 1}, {1 -> 0, 2 -> 1}}


training set

trainingSet = {
Import["https://i.sstatic.net/oJnVl.png"] -> x,
Import["https://i.sstatic.net/yrNij.png"] -> x,
Import["https://i.sstatic.net/pINOj.png"] -> x,
Import["https://i.sstatic.net/B1OUt.png"] -> x,
Import["https://i.sstatic.net/4g9x3.png"] -> x,
Import["https://i.sstatic.net/7rWxi.png"] -> x,
Import["https://i.sstatic.net/6yAA6.png"] -> x,
Import["https://i.sstatic.net/KNXYj.png"] -> x,
Import["https://i.sstatic.net/LF3aG.png"] -> x,
Import["https://i.sstatic.net/7HWtq.png"] -> x,
Import["https://i.sstatic.net/lxb1s.png"] -> x,

Import["https://i.sstatic.net/MHZS0.png"] -> blank,
Import["https://i.sstatic.net/poatG.png"] -> blank,
Import["https://i.sstatic.net/rPinx.png"] -> blank,
Import["https://i.sstatic.net/Dghwy.png"] -> blank,
Import["https://i.sstatic.net/k9Z2B.png"] -> blank,
Import["https://i.sstatic.net/aLTvV.png"] -> blank,
Import["https://i.sstatic.net/iAgyV.png"] -> blank,
Import["https://i.sstatic.net/ARq5z.png"] -> blank,
Import["https://i.sstatic.net/fzSjC.png"] -> blank,
Import["https://i.sstatic.net/sgcNF.png"] -> blank,

Import["https://i.sstatic.net/cvphN.png"] -> o,
Import["https://i.sstatic.net/hTdzn.png"] -> o,
Import["https://i.sstatic.net/fNcLf.png"] -> o,
Import["https://i.sstatic.net/4Vzwu.png"] -> o,
Import["https://i.sstatic.net/TKCpt.png"] -> o,
Import["https://i.sstatic.net/ETAot.png"] -> o,
Import["https://i.sstatic.net/7kWOR.png"] -> o,
Import["https://i.sstatic.net/O8AaU.png"] -> o,
Import["https://i.sstatic.net/ZvfQe.png"] -> o}


newlyTrainedClassifyingFunction = Classify[trainingSet, Method -> "NeuralNetwork"]


testSet = { (* new data from a tic tac toe game*)
Import["https://i.sstatic.net/5n92Y.png"],
Import["https://i.sstatic.net/2ieav.png"],
Import["https://i.sstatic.net/HGjpN.png"],
Import["https://i.sstatic.net/e8JRg.png"],
Import["https://i.sstatic.net/sBh59.png"],
Import["https://i.sstatic.net/JB9hM.png"],
Import["https://i.sstatic.net/8ewT3.png"],
Import["https://i.sstatic.net/4hz6m.png"],
Import["https://i.sstatic.net/Pfezq.png"]}


newlyTrainedClassifyingFunction[testSet]