Decision Loop
AI & Autonomy
The adaptive tick scheduling engine, autonomous homestead stewardship, sleep cycle, and subsystem health watchdogs.
Dynamic Adaptive Tick Rates
| Operating Mode | Tick Rate | Equivalent TPS | Trigger Criteria |
|---|---|---|---|
| Combat | 50ms | 20 TPS | Nearby hostiles < 16 blocks or taking damage |
| Active Task | 100ms | 10 TPS | Mining, building, harvesting, felling trees |
| Idle Routine | 500ms | 2 TPS | Waiting in base, ambient scanning |
| Dashboard Only | 1000ms | 1 TPS | No tasks queued, low power state |
Autonomous Homestead Stewardship
When idle for > 15 seconds, AmbientBehaviorService.js takes over:
-
Sleep Cycle: Scans for beds when
timeOfDay ≥ 12541(dusk) or during thunderstorms; navigates to bed and sleeps until dawn. - Auto-Eat Routine: Evaluates inventory for food items with high saturation (cooked beef, golden carrots, bread) and consumes them when hunger ≤ 16.
Subsystem Heartbeat Watchdog
Audits subsystem heartbeats (nav, inv, safety, tools, ambient) every 5 seconds. If any subsystem ping exceeds 2000ms, a module.unhealthy alert is dispatched.