AgentGym provides environments to train LLM (Lange Language Model) based Agents.
![]() |
![]() |
|---|---|
| Pokemon-Red | Werewolf (social game) |
AI v.s. AI environment playing Werewolf Game.
Werewolf is a game where each player deceives the others while trying to hunt down the werewolf before the whole village becomes food for the beast.
It is also a reproduction of papers Language Agents with Reinforcement Learning for Strategic Play in the Werewolf Game and Exploring Large Language Models for Communication Games: An Empirical Study on Werewolf
Language-Vision Model (LVM like GPT-vision) plays Pokemon-Red (GameBoy Game)
We give the model some screenshots, and let it predicts which button to press next.
Build on its non-LVM traditional RL environment
Install the environment:
conda env create -f environment.yml
conda activate camelgym
Set the configuration
Create ~/config/config.yaml
Copy and paste the following in it:
llm:
api_type: "openai" # or azure / ollama / open_llm etc. Check LLMType for more options
model: "gpt-4-turbo-preview" # or gpt-3.5-turbo-1106 / gpt-4-1106-preview
base_url: "https://api.openai.com/v1" # or forward url / other llm url
api_key: "YOUR_API_KEY"Start the game:
python werewolf_game/start_game.py- Copy your legally obtained Pokemon Red ROM into the base directory. You can find this using google, it should be 1MB. Rename it to
PokemonRed.gbif it is not already. The sha1 sum should beea9bcae617fdf159b045185467ae58b2e4a48b9a, which you can verify by runningshasum PokemonRed.gb. - Move into the
baselines/directory:
cd baselines - Export your OpenAI API:
export OPENAI_API_KEY=<insert your OpenAI API key>
OPENAI_API_BASE_URL=<inert your OpenAI API BASE URL> #(Should you utilize an OpenAI proxy service, kindly specify this)- Run:
python ./pokemon/baselines/run_baseline_parallel_fast.py
- robotic simulator
- cell
- minecraft
- amongus
- trade
- town

