Skip to content

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 git@github.com:alan-turing-institute/p2lab-pokemon.git
cd p2lab-pokemon
git submodule update --init --recursive
git clone git@github.com: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