Skip to content

Provide a training ground for RPG Game Masters by using LLMs as pseudo-players.

Notifications You must be signed in to change notification settings

maxwelljoslyn/gm-trainer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

Introduction

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.

Rationale

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!

How It Works

Assuming two LLM players, here's a summary of operation:

  1. The GM gives an initial scenario description.
  2. The scenario is sent to LLM player 1, who responds.
  3. The scenario and player 1's response are sent to player 2, allowing player 1 to react not only to the scenario, but also to what player 1 did.
  4. The GM explains how the players' actions changed the scenario. This explanation, along with both players' previous actions, forms the updated scenario.
  5. The whole process repeats from step 2.

Example prompts coming soon.

Screenshots

Web UI

screenshot

Command Line UI

cli-ui-screenshot

Installation and Setup

  1. Clone this repo.
  2. cd gm-trainer
  3. poetry install
  4. touch .env
  5. Edit .env to add an LLM provider key as an environment variable. Currently only Claude Opus is supported, using the variable GM_TRAINER_OPUS_API_KEY.

Usage

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.

About

Provide a training ground for RPG Game Masters by using LLMs as pseudo-players.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages