SirBraneDamuj/easel — pull request #1 by jryancarr (2013-12-15 22:06:03+00:00)
Title: Added an AI.

I felt like learning some C#, so I put together an AI for this game. Just move any of the pieces and the AI will move one on the opposing team for you. Yes, that means you can cheat by moving one of its pieces for you, and it will move one of yours. But you might need to do that... I've played it a couple times and I can't beat it without cheating :-)

The AI stops working when it finds the game in a terminal state, meaning at least one player has either no legal moves or no non-black pieces.

You can dial the difficulty down (or up) by changing the depth parameter passed to the LookaheadStrategy constructor (depth needs to be >= 1; higher values will increase the AI's skill but will make it take exponentially longer to decide what to do) in BoardController:18. You can also change the heuristics it uses by modifying the LookaheadStrategy constructor. I've also included BrickStrategy, which makes random moves.