Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

This module allows a human to play chopsticks against either another human or a computer.

Project Description

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!

Home-page: https://github.com/AWestover/chopsticks Author: Alek Westover Author-email: alek.westover@gmail.com License: UNKNOWN Description: This module allows a human to play chopsticks against either another human or a computer.

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!

Keywords: chopsticks game AI Platform: UNKNOWN

Release History

Release History

This version
History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
chopsticksc-1.0.5-py2.py3-none-any.whl (6.0 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Dec 29, 2017
chopsticksc-1.0.5.tar.gz (6.5 kB) Copy SHA256 Checksum SHA256 Source Dec 29, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting