Pokémon battle simulator that uses reinforcement learning techniques to win against the opponent.
git clone https://github.com/anthonykrivonos/pokemon-ai.git
cd pokemon-ai
- Create your virtual environment.
python3 -m venv venv
- Activate it.
source venv/bin/activate
pip install .
- Run two player tests with
make two-player
or run the sample model withmake sample-model
.
- Duplicate
/src/ai/models/sample_model.py
in the same directory and rename it to anything of your choosing. - Suppose you named it
my_model.py
. Add the following to/src/ai/models/__init__.py
:from .my_model import *
- Code your model. Make sure only one of
attack
,use_item
, orswitch_pokemon_at_idx
is called at the end of the turn. - Create a test file that mimics
/src/scripts/sample_model.py
and add it to theMakefile
. Ensure one or both of the players you are testing on has your model as its fourth argument. For example:my_player = Player("Jane Doe", my_party, my_bag, MyModel())
[1] Sutton et. al., Reinforcement Learning: An Introduction, http://incompleteideas.net/book/RLbook2020trimmed.pdf.