Skip to content

rac7hel/planning-stories-neurally

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

planning-stories-neurally

Integrates GPT prompting into the Sabre Narrative Planner for research and experimentation involving LLM-guided search methodologies for planning-based story generation.

Purpose

Assign action costs based on what GPT says should happen next in the story.

LLM-guided search process

Installation

To run, you must have a valid OpenAI API key stored in an environment variable called OPENAI_KEY.

Requires Java. Uses Sabre v0.7.

Usage

Run Sabre with -m llm for the LLM-UCS search method. To run the example problem:

java -jar lib/sabre.jar -p problems/gramma.txt -atl 5 -ctl 4 -el 1 -g 1 -m llm

This searches the gramma problem with LLM-UCS, limited to 5 nodes by default. (Configurations in LLMSearch.java)

Writes two output files:

  • out/search.txt lists each node in the order visited
  • out/transcript.txt shows the full conversation with GPT and resulting action costs at each step.

Paper

Large Language Models as Narrative Planning Search Guides

R. Farrell and S. G. Ware, "Large Language Models as Narrative Planning Search Guides," in IEEE Transactions on Games, vol. 17, no. 2, pp. 419-428, June 2025, doi: 10.1109/TG.2024.3487416. 

Results

Search results for the Sabre benchmark problems are discussed in the paper, and complete transcripts from these searches are included here.

About

Use GPT as a heuristic for narrative planning with Sabre

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages