如何实现极小的井字游戏 [英] How to implement minimax in Tictactoe

查看:157
本文介绍了如何实现极小的井字游戏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看了这个答案,它只是困惑我:<一href="http://stackoverflow.com/questions/1869096/tictactoe-ai-making-incorrect-decisions#answer-1869226">TicTacToe AI做出错误的决定

I read this answer, and it just confused me: TicTacToe AI Making Incorrect Decisions

可能有人帮助我了解如何我可以申请这井字游戏?

Could somebody help me understand how I could apply this to Tictactoe?

  1. 我将如何的工作我的方式,通过树?
  2. 如何甚至创造招式一棵树?

注:我公司目前已存储的状态对游戏一局的类(例如是游戏完全与目前的移动?有没有赢家?等等)在目前的主板每次移动存储为1 - 9 (左上至右下的行)。我可以让目前的主板状态轻松的副本。我可以从一局返回当前移动的X和O,以及可移动的列表。

Note: I currently have a Board class which stores state about the game (e.g. Is the game complete with the current moves?, Is there a winner?, etc.) Each move on the current board is stored as 1 - 9 (top left to bottom right in rows). I can make copies of the current board state with ease. I can return a list of current moves for "X" and "O", as well as available moves from a Board.

推荐答案

解决井字棋:博弈树基本
类别:博弈论
发布日期:二〇〇八年七月三十〇日11:38,由Mark C.楚卡罗尔

Solving Tic-Tac-Toe: Game Tree Basics
Category: Game Theory
Posted on: July 30, 2008 11:38 AM, by Mark C. Chu-Carroll

图片pretty的多说,这一切,但这里是一个链接到博客文章: http://scienceblogs.com/goodmath/2008/ 07/30 /解决-井字游戏树-BA /

The picture pretty much says it all, but here is a link to the blog post: http://scienceblogs.com/goodmath/2008/07/30/solving-tictactoe-game-tree-ba/

这篇关于如何实现极小的井字游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆