人工智能游戏开发.pptVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Connect Four using Alpha-Beta Pruning Billy Landowski CptS 540 7 December 2010 第一页,共十七页。 Overview Background Connect Four as a search problem Alpha-beta pruning Details about winning Heuristics Implementation / Demo Conclusion 第二页,共十七页。 Background Sold by Milton Bradley in February 1974 2 players Alternate turns Goal: Connect four tiles in a row horizontally, vertically, or diagonally 第三页,共十七页。 Connect Four as a Search Problem ≤7 possible moves per turn Enumerate each move Continue for each board configuration Player 1 Player 2 第四页,共十七页。 Connect Four as a Search Problem States: Any board configuration with at most one player’s tile in each location Initial State: An empty game board with no tiles. Actions: Place a tile of the current player’s color into any column that is not full. Transition Model: Returns a board configuration with a tile added to the specified column. Goal/Terminal Test: A player has four of her tiles in a line either horizontally, vertically, or diagonally, or the game board is full (indicating a tie). Utility: +∞ if player has connected four, 0 if board is full, –∞ if opponent has connected four. 第五页,共十七页。 Alpha-beta pruning O (bd/2) time complexity b = branching factor = 7 d = depth = 7 × 6 = 42 Computationally intensive Need cut-off depth Can also add heuristics 第六页,共十七页。 Winning Connect Four To win, player needs a “winning line” of 4 第七页,共十七页。 3-out-of-4 Heuristic To win, player needs a “near” winning line of 3 第八页,共十七页。 3-out-of-4 Heuristic (cont.) Count total 3-out-of-4 “unblocked” winning lines Compare to opponent Utility(p,G) = f(p,G) – f(opponent(p),G) f(a,G) = # of 3-out-of-4 winning lines for player a on board G 第九页,共十七页。 Scoreboard Heuristic Extend 3-out-of-4 heuristic to n-out-of-4 for n ≤ 3 Award weighted points based on the value of n Score(p,G) = 100(n3) + 10(n2) + 1(n1) ni is the number of i-out-of-4 winning lines for player p on game board G 第十页,共十七页。 Scoreboard Heuristic (cont.) Five 1-out-of-4 winning lines (n1 = 5) Five 2-ou

文档评论(0)

虾虾教育 + 关注
官方认证
文档贡献者

有问题请私信!谢谢啦 资料均为网络收集与整理,收费仅为整理费用,如有侵权,请私信,立马删除

版权声明书
用户编号:8012026075000021
认证主体重庆皮皮猪科技有限公司
IP属地重庆
统一社会信用代码/组织机构代码
91500113MA61PRPQ02

1亿VIP精品文档

相关文档