GM Trainer offers RPG Game Masters (GMs) a situated learning environment for practicing spontaneous creativity.
It uses LLMs to simulate human players' responses to the GM's descriptive narration and each other's actions. This lets GMs exercise critical skills like improvising descriptions, decisively answering player questions, and giving logical game-world responses to player actions.
GM Trainer can be used as a CLI app or through a web interface.
At the intersection of RPGs and AI, most current work is focused on attempting to replace human GMs -- but a GM is responsible for real-time creation and evolution of an enormous, self-consistent game world, which AIs are nowhere close to achieving.
Being dissatisfied with what I saw in that space, I thought perhaps AI could simulate an RPG player sufficiently well to provide lifelike practice for GMs who want to work on their presentational skills. While there are still rough edges, I'm starting to be convinced that this interaction paradigm could have a real impact on how people learn to acquire the nuanced, many-faceted skill of GMing!
Assuming three LLM players, here's a summary of operation:
- The GM gives an initial scenario description.
- The scenario is sent to LLM player 1, who responds.
- The scenario and player 1's response are sent to player 2, allowing him to react to not only the scenario, but also what player 1 did.
- The scenario, player 1's response, and player 2's response are sent to player 3, allowing him to react to the scenario and both previous player inputs.
- The GM explains how the players' actions changed the scenario. This explanation, along with both players' previous actions, forms the updated scenario.
- The whole process repeats from step 2.
Example prompts coming soon.
- Clone this repo.
cd gm-trainer
poetry install
touch .env
- Edit
.env
to add an LLM provider key as an environment variable. Currently only Claude Opus is supported, using the variableGM_TRAINER_OPUS_API_KEY
.
poetry run python3 -m gm_trainer [OPTIONS]
--version
Show the version and exit.
-d,
--database-path TEXT
Path to SQLite database for storing session logs (default: './logs.db'). If no database exists at that path, one will be created.
-u
, --user-interface [cli|web]
Which user interface to use.
--port INTEGER
Port at which to serve the web UI. If the command-line UI is used, this argument is ignored.