Skip to content

Instantly share code, notes, and snippets.

View starbaser's full-sized avatar
🍄

starbased starbaser

🍄
View GitHub Profile
@starbaser
starbaser / state-json-schema.md
Last active January 2, 2026 21:22
IGameContext State JSON Schema

IGameContext State JSON Schema Reference

This document defines the JSON state structure returned by IGameContext.getStateJson(). The state is phase-aware: the top-level phase field determines which phase-specific object is present.

Top-Level Structure

{
  "phase": "COMBAT_PLAYER_TURN",
 "run": { ... },

What Are Effect Tokens Actually?

Every state-modifying operation in STS flows through the same system:

 [Card/Potion/Relic/Event]
             │
             ▼
       use() or onX()
 │
@starbaser
starbaser / obs_reference.md
Last active January 1, 2026 21:20
STS Observation Space

Observation Space

Total: ~8,300 floats

  • *: denotes an intentional additional feature (i.e. ratios for semantic meaning)

Scalar Fields (8)

Field Description
@starbaser
starbaser / methodology.md
Last active December 31, 2025 00:35
Delta-Based Effect Embeddings for Slay the Spire

Delta-Based Effect Embeddings for Slay the Spire

s@starbased.net

Abstract

This work proposes a methodology for learning game dynamics in Slay the Spire, a roguelike deckbuilder video game where previous AI attempts have been stymied by combinatorial complexity: over 1000 distinct game effects, context-dependent card synergies, and decision horizons spanning 1000+ actions per run. Existing approaches have plateaued. Monte Carlo Tree Search methods (STS Lightspeed, Bottled AI) achieve only 30-52% win rates despite 600K+ playouts per decision, while reinforcement learning struggles with credit assignment across such long horizons. Sparse terminal rewards provide insufficient signal, and dense reward shaping introduces catastrophic reward hacking. Rather than fighting this complexity through search or end-to-end learning, this work takes a different approach: crystallizing the game state perfectly, maintaining exact numerical access to every variable including RNG, and learning the structure of the st

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
.ansi2html-content {
display: inline;
white-space: pre-wrap;
word-wrap: break-word;