- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 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
您可能关注的文档
最近下载
- 日语入门第一课(课件).ppt VIP
- 心内科进修汇报ppt.pptx
- 2014年10月自考《英语一》讲义-Unit-11-(含课文、生词表、课后练习及答案).doc VIP
- 7.2各民族谁也离不开谁教学设计.docx VIP
- 七年级生物上册 第二单元 第二章 第四节 单细胞生物教案课件 .ppt VIP
- 《条形统计图》教学设计.docx VIP
- 2014年10月自考《英语一》讲义-Unit-09-(含课文、生词表、课后练习及答案).doc VIP
- 部编版语文六年级上册夏天里的成长 第2课时-优课件.ppt VIP
- 浙江省台州市玉环市2023-2024学年六年级上学期期末科学试卷.docx VIP
- Python金融数据分析与应用课件 第5章 数据建模:有监督学习.pptx VIP
文档评论(0)