简体   繁体   English

在TicTacToe上使用minimax的游戏策略?

[英]Game strategy using minimax on TicTacToe?

Suppose there are 4 possible moves and all are guaranteed for player O to lose. 假设有4种可能的举动,并且保证所有这些都会使玩家O输掉。 There is no chance of drawing or a win. 没有机会赢得胜利。 X will eventually always win. X最终将永远赢。

So amongst those 4 moves, is it better to choose the move that would end the game for O quickly or later after few moves? 因此,在这4个举动中,是否最好选择在O以后迅速或稍后几步结束O的举动?

If I don't bother with coming up with a strategy and just select a move randomly then off course less memory will be used. 如果我不愿提出一个策略,只是随机选择一个举动,那么偏离路线将使用更少的内存。

Note: I am not always starting from a blank board and testing my solutions on random game states. 注意:我并非总是从空白的板开始,并在随机游戏状态下测试我的解决方案。 Also, both players are computer and thus playing a perfect game. 而且,两个玩家都是计算机,因此玩的是完美的游戏。

如果人类下注X,则最好选择几步之后在O结束后以O结束游戏的举动,以防人类玩家犯错。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM