我必须实现类似于3-5-8的纸牌游戏,但我在选择正确的A.I.实现方式上有问题。是否有可能使用像OpenRules业务决策管理系统这样的包来创建游戏人工智能?我也看过流口水,但似乎太复杂了。
一般来说,专家系统是否适合这种人工智能的发展?
发布于 2016-03-16 19:14:56
这取决于您的解决方案是采用启发式方法还是采用算法(或者可能是两者的结合)。例如,在国际象棋中,您对游戏状态有完整的了解,并且可以预先计划轮转,因此极小极大算法允许您为任何给定的搜索深度找到“最优”解。在不可能或很难确定最优解的情况下,可以使用启发式“足够好”的解决方案(因为游戏状态不完全已知,涉及到机会,或者玩家选择的数量太大,无法考虑)。例如,您可以根据手中的牌和在其他玩家手中显示的牌,轻松地创建在21点或扑克游戏中应该做什么的基本启发式方法。然后,这些简单的启发式方法可以扩展为包括其他启发式算法。
下面是一组简单的规则(即启发式规则),用于在纸牌游戏中赢得一个技巧:
Rule FirstPlayHighTrump
When
You're playing the first card and
You have trump cards
Then
Play the highest trump card in your hand
Rule FirstPlayHighCard
When
You're playing the first card and
You don't have trump cards
Then
Play the highest card in your hand
Rule PlayHighCard
When
You're not playing the first or last card and
You have a card to win the trick
Then
Play the highest card in your hand that will win the trick
Rule PlayLowCard
When
You don't have a card to win the trick
Then
Play the lowest card in your hand
Rule LastPlayLowestCardToWin
When
You're playing the last card and
You have a card to win the trick
Then
Play the lowest card in your hand that will win the trick
这些规则/启发法比随机挑选牌更好,但由于它们不涉及计划赢得下一个技巧,所以它们可以改进。
https://stackoverflow.com/questions/36010292
复制相似问题