This repo corresponds to a group project in a RL class at Ecole Polytechnique. It is depreciated.
The environment developed during this project gave birth to poke-env, an Open Source environment for RL Pokemons bots, which is currently being developed.
The goal of this project is to implement a pokemon battling bot powered by reinforcement learning.
Run
sh scripts/ubuntu-setup.sh
Run
sh scripts/macos-setup.sh
We recommend using a Windows Linux Subsystem.
You need to have a Pokemon Showdown server running on localhost (node pokemon-showdown in the Pokemon-Showdown folder). We recommend modifying it at bit to run things more quickly (try running sh scripts/update-showdown.sh ;) - this is actually automatically done during installation if you use our installation scripts).
To launch the current project, run python3 src/main.py. It will launch an agent using a pre-trained model. If you want to train your own agent, use python3 src/train_policy.py.
- Base
PlayerNetworkclass. Responsible for managing player network interaction (eg. send and receive messages to the server) with as many utilities as deemed useful - Base
Playerclass. Responsible for common player mecanisms. In particular, it can challenge and receive challenges. - Base
ModelManagerclass. Responsible for managing an agent using a keras neural network. - Base
ModelManagerTFclass. Responsible for managing an agent using a tensorflow neural network.
Other base classes exist, such as _MLRandomBattlePlayer, but they are not supposed to be used directly.
Battleclass. Stores information on a battle as it goes on.Pokemonclass. Stores information on pokemons during the battle.Moveclass. Stores information on moves.
This work is considered as good enough ; there is a lot of things to be done and extended, but the current focus of the project is on implementing a first working battling AI based on the current environment. In particular, please do not change the API or the dict returned by dic_state.
RandomRandomBattlePlayer. A player playing random battles in a random fashion.PolicyNetwork. An agent based on deep policy reinforcement learning in a pruned environment. It beats the random agent approximately on 90% of the battles.FullyConnectedRandomModel. An agent based on deep policy reinforcement learning in a full environment. It does not converge at the time.
We use Pokemon Showdown and our code was parially inspired by the showdown-battle-bot project.