博客搬家:最爱午后红茶
对应 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:

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:

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

被折叠的 条评论
为什么被折叠?



