Playground for programs using Google OR-Tools. Python-focused for now.
pip install pipenv
pipenv install --dev
pipenv run pytest
Hearthstone is a popular online card game by Blizzard Entertainment with over 100 million players.
One of the key currencies of the game's economy is dust, which can be used for crafting collectible cards. One usually earns dust by playing the game and completing quests.
Other dust events include a semi-frequent event when cards are moved to Hall Of Fame (HoF). When that occurs, players get dust for what they already have in their card collection. Players can choose to craft from/invest in a variety of cards to earn extra dust.
This is a classic optimization/investment problem, with quite a number of interesting constraints. While there are some simple heuristics out there (such as craft the highest gold cards you can afford, they are sub-optimal, especially in cases with limited budget.
The goal here is to maximize investment (dust) returns.
See example.py
and tests. The current setup is based off the Year of the Dragon event, where a large number of cards are moving which makes the problem especially interesting.