How assassin29092005/game_rl works
HellwalkerRL is an Unreal action game whose adaptive keeper uses a recurrent policy trained offline, with the same engine-free combat core used by simulators. The main player flow is input through the game controller into a duel; the keeper chooses scripted or adaptive actions, and session state preserves its learning across shrine fights. The repository also includes training/evaluation tools and a research website for player statistics. Several subsystem links are based on README or SOURCE INDEX references rather than inspected implementations, so only documented or indexed relationships are shown.
Main entry points: app.js Site Router · train.py PPO Trainer · HWPlayerController.cpp Input & Menus · HWDuelSubsystem.cpp Duel Runtime
Components 28
Unreal Game
- Input & Menus
Source/HellwalkerRL/Private/HWPlayerController.cpp - Menu Builder
Source/HellwalkerRL/Private/HWPlayerControllerMenu.cpp - Open World
Source/HellwalkerRL/Private/HWOpenWorldGameMode.cpp - Duel Runtime
Source/HellwalkerRL/Private/HWDuelSubsystem.cpp - Keeper Session
Source/HellwalkerRL/Private/HWSessionSubsystem.cpp - Settings
Source/HellwalkerRL/Private/HWSettings.cpp
Combat Core
- Combat Rules
Source/HellwalkerRL/Private/HWCore/HWDuel.cpp - Encounter Simulator
Source/HellwalkerRL/Private/HWCore/HWSim.cpp - Scripted Keeper
Source/HellwalkerRL/Private/HWCore/HWScriptBrain.cpp - Adaptive Keeper
Source/HellwalkerRL/Private/HWCore/HWRLBrain.cpp - Player Observer
Source/HellwalkerRL/Private/HWCore/HWRLObserver.cpp
RL Training
- Recurrent Policy
RL/model.py - Training Environment
RL/env.py - PPO Trainer
RL/train.py - Policy Export
RL/export.py - Habit Profiles
RL/habits.py - Simulated Players
RL/players.py
Simulation Tools
- Classic Benchmark
Sim/Classic/HWClassicBrain.cpp - Comparison Arms
Sim/SimArms.cpp - Thesis Simulator
Sim/ThesisSim.cpp
Research Website
- Site Router
web/js/app.js - Remote Backend
web/js/api.js - Demo Backend
web/js/demo.js - Player Profile
web/js/pages/profile.js - Leaderboard
web/js/pages/leaderboard.js - Research Info
web/js/pages/research.js
Other components
- Player
- Firebase
Connections 27
- Player → Input & Menus: sends input
- Input & Menus → Duel Runtime: queues actions
Source/HellwalkerRL/Private/HWPlayerController.cpp - Input & Menus → Open World: controls exploration
Source/HellwalkerRL/Private/HWPlayerController.cpp - Input & Menus → Menu Builder: builds menus
Source/HellwalkerRL/Private/HWPlayerControllerMenu.cpp - Duel Runtime → Combat Rules: runs encounter
- Duel Runtime → Adaptive Keeper: dispatches keeper
- Duel Runtime → Scripted Keeper: dispatches keeper
- Keeper Session → Adaptive Keeper: provides memory
- Adaptive Keeper → Player Observer: observes player
- PPO Trainer → Training Environment: trains against
RL/train.py - PPO Trainer → Recurrent Policy: optimizes
RL/train.py - PPO Trainer → Policy Export: exports policy
RL/train.py - PPO Trainer → Habit Profiles: uses profiles
RL/train.py - Training Environment → Simulated Players: simulates players
RL/env.py - Training Environment → Encounter Simulator: calls core
RL/env.py - Policy Export → Recurrent Policy: serializes
RL/export.py - Keeper Session → Policy Export: loads trained weights
- Thesis Simulator → Comparison Arms: compares arms
Sim/ThesisSim.cpp - Comparison Arms → Classic Benchmark: runs benchmark
Sim/SimArms.cpp - Comparison Arms → Adaptive Keeper: runs adaptive arm
Sim/SimArms.cpp - Site Router → Remote Backend: selects backend
web/js/app.js - Site Router → Demo Backend: selects backend
web/js/app.js - Site Router → Player Profile: routes to
web/js/app.js - Site Router → Leaderboard: routes to
web/js/app.js - Site Router → Research Info: routes to
web/js/app.js - Remote Backend → Firebase: reads and writes
- Player Profile → Remote Backend: loads player data