Posted 15 January 2013 - 07:14 PM
Having an `undo move' doesn't mean that you do the thinking on the same board structure that you use to represent the position to display to the user, and I actually don't recommend you do it that way: Whatever representation is convenient for displaying might not be optimal for the AI, so I would allow them to be different.
The best architecture I know for this problem is what chess programs have settled for after many years: The GUI and the AI (a.k.a., the "engine") run on separate processes, which communicate via a simple text-based protocol. This allows interoperability between GUIs and engines, so people can pick whatever combination suits them. It also makes debugging much easier, and you can easily run automated matches between engines by using a program that pretends to be the GUI, as far as the engines are concerned. Check out the Universal Chess Interface specification, to get a feel for what the protocol looks like (there is a competing protocol to use with XBoard, but I really don't like it).
Even if you don't go all the way to separating the AI into its own process, you should clearly specify what the interface to the AI is, and have the AI have its own copy of the board.
I should mention that besides minimax and its variations, there is another major class of algorithms that can be used for board games, generically known as Monte Carlo Tree Search. MCTS has been developed in the last decade and is currently the best approach to computer go and to several other games (I believe it's particularly well suited to connectivity games like hex).
One thing that makes MCTS very interesting to me is that it works well with a much larger class of games than minimax: It can take multiple players, games with randomness and games with simultaneous decisions with no problem, while these things are pretty much show stoppers for minimax. Dealing with hidden information is trickier, but even that can be accommodated.
I have heard of Hive, although I have never played it. So I don't know if MCTS is appropriate for this game or not.