这个模块允许一个人用筷子与另一个人或计算机打交道。
chopsticksc的Python项目详细描述
在游戏中,筷子的使用者和人类都是从一只手上各有一个手指开始的。
游戏的目标是将其他玩家的手减少到模数5的0,尽管游戏可以在不同的模数下进行。
有效的移动包括重新分配自己的手,以便保留手指总数。这叫做开关。
示例:1 1 1 1->;2 0 1 1
示例:3 1 1 1->;2 1 1
另一个有效的动作叫做命中。命中后,将一只手的值与对手手的值相加(模数5)。
示例:1 3 1 3->;1 3 2 3
示例:3 3 3 3->;3 3 1 3
计算机中已经有一个通过播放形成的查找表编码
对抗最初的随机对手并用遗传算法进化
祝你好运!
主页:https://github.com/AWestover/chopsticks 作者:Alek Westover 作者电子邮件:alek.westover@gmail.com 许可证:未知 描述:这个模块允许一个人用筷子和另一个人或计算机打交道。
In the game chopsticks both the user and the human start out with 1 finger on each hand.
The goal of the game is to reduce the other players hand to a 0 in modulus 5, although the game can be played in different moduli.
Valid moves include redistributing your own hands so that you preserve the total number of fingers. This is called a switch.
ex: 1 1 1 1 -> 2 0 1 1
ex: 3 1 1 1 -> 2 2 1 1
Another valid move is called a hit. With a hit you add the value of one of your hands to the value of the opponents hands (modulus 5).
ex: 1 3 1 3 -> 1 3 2 3
ex: 3 3 3 3 -> 3 3 1 3
The computer has a lookup table already coded in that was formed by playing
against initially random opponents and evolving with a genetic algorithm.
Good Luck!
关键词:筷子游戏AI 平台:未知