i am working on a two player board game in html5/JavaScript. the two player version is almost complete. i want to add single player mode, where computer would be opponent. this game will be played in single browser (no server side integration).
i am new to AI. i want some guidelines on AI implementation in JavaScript games, where should i begin?
please help.
Edited: The game is Bagh-Chal
Thanks for the answers: I've managed to implement Minimax on the baghchal game. Here.
For Bagh-Chal you might want to take the Minimax approach with Alpha-beta pruning.
There are a lot of good resources on the algorithm, but here is a CS Recitation for Minimax with Alpha-beta Pruning. I, personally, wouldn't call this an AI algorithm, but it is often discussed in introductions to AI.
Alternately, you can train up an actual AI algorithm to play the game (neural net, genetic algorithm, etc.), but this approach seems to be somewhat unpractical for a game like Bagh-Chal.