Skip to main content

Yes Master

Goal

Yesmaster is a terminal mastermind game. It's possible to play normally or let's play the computer with algorithm :

  • random_idiot : totally random and idiot
  • random_no_repeat : random but never the same code twice
  • compatible : play random but take in consideration the verification and play only code compatible with it
  • compatible_8in2 : play the two first code with 8 colors and after that play compatible
  • compatible_4in1 : play like compatible but the first must be 4 differents colors
  • one_step_ahead : play the move that has the highest expected elimination

Installation

The program is available on Pypi. You need at least python 3.6 and you can use pipx to install it.

pipx install yesmaster

Usage

usage: yesmaster.py [-h] [--algo ALGO] [--loop LOOP] {play,auto}

positional arguments:{play,auto}  play yourself or let's computer playing

optional arguments:
  -h, --help   show this help message and exit
  --algo ALGO  Choose an algo present in the algo folder
  --loop LOOP  Number of games

Test your algorithm

You can add your personnal algorithm with a python file in the algo directory (the name of the python file will be the name of the algo to call in the command line). A template file shows you how your algo must be organized. Two functions are mandatory in a class name Algo :

  • get(self) : executed for choosing the code. Must return a 4 letters string with letters among ROGBYAPW
  • report(self, test, good, bad) : executed with 3 arguments (test : the code that you pushed with get, good : the number of goods colors at good place, bad : the number of goods colors at wrong place). Return nothing.

Metadata

Release files for yesmaster 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yesmaster 3.0.1
File Size Uploaded
yesmaster-3.0.1.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yesmaster 3.0.1
File Interpreter ABI Platform
yesmaster-3.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.9 kB

Release files / yesmaster-3.0.1.tar.gz

Download URL yesmaster-3.0.1.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
89bc4e29f0d1c585cf32b727a9fe77609fcc3339064fc24a23df673d76dd9b81
BLAKE2b-256 checksum
How to use checksums
1e8bd2a089f04704a2b133135ec9701524c09e51ed3185d080e7bae57f0b44cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.10.7 Linux/5.19.0-26-generic

Release files / yesmaster-3.0.1-py3-none-any.whl

Download URL yesmaster-3.0.1-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3784271328ba750564f3c9d03a2a8a93d41d307a38547de11c64e180e124285
BLAKE2b-256 checksum
How to use checksums
703a8f7c3cb1a7b0f7c98b50b0c90f970e087b1efadf2b729a17cb9ec5a346db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.10.7 Linux/5.19.0-26-generic

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files

3.0.0

2 release files

2.9.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page