Skip to content

A Python library for running genetic algorithms to optimize Pokemon teams!

License

Notifications You must be signed in to change notification settings

alan-turing-institute/p2lab-pokemon

Repository files navigation

p2lab logo

GitHub Workflow Status

An interface for optimising Pokémon teams using genetic algorithms!

Installation

  • Clone required repos:
git clone [email protected]:alan-turing-institute/p2lab-pokemon.git
cd p2lab-pokemon
git submodule update --init --recursive
git clone [email protected]:smogon/pokemon-showdown.git
  • Install p2lab and poke-env:
cd poke-env
pip install -e .
cd ..
pip install -e .
cd pokemon-showdown
npm install  # -g flag sometimes solved problems on our machines
cd ..

Running

To run locally start the pokemon showdown server:

node pokemon-showdown start --no-security

In another terminal, from this project's root directory run:

p2lab <args>

Additional arguments for p2lab

usage: p2lab [-h] [--generations GENERATIONS]
             [--team-size TEAM_SIZE] [--teams TEAMS]
             [--seed SEED] [--unique UNIQUE]

options:
  -h, --help            show this help message and
                        exit
  --generations GENERATIONS
                        Number of generations to
                        iterate over
  --team-size TEAM_SIZE
                        Number of pokemon per team
                        (max 6)
  --teams TEAMS         Number of teams i.e.,
                        individuals per generation
  --seed SEED           Random seed to use
  --unique UNIQUE       Determines if a team can have
                        duplicate pokemon species

Docker:

Alternatively, using docker: docker build -t p2:latest . docker run -it p2:latest docker exec -it your_container_id /bin/bash

Run docker build with --no-cache to rebuild with newer versions of the repos.

Components used

Pokemon showdown engine:

smogon/pokemon-showdown

  • Has instructions on setting up our own server (needed to run battles!)
  • Also features command-line utilities for generating/validating new teams

Poke-env

About

A Python library for running genetic algorithms to optimize Pokemon teams!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published