<p>I think <a href="https://stackoverflow.com/users/68063/gareth-rees">Gareth</a>'s answer above is excellent but just to add (I don't have any reputation to add comments) that Dots and boxes has been shown (at least with a sketch) to be np-hard according to this:  <a href="http://arxiv.org/pdf/cs/0106019v2.pdf" rel="nofollow noreferrer">arxiv.org/pdf/cs/0106019v2.pdf</a></p>

<p>I wrote a javascript version of dots and boxes that tries to incorporate the strategies mentioned above <a href="http://dotsandboxes.org" rel="nofollow noreferrer">dotsandboxes.org</a>. It's not the best one available (doesn't yet incorporate all techniques that Gareth mentions) but the graphics are nice and it beats most humans and other implementations :) Feel free to have a look at the code and there are some other links to other people's version of the game you can train yours on.</p>
Dots and boxes solving algorithm
<p>I'm currently working on a "<a href="http://en.wikipedia.org/wiki/Dots_and_Boxes" rel="noreferrer">dots and boxes</a>" program where the input is automatically generated by a computer, and our output is what move we'll make.  I'll be competing against another player (their algorithm).</p>

<p>I'm representing the dots and boxes board as a matrix in Python.  Winning the game is top priority: algorithm efficiency is not that important.</p>

<p>Is there a best, not complex algorithm for automatically figuring out what move we should make, given a board?  </p>

<p>P.S. - You don't need to give me anything in code if you want...English algorithms are perfectly acceptable.</p>