Closed sunjay closed 8 years ago
Fixed this in https://github.com/sunjay/reversi/commit/de7600b859bf760b7ae9ca789b8d6acd56fb95dc.
Oh my goodness the AI is ridiculously powerful now. It will force you to make the position it wants you to one move at a time.
Beaten badly:
Just before that defeat:
Beaten even worse (didn't even let me fill up the board before it took all my tiles):
Knew in advance that it had already beaten me:
Sure enough:
In playing the AI often, I discovered that the optimal strategy it was using was actually quite simple. The AI attempts to place pieces on the edges where they cannot be taken back. It does this intelligently though. The AI will only claim an edge or corner when it can take as many pieces as possible in that move. Those pieces, once taken, are very difficult to claim back.
Unfortunately, this strategy can also very easily be used against the AI. By making moves that force the AI to allow me to move on the edge, I can very easily beat the AI pretty much every single game. These are not close games either.
The AI needs to be given a better heuristic than just a plain difference of scores. It needs to understand that edges are more valuable than other tiles and corners are the most valuable of all.