caymansimpson / EliteFurretAI

Attempt to create a superhuman bot to play VGC
MIT License
5 stars 3 forks source link

TeamRepo README #9

Closed caymansimpson closed 1 month ago

Varan commented 1 month ago

TeamRepo Module

This module provides functionality for reading and managing Pokémon teams in Showdown Export (PokePaste) format. It includes features for team validation and organization.

Features

Usage

Initializing TeamRepo

from team_repo import TeamRepo

repo = TeamRepo(
    filepath="path/to/team/directory",
    showdown_path="path/to/pokemon-showdown",
    validate=False,
    verbose=False
)

Parameters

Accessing Teams

# Get all formats
formats = repo.formats

# Get all teams for a specific format
gen8ou_teams = repo.get_all("vgc2023regd")

# Get a specific team
team = repo.get("vgc2023regd", "team_name")

# Get all teams for all formats
all_teams = repo.teams

Team Validation

If validate=True is set when initializing TeamRepo, it will attempt to validate each team using Pokémon Showdown. Make sure you have Pokémon Showdown and that showdown_path is correctly set for this feature to work.

File Structure

The module expects teams to be organized in the following directory structure:

data/teams/
    ├── vgc2023regd/
    │   ├── team1.txt
    │   └── team2.txt
    ├── vgc2024regg/
    │   ├── team3.txt
    │   └── team4.txt
    └── ...

Each .txt file should contain a single team in Showdown Export format.

Varan commented 1 month ago

I think this looks pretty good for the README, but wanted to run it past you first.

Also do we want it to be a separate file in /src/elitefurretai/utils, or should I put all of this in a separate section of UTILS.md? (I personally think the former would be cleaner)

caymansimpson commented 1 month ago

Yea this looks great! Could you add this to the UTILS.md? I agree that it would be more convenient to have them separately, but want to keep the directories clean