Coder Social home page Coder Social logo

deck-optimizer's Introduction

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.4
docker run -v /absolute/path/to/config/file:/config.yaml ghcr.io/hasoya/deck-optimizer:v0.0.4 -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%

deck-optimizer's People

Contributors

hasoya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.