Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
61024cf
Implement Agent API for RL integration
JackSwitzer Feb 4, 2026
073d4a5
Fix Sacred Bark potion doubling - correct relic name and test imports
JackSwitzer Feb 4, 2026
acec475
Implement InnerPeace if_calm_draw_else_calm effect
JackSwitzer Feb 4, 2026
b620e9d
Implement ~68 Silent card effects for Slay the Spire RL engine
JackSwitzer Feb 4, 2026
ec37fc3
Implement ~60 Ironclad card effects for RL engine
JackSwitzer Feb 4, 2026
d926ac9
Implement Defect orb system and 65+ card effects
JackSwitzer Feb 4, 2026
f902c0f
Add missing event choice generators and reward system improvements
JackSwitzer Feb 4, 2026
d7ced84
Fix Loop power trigger timing and Electrodynamics Lightning count
JackSwitzer Feb 4, 2026
eeaba2c
Fix Silent card issues from PR #4 code review
JackSwitzer Feb 4, 2026
0c4dfd6
Fix Vampires event Blood Vial option and Mind Bloom floor-dependent l…
JackSwitzer Feb 4, 2026
e15f466
Fix Ironclad card/power parity issues from PR #3 review
JackSwitzer Feb 4, 2026
0d06a04
Add scry agent selection system with Golden Eye +2 bonus
JackSwitzer Feb 4, 2026
7edb8ea
Fix Golden Eye and Melange relic documentation and triggers
JackSwitzer Feb 4, 2026
d88cf45
Merge cards-defect: Fix Loop timing + Electrodynamics
JackSwitzer Feb 4, 2026
b497f50
Merge cards-ironclad: Fix Ironclad parity issues
JackSwitzer Feb 4, 2026
adddd78
Merge cards-silent: Fix Silent parity issues
JackSwitzer Feb 4, 2026
f0bb8e5
Merge relics-events-rewards: Fix Vampires Blood Vial, Mind Bloom
JackSwitzer Feb 4, 2026
d61baeb
Merge agent-api: Add Agent API implementation
JackSwitzer Feb 4, 2026
0ef5ed3
Merge potions-powers: Fix Sacred Bark
JackSwitzer Feb 4, 2026
d42a58e
Fix Sacred Bark relic name consistency (SacredBark -> Sacred Bark)
JackSwitzer Feb 4, 2026
5531809
Fix RewardHandler test argument order
JackSwitzer Feb 4, 2026
29481dc
Fix Falling event + Living Wall card type checks
JackSwitzer Feb 4, 2026
98a230d
Update CLAUDE.md with current parity status (2026-02-04)
JackSwitzer Feb 4, 2026
a0ba0d9
Update docs with current parity status (2026-02-04)
JackSwitzer Feb 4, 2026
b9bd2a0
docs: consolidate parity status and archive work units
JackSwitzer Feb 4, 2026
3166874
Merge branch 'work/cards-watcher'
JackSwitzer Feb 4, 2026
d8639a5
fix: apply bugbot parity corrections
JackSwitzer Feb 4, 2026
74df744
chore: update worktree pointers
JackSwitzer Feb 4, 2026
7557cb7
fix: normalize combat relic lookup
JackSwitzer Feb 4, 2026
e9cc00f
fix: stabilize split spawns and action results
JackSwitzer Feb 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 42 additions & 19 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Build a mod/bot that wins Slay the Spire (Watcher only, A20, >96% winrate) using
```
packages/engine/ # Pure Python game engine (source of truth)
packages/parity/ # Seed catalog + parity verification tools
tests/ # 4100+ tests (pytest)
tests/ # 4500+ tests (pytest)
mod/ # Java EVTracker mod
decompiled/ # Java source reference
docs/vault/ # Game mechanics ground truth
Expand All @@ -16,26 +16,42 @@ docs/ # ARCHITECTURE.md

## Testing
```bash
uv run pytest tests/ -q # Run all 4100+ tests
uv run pytest tests/ -q # Run all 4500+ tests
uv run pytest tests/test_parity.py # Parity verification
uv run pytest tests/ --cov=packages/engine # Coverage (~68%)
```

## Java Parity Status (Verified 2026-02-03)

| Domain | Parity | Status |
|--------|--------|--------|
| **RNG System** | 100% | ✅ PRODUCTION READY |
| **Damage/Block Calc** | 100% | ✅ Exact match |
| **Enemies** | 100% | ✅ All 66 verified |
| **Stances** | 100% | ✅ Divinity timing fixed |
| **Cards** | 97% | ✅ 6 cards fixed |
| **Powers** | 84% | ⚠️ Most triggers working |
| **Events** | 95% | ⚠️ Minor issues |
| **Potions (Data)** | 100% | ✅ All 42 correct |
| **Potions (Effects)** | 40% | ⚠️ 25 missing effects |
| **Relics (Active)** | 65% | ⚠️ 117/180 triggers implemented |
| **Relics (Passive)** | 15% | ✅ Data-driven (27/180) |
## Java Parity Status (Verified 2026-02-04)

### Core Mechanics (100% Parity)
| Domain | Status | Notes |
|--------|--------|-------|
| **RNG System** | ✅ 100% | All 13 streams verified, production ready |
| **Damage Calculation** | ✅ 100% | Vuln 1.5x, Weak 0.75x, floor operations exact |
| **Block Calculation** | ✅ 100% | Dex before Frail, floor operations exact |
| **Stances** | ✅ 100% | Wrath/Calm/Divinity/Neutral verified |
| **Enemies** | ✅ 100% | All 66 enemies verified |
| **Map Generation** | ✅ 100% | Java quirks included |
| **Shop** | ✅ 100% | Prices and pools match |
| **Card Rewards** | ✅ 100% | HashMap order + pity timer |
| **Card Data** | ✅ 100% | All characters verified |
| **Potions (Data)** | ✅ 100% | All 42 potions correct |

### Partial / Missing (Implementation Gaps)
- **Power triggers**: 30/94 implemented (64 missing).
- **Relics**: 44 missing all + rest-site/pickup/chest/bottled gaps (see skipped tests).
- **Events**: 17/50 choice generators implemented; 2 handlers missing.
- **Potions (effects)**: discovery/selection and several effects partial.
- **Rewards**: JSON action layer implemented; fidelity still depends on relic/potion/event gaps.

### Missing Features (138 Skipped Tests by markers)
| Category | Count | Priority | Description |
|----------|-------|----------|-------------|
| Rest Site Relics | 36 | HIGH | Dream Catcher, Regal Pillow, Girya, Peace Pipe, Shovel |
| Relic Pickup Effects | 34 | HIGH | War Paint, Whetstone, Astrolabe, Calling Bell, etc. |
| Chest Relic Acquisition | 30 | HIGH | Tiny Chest, Matryoshka, Black Star, Cursed Key |
| Bottled Relics | 20 | MED | Bottled Flame/Lightning/Tornado innate hands |
| Out-of-Combat Triggers | 13 | MED | Shop relics, Ectoplasm tracking |

See test files and `docs/ARCHITECTURE.md` for implementation details.

Expand All @@ -45,8 +61,8 @@ from packages.engine import GameRunner, GamePhase

runner = GameRunner(seed="SEED", ascension=20)
while not runner.game_over:
actions = runner.get_available_actions() # Decision point
runner.take_action(actions[0]) # Execute action
actions = runner.get_available_action_dicts() # JSON actions
runner.take_action_dict(actions[0]) # Execute action
# runner.run_state = full observable state
# runner.phase = current GamePhase
```
Expand Down Expand Up @@ -259,6 +275,13 @@ Tier 2: InnerPeace, CutThroughFate, WheelKick, Conclude
- Divinity enter: +3
- Deva Form: +1/turn stacking

### Scry Mechanics
- Scry X: Look at top X cards of draw pile, choose which to DISCARD (rest stay on top)
- Golden Eye relic: +2 to ALL scry amounts
- Melange relic: Scry 3 on shuffle
- Nirvana power: Gain block once per scry ACTION (not per card)
- Agent decides which cards to discard via `SelectScryDiscard` action

## RNG Prediction System (✅ Verified 100% Java Parity)

### Documentation
Expand Down
2 changes: 1 addition & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ SlayTheSpireRL/
│ └── combat_engine.py # Turn-based combat engine
├── packages/parity/ # Seed parity verification tools
│ └── comparison/ # State comparators, RNG trackers, game simulator
├── tests/ # 2480+ pytest tests
├── tests/ # 4500+ pytest tests
├── mod/ # Java EVTracker mod
├── docs/ # Documentation
│ └── vault/ # Verified game mechanics ground truth
Expand Down
22 changes: 8 additions & 14 deletions docs/GAME_STATE_AUDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ Note:
### Phase/Flow State (`GameRunner`)
Implemented:
- Full phase machine: map navigation, combat, rewards, events, shops, rest, treasure, boss rewards, Neow.
- Action types for all phases for RL integration.
- JSON action layer + observation API for RL integration.

Present but partial:
- `GameRunner` supports Watcher/Ironclad/Silent/Defect run factories.
- Some phase-specific actions are defined but their handler types are still stubs (see Reward actions).
- Some phase outcomes still depend on missing relic/potion/event behaviors.

### Room/Modal State
Implemented dataclasses:
Expand All @@ -63,30 +63,26 @@ Implemented dataclasses:
- Reward types (`CombatRewards`, `CardReward`, etc.).

Present but partial:
- Reward action dataclasses are `pass` (claim/skip/proceed actions are not fully implemented).
- Reward action processing is implemented, but fidelity depends on missing relic/potion/event hooks.
- Event choice generators and handler coverage are incomplete; ID normalization now handled via alias mapping.

## What’s Missing / Needs Work

### Core State Gaps
- **Orb system**: channel/evoke, slots, Focus/Lock‑On, orb-specific state in `CombatState`.
- **Reward action processing**: Claim/skip actions in `RewardHandler` (currently stubs).
- **Event normalization**: alias mapping added; full content/handler unification and missing choice generators remain.

### Combat/State Hooks
- Combat‑time relic hooks are incomplete (`Snecko Eye`, Ice Cream, etc.).
- Potion effect behaviors are still simplified (Discovery choices, Distilled Chaos auto-play, Entropic Brew RNG parity, Smoke Bomb restrictions).
- Power triggers missing across multiple hooks (see `docs/work_units/powers.md`).
- Power triggers missing across multiple hooks (see `docs/work_units/granular-powers.md`).

### Data/Pool Consistency
- Legacy Java IDs remain canonical, but modern names are now supported via alias mapping (Rushdown → `Adaptation`, Foresight → `Wireheading`, Wraith Form → `Wraith Form v2`).

### Tests and Known Failures (latest run)
Full test run: `uv run pytest tests/ -ra` (2026-02-04)
- Collected 3950 tests; run aborted during collection with 3 import errors:
- `tests/test_ascension.py`: import error for `WATCHER_BASE_GOLD` (removed in favor of `BASE_STARTING_GOLD`).
- `tests/test_coverage_boost.py`: import error for `EventHandler` from `handlers.rooms` (moved to `handlers.event_handler`).
- `tests/test_handlers.py`: import error for `EventHandler` from `handlers.rooms` (moved to `handlers.event_handler`).
### Tests and Known Failures (latest known)
- Skip markers indicate **~138 skipped tests**, mostly relic pickup/rest-site/chest mechanics.
- Targeted readiness tests for JSON actions + observations now pass.

### Watcher RL Readiness (current max)
Safe (high parity):
Expand All @@ -102,9 +98,8 @@ Cautious (partial parity; usable with constraints):
- Events: missing choice generators default to leave; pool coverage incomplete.

Risky (training fidelity compromised):
- Reward action processing still incomplete (claim/skip action classes are stubs).
- Defect orb system missing (avoid Prismatic Shard/cross-class reliance).
- Known test import errors indicate test suite needs refactor updates before using tests as regression guard.
- Some relic/potion/event behavior gaps can bias learning if not constrained.

Practical constraints to “push max” now:
- Prefer Watcher-only runs; avoid Prismatic Shard and cross-class effects.
Expand All @@ -121,7 +116,6 @@ Implemented:

Missing / Partial:
- Orb system and Defect state.
- Reward action processing.
- Event ID normalization and missing choice generators.
- Combat relic/potion hooks and power trigger coverage.

Expand Down
Loading