点博弈和动态规划
我正在尝试用动态编程解决点游戏的变体。
常规的点游戏是用一排点来玩的。每个玩家在各自的线端获得一或两个点,没有留下任何点的人获胜。
在此版本的游戏中,每个点都有不同的值。每个玩家轮流轮流并在线的两端各取一个点。我想提出一种使用动态编程来找到第一个玩家保证获胜的最大金额的方法。
我在理解这个问题时遇到了问题,并试图为解决方案编写一个重现。任何帮助表示赞赏,谢谢!
I'm trying to solve a variant of the dot game with dynamic programming.
The regular dot game is played with a line of dots. Each player takes either one or two dots at their respective end of the line and the person who is left with no dots to take wins.
In this version of the game, each dot has a different value. Each player takes alternate turns and takes either dot at either end of the line. I want to come up with a way to use dynamic programming to find the max amount that the first player is guaranteed to win.
I'm having problems grasping my head around this and trying to write a recurrence for the solution. Any help is appreciated, thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这个网站:http://people.csail.mit.edu/ bdean/6.046/dp/,特别是问题 10:
如果我正确阅读您的帖子,这正是您想要的。解决方案非常简单,并且在我看来解释得很好。
Take a look at this site: http://people.csail.mit.edu/bdean/6.046/dp/, especially problem number 10:
It's exactly what you want if I'm reading your post right. The solution is pretty simple and it's explained very well there in my opinion.