@loki1205
Posted
Hi, this is a great project, I tried playing with computer and the computer knows where exactly to block the move. How does it know that? What logiv are you using for computer?
@loki1205 Hello, I'm using something called the minimax algorithm. It compares a lot of moves in a tree structure and finds the best outcome based on some rules!
In this small game, I programmed my CPU player to prioritize blocking over winning. The CPU gains 2 points for blocking instead of 1 for winning. Therefore, it will always try to block the opponent. Furthermore the CPU player knows the maximum score is infinity and minimum is -infinity and will always try to reach the best score!
@loki1205
Posted
@alex931d wow. I would try that too π