This project was created for the AI Developer Training at Alyra, to pass the certification.
This is an "Hearthstone Companion" AI Tool that will help you classify deck archetypes, depending on what cards are included in the given decklist.
Poetry will install everything needed:
$ poetry config virtualenvs.create true
$ poetry shell
$ poetry install
Execute the following Jupyter Notebooks:
- analysis.ipynb
- extract_card_names.ipynb
The analysis exports a CSV file containing all Priest decks (only the most popular Priest class decks, to reduce the scope).
The extraction of card names is used in the Streamlit app to display all available card names in the selectbox input.
Next, train your model:
- train_logistic_regression.ipynb
A logistic regression model has been chosen for the Machine Learning component, but you can use any other model in the notebooks by tweaking the Streamlit app and changing the path to the model used.
You are now ready to launch FastAPI and the Streamlit app!
$ fastapi dev fastapi/app.py
(...or use the Dockerfile to create an image.)
$ streamlit run streamlit/app.py
Select any card and ask the model to predict the deck archetype.
At least 5 cards are required to make a prediction.
Don't know anything about Hearthstone but want to try the app? Some example decklists are available in the DECK_EXAMPLE.md
file.