博弈(alpha-beta 剪枝)POJ —— 1085 Triangle War

博客文章介绍了如何使用Alpha-Beta剪枝算法解决POJ 1085 Triangle War游戏的博弈问题。游戏规则涉及两人轮流填线形成三角形,目标是赢得更多三角形。通过将棋盘状态编码为整数,实现了局面的高效存储,并应用博弈策略进行最优选择。文章提供了问题描述、输入输出格式以及解题思路。
摘要由CSDN通过智能技术生成

博客搬家:最爱午后红茶

对应 poj 题目:点击打开链接

Triangle War
Time Limit: 1000MS Memory Limit: 65536K
Total Submissions: 3066 Accepted: 1207

Description

Triangle War is a two-player game played on the following triangular grid: 


Two players, A and B, take turns filling in any dotted line connecting two dots, with A starting first. Once a line is filled, it cannot be filled again. If the line filled by a player completes one or more triangles, she owns the completed triangles and she is awarded another turn (i.e. the opponent skips a turn). The game ends after all dotted lines are filled in, and the player with the most triangles wins the game. The difference in the number of triangles owned by the two players is not important. 

For example, if A fills in the line between 2 and 5 in the partial game on the left below: 


Then, she o
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值