Author | Message |
---|---|
mkuko
Posts: 13
|
Posted 22:26 Sep 23, 2019 |
I have a working minimax player that tries to win in the longest game possible. When I play against it I see it passing up on easy wins and going for longer wins, even in situations where it might end in a tie, giving up the win. If I have it play against it's self the O player will always win. I believe this is because the O player is left with either winning or losing in the second to last move, and it will always choose to win. Is this behavior what we're looking to get from the minimax player, and if not what should we expect?
|
sdo8
Posts: 54
|
Posted 22:34 Sep 23, 2019 |
I think the minimax player going against itself will always result in a draw since they are both playing optimally (or perfectly). I had a situation where my player would go for long wins, but not attempt to block. (This was due to a bug in my code where I had an extra tab in the return value for max_value and min_value functions). I believe when we want the longest game possible, we just want a winning path with the longest depth (this would mean a longer game with the same outcome). I think if you add the additional depth to your winning value (like 100), then it will give you something a little larger and that will be the max instead |
rabbott
Posts: 1649
|
Posted 22:40 Sep 23, 2019 |
Ignoring the length of the game, minimax should return the move that achieves the best result for the given player. That's its fundamental job. Ir if doesn't do that, it's not doing its job. The length of the game is relevant only when two moves ensure the same win-lose-tie result but one ensures a longer game than the other. Last edited by rabbott at
22:40 Sep 23, 2019.
|