这个模块允许一个人用筷子与另一个人或计算机打交道。

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 平台:未知

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
基于Java的遗传算法确定最优交易行为   java改型2.0无法解析Json嵌套对象   java在数组中查找最大额定值(数字),我们不能跳过数组中的一个或多个连续数字   java在spring boot中从命令行设置活动概要文件和配置位置   JavaAxis2:传输错误:404错误:未找到帮助理解其真正含义   java使用Play2WAR和Play2.2.1   java理解函数运算符:Lambda   在代理java后面读取https网页数据   java应用程序。Android单元测试中的类mock   java为什么onClick布局XML引用的方法需要是公共的?   从SMTLIB2文件解析的java显示声明   java重写给定的类以使用组合而不是继承   HTMLUnit和Java:NoSuchMethodException:createDefaultSSLContext()   java如何使用Spring和ThymeLeaf从前端正确更新后端中的对象?   来自init()Java的方法调用   使用cellrendering从数据库向JTable动态添加数据后,java无法使用JTable执行排序操作   java Android Studio 1.5.1。渲染错误(浮动操作按钮)   web服务如何使用UsenameToken和PasswordDigest为JAVA中的SOAP客户端附加wsse安全头   java为什么要在局部变量和myApplicationClass中同时删除“ArrayList.remove”?