+ 5
Board game algorithm
how can I make computer think and play in simple board game?
2 ответов
+ 6
If you want a simple case, try to reward and/or penalize for different choices or move settings. If you want a real AI mechanism, you most likely should employ machine learning algorithms tuned to the board game rules and run it a couple of hundred thousand times :)
+ 5
Well, I remember programming in high school and making a "checkers" game. I rewarded the computer opponent for taking out my checkers and penalized it for giving me a chance to take out its own checkers in my next move. Also, I rewarded it *big* for reaching my base which resulted in the AI getting the "superchecker".
Based on the potential points for every move, the computer made decisions which checker to move and what to do with it.
Of course, it was pretty predictable and prone to set-ups :) but still better than random, eh? ;)