Skip to content

wuhao21/sts2-cli-agent

Repository files navigation

sts2-cli-agent

An AI agent that plays Slay the Spire 2 via the sts2-cli headless engine.

Setup

  1. Clone and set up sts2-cli first
  2. Clone this repo as a sibling directory (or set STS2_CLI_DIR):
    cd ~/Workspace
    git clone https://github.com/wuhao21/sts2-cli-agent.git
    export STS2_CLI_DIR=~/Workspace/sts2-cli  # optional if sibling

Usage

HTTP Bridge

The bridge wraps the headless game engine as a local HTTP server:

python3 sts2_bridge.py 9876              # start on port 9876
python3 sts2_bridge.py 9876 --compact    # strip descriptions (saves tokens)

curl -s localhost:9876 -d '{"cmd":"start_run","character":"Ironclad","seed":"abc"}'
curl -s localhost:9876 -d '{"cmd":"action","action":"play_card","args":{"card_index":0,"target_index":0}}'

Claude Code Agent

Use the /play slash command in Claude Code to have the LLM play a full game:

/play Ironclad
/play Silent

Files

File Description
sts2_bridge.py HTTP bridge to headless game engine
auto_play.py Heuristic auto player
combat_helper.py Combat decision helper
validate_learning.py Learning file validator
bug.md Known simulator bugs
learning/ Per-character strategy notes (EN/CN)

Configuration

Set STS2_CLI_DIR to point to your sts2-cli checkout. Defaults to ../sts2-cli/.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages