https://github.com/anthonykrivonos/pokemon-ai
Pokémon battle simulator that uses the technique proposed in AlphaZero to beat the opponent.
https://github.com/anthonykrivonos/pokemon-ai
ai alpha-zero artificial-intelligence learning machine ml pokemon pokemon-ai reinforcement-learning
Last synced: 10 months ago
JSON representation
Pokémon battle simulator that uses the technique proposed in AlphaZero to beat the opponent.
- Host: GitHub
- URL: https://github.com/anthonykrivonos/pokemon-ai
- Owner: anthonykrivonos
- Created: 2020-06-14T03:13:41.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-07-25T02:18:12.000Z (almost 4 years ago)
- Last Synced: 2025-03-31T18:07:06.603Z (about 1 year ago)
- Topics: ai, alpha-zero, artificial-intelligence, learning, machine, ml, pokemon, pokemon-ai, reinforcement-learning
- Language: Python
- Homepage:
- Size: 171 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🔴 pokemon-ai
Pokémon battle simulator that uses reinforcement learning techniques to win against the opponent.
## Running
1. `git clone https://github.com/anthonykrivonos/pokemon-ai.git`
2. `cd pokemon-ai`
3. Create your virtual environment.
`python3 -m venv venv`
4. Activate it.
`source venv/bin/activate`
3. `pip install .`
4. Run two player tests with `make two-player` or run the sample model with `make sample-model`.
## Creating a New Model
1. Duplicate `/src/ai/models/sample_model.py` in the same directory and rename it to anything of your choosing.
2. Suppose you named it `my_model.py`. Add the following to `/src/ai/models/__init__.py`:
```
from .my_model import *
```
3. Code your model. Make sure only one of `attack`, `use_item`, or `switch_pokemon_at_idx` is called at the end of the turn.
4. Create a test file that mimics `/src/scripts/sample_model.py` and add it to the `Makefile`. 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())
```
## Resources
[1] Sutton et. al., *Reinforcement Learning: An Introduction*, [http://incompleteideas.net/book/RLbook2020trimmed.pdf](http://incompleteideas.net/book/RLbook2020trimmed.pdf).