Skip to main content

deck-optimizer is a Python module to support TCG deck building.

Project description

deck-optimizer

PyPI version Python Versions Docker Publish pytest Upload Python Package Code Quality Coverage

deck-optimizer is a Python module to support TCG deck building especially Yu-Gi-Oh!. This module suggest the best combination of cards under given conditions.

Dependency

Use Docker or see requirements.txt.

Usage

Make config yaml file to describe the ideal hand. For example, if you want to draw at least one PSY-Framegear Gamma and keep PSY-Frame Driver in deck, your config file will be written as below.

num_hand: 5
num_deck:
  min: 40
  max: 60
condition:
  - name: Gamma
    min: 2
    max: 3
    require: 1
    exact: False
    in_hand: True
  - name: Driver
    min: 1
    max: 1
    require: 1
    exact: True
    in_hand: False

Then, run the app by following command.

docker pull ghcr.io/hasoya/deck-optimizer:v0.0.1
docker run -v /absolute/path/to/config/file:/config.yaml ghcr.io/hasoya/deck-optimizer:v0.0.1 -f /config.yaml

You will get the suggestion of deck composition and the probability of the ideal hand.

The best deck
  Total Num Deck: 40 Num Gamma in deck: 3 Num Driver in deck: 1
The probability of the ideal hand
  30.21%

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

dkopt-0.0.4-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file dkopt-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: dkopt-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for dkopt-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1603bf85156435f02635294d23bffa9f88df6e70ac1805c089478f9ef0b0b8a1
MD5 4ca85dc64465c168123670a22a9f88a2
BLAKE2b-256 9b98660a0bd1c46dede480daf1d488f63e346b9089926640555c79307129474d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page