An open API service indexing awesome lists of open source software.

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.

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).