A.I.对于类似3-5-8的牌局比赛(也称为军士长)

时间:2016-03-15 11:39:25

标签: artificial-intelligence game-engine expert-system

我必须实现类似于3-5-8的纸牌游戏,但我有选择A.I.的方法有问题。实现。可能是游戏A.I.用像OpenRules业务决策管理系统这样的包创建?我也看过Drools,但看起来太复杂了。

一般而言,专家系统是否适用于此类A.I.发展?

1 个答案:

答案 0 :(得分:1)

这取决于您的解决方案是使用启发式算法还是算法(或者可能是两者的组合)。例如,在国际象棋中,您可以完全了解游戏状态,并可以提前计划转弯,因此minimax算法可以让您找到最佳的"任何给定搜索深度的解决方案。启发式"足够好"解决方案可用于无法实现最佳解决方案或难以确定的最佳解决方案(因为游戏状态未完全知晓,存在机会,或者玩家选择的数量太大而无法考虑)。例如,您可以根据手中的牌和其他玩家手中显示的牌,轻松创建基本的启发式方法,以便在二十一点或扑克游戏中做什么。然后可以将这些简单的启发式扩展为包含额外的启发式算法。

这是一套简单的规则(即启发式),用于赢取纸牌游戏中的技巧:

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

这些规则/启发式方法比随机选择的牌更好,但由于他们不参与计划赢得下一个技巧,因此可以对其进行改进。