How git-disl/pokellmon works
Project type and purpose
• From the README and file tree, PokéLLMon is a Python-based AI agent and training platform that integrates with the Pokémon Showdown battle engine. It provides:
• A client to connect to a local Showdown server
• An environment simulator modeling Pokémon battles
• Multiple “player” policies (heuristic, GPT-based, LLM-based)
• Prompt construction modules to query OpenAI’s API
• Training pipelines (self-play, PPO finetuning, reward-model based)
• Data pipelines for static game data and preference datasets
File structure
• Top-level:
• src/client – connection code, client/server configuration
• src/environment – battle simulator classes (Battle, Pokémon, Moves, etc.)
• src/player – different agent implementations
• src/prompt – prompt templates and loader
• src/data – data normalization, static JSON assets (pokedex, moves, abilities, etc.)
• Training & orchestration scripts at root (train.py, self_play_llm.py, finetune_ppo.py)
• Config folder with YAMLs for modes (SFT, DPO) and model presets
• External deps: OpenAI API, Node.js/Showdown server
README for additional insights
• Architecture isn’t explicitly drawn, but the workflow is:
1. Launch local Showdown engine
2. Start Python “main.py” client
3. Use configured OpenAI key for LLM calls
4. Execute battles, self-play, or training