Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

Latest commit

 

History

History
59 lines (37 loc) · 1.64 KB

README.md

File metadata and controls

59 lines (37 loc) · 1.64 KB

How To

A Quick Word

This project was created for the AI Developer Training at Alyra, to pass the certification.

What Is This?

This is an "Hearthstone Companion" AI Tool that will help you classify deck archetypes, depending on what cards are included in the given decklist.

Project Installation

Poetry will install everything needed:

$ poetry config virtualenvs.create true
$ poetry shell
$ poetry install

Initialize the Project

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!

Run the FastAPI backend

$ fastapi dev fastapi/app.py

(...or use the Dockerfile to create an image.)

Run the Streamlit App

$ streamlit run streamlit/app.py

Deck Archetype Predictions

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.

Screenshots

image