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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file chopsticksc-1.0.5.tar.gz
.
File metadata
- Download URL: chopsticksc-1.0.5.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0fad88ea42c950728eca6146754c3002732d6b08e5d42d19109a81fa9fd60a5 |
|
MD5 | 5ec78e90773675a5edcf509e394e8f76 |
|
BLAKE2b-256 | 48a1a69a05686e94cf715b3a6907411f9fdc84ec3d02b9c7e294859515d9866e |
File details
Details for the file chopsticksc-1.0.5-py2.py3-none-any.whl
.
File metadata
- Download URL: chopsticksc-1.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffe313f9659a766d89443ffbba4bec86c13b0d95499fa3eebf05346cb68ac5b5 |
|
MD5 | 4d03331cb20fd4650122033cf2cc58e0 |
|
BLAKE2b-256 | 8c5d39c2c99bce90afb74d86e2c12548655ec683a62e34f341cc582f97c45294 |