The minimax algorithm is an algorithm that you can use for AI. The name stems from the idea that the computer tries to maximize its chances of winning while minimizing the chances of the user of winning.
Well, assuming that you already know the minimax algorithm and you have a fairly good understanding of JavaScript (which I don't, btw, so I don't pay too much attention to me ), you should be able to make the AI easily. I know that the basic ideas of an algorithm remain the same from language to language. An AI I designed in VB had the same algorithm as the one I designed in VC++. From what I know of JavaScript, you merely have to use more JS than HTML to make dynamic output for your AI.
Correct anything that I've said that is incredibly stupid, please.
you can check out a fine tutorial for minimax with alpha-beta pruning although written in Objective C but it might give you a hint about how to use it and implement it (pay more attention to the text rather than the code if you don't understand Objective C )
Comment