Using Machine Learning to make the hardest possible Who's That Pokemon game! Try it out here: https://ewei068.github.io/pokequiz/
Changes to this app can be made in either the data used to generate quiz questions or the frontend website.
The frontend generates quiz questions by first accessing media for the type of quiz (ex: for sprites, accesses mystery_sprites
). Then, it loads a set of similarity scores between Pokemon for that type of quiz (ex: sprite_similarities.json
).
If you would like to modify this data, you must first cache the data from PokeAPI, then make modifications to the way the data is collected or manipulated.
Getting Started: Data Collection
Data collection is done in Jupyter Notebook using a virtual environment with Python 3.10.
- Navigate to
notebooks
. - Actviate the virtual environment:
source venv/bin/activate
. - Install dependencies:
pip install -r requirements.txt
. - Create an ipykernel:
python -m ipykernel install --user --name=pokequiz
. - Cache PokeAPI data: open a Jupyter Notebook and run all of
get_pokemon_data.ipynb
using thepokequiz
kernel.
Making Changes
- Make the changes you want and run them.
- If adding files that are to be served to the client, put those files in
data/client_data
. - For large files that don't need to be served to the client, add them to
.gitignore
. - Copy any newly changed or added files in
data/client_data
to their appropriate place inclient/public
. - If any
pip
dependencies were changed, runpip freeze > requirements.txt
.
The frontend website is built with Next.js, exported to a static website, and deployed to GitHub pages with GitHub Actions on the gh-pages
branch. To modify the frontend, make changes and verify the static website is exported successfully.
Getting Started
- Navigate to
client
. - Install dependencies:
npm install
. - Run local dev server:
npm run dev
.
Making Changes
- Make the changes you want, which should be reflected in your dev server.
- After satisfied, export the static website:
npm run build
andnpm run export
. - Deploy the static website:
- Install
http-server
:npm install -g http-server
. - Navigate to
client/out
. - Run
http-server
.
- Install
- Visit the link and that your changes were successful.
This project was inspired by Pokemon Cries.
- General Pokemon Data and Sprites: PokeAPI
- Pokemon Cry Audio: Pokemon Showdown
- Thumbnail Icon: Pokemon Icon by Mohit Gandhi