# realmbot kind .......... project status ........ paused since 2026-10-01 · model access not granted checked ....... 2026-10-20 stack ......... python · asyncio · decision models · evals source ........ private repo page .......... https://brodymontag.com/projects/realmbot A bot harness for a private game server, built for TypeSafe AI's Jev decision model. Jev access did not come, so every test used stand-in models. realmbot tests how little control a decision model can have and still help. The model picks only a tactical mode. Deterministic code owns safety, movement and every required protocol reply. Each model call falls back to a heuristic policy on a timeout, low confidence or an outage. An action gate guards risky game actions, and a governor limits the rate and cost of model calls. I built it for Jev's API, but access did not come. The tests used stand-ins: the heuristic, a local Qwen3-4B, a test double and a small tabular model. A 60-minute soak ran 17,997 ticks with no disconnect. The game server is a local open-source server that I run. The project has no anti-detection code of any kind. ## highlights - The model picks only a tactical mode - Heuristic fallback on a timeout, low confidence or an outage - An action gate, and a rate and cost governor - Measured: danger threshold tuned from 0.55 to 0.30 (stand-in model) - Measured: 60-minute soak, 17,997 ticks, 0 disconnects - Local open-source server. No anti-detection code. ## detail updated 2026-10-20 ### how it works figure 1 · a tick, and who owns it · schematic Server ticks pass along a track. Deterministic code answers every tick. About once a second, the model picks a mode, and the heuristic answers when the model is late, unsure or down. The bot splits control into layers. The reflex layer runs on every server tick in deterministic code: safety checks, dodges, paths and the mode executors. The protocol layer sends every required reply. The tactical layer asks the decision model, about once a second, which of seven modes to run. Each question comes from a versioned YAML spec, with its options and its thresholds. The arbiter takes the model's mode only if the answer is fresh and sure enough. Otherwise the heuristic answers. A token-bucket governor paces the calls under Jev's limit of 1,200 requests a minute for each key. figure 2 · the layers and the arbiter Packets go to the protocol layer. It feeds the reflex layer on every tick and the decision loop about once a second. The model and the heuristic both answer, and the arbiter picks the mode that the reflex layer runs. ```mermaid flowchart TD A[game server] -->|packets| B[protocol layer] B -->|every tick| C[reflex layer] B -->|about 1 Hz| D[decision loop] D -->|governor| E[decision model] D --> F[heuristic] E --> G[arbiter] F --> G G -->|mode| C ``` the arbiter: safety first, then the model only if it is fresh and sure realmbot@5ad9543 · packages/rb-brain/src/rb_brain/arbiter.py:215-234 · not public ```python if safety_tripped: return ArbiterOutcome(SAFETY_MODE, "safety", ArbiterReason.SAFETY_TRIPPED) spec = self._mode_spec answer = _usable_answer(spec, decision, now_ms=now_ms, decided_at_ms=decided_at_ms) if isinstance(answer, ArbiterReason): outcome = _fallback(spec, answer, current=current_mode, heuristic=heuristic) assert isinstance(outcome.value, str) # a valid choice value is an option key return ArbiterOutcome(outcome.value, outcome.source, outcome.reason) mode = answer.value assert isinstance(mode, str) # `_usable_answer` validated it as an option key if current_mode is None or mode == current_mode or current_mode not in spec.option_keys(): return ArbiterOutcome(mode, answer.source, ArbiterReason.ACCEPTED) margin = _probability_margin(answer.probabilities, new=mode, current=current_mode) if margin is None: return ArbiterOutcome(mode, answer.source, ArbiterReason.SWITCHED_NO_PROBABILITIES) if margin < spec.harness.hysteresis: return ArbiterOutcome(current_mode, "current", ArbiterReason.HYSTERESIS_HOLD) return ArbiterOutcome(mode, answer.source, ArbiterReason.SWITCHED) ``` ### decisions decision: The model picks only the mode (accepted, 2026-09-23) context: Jev answers in 70 to 500 ms. That is longer than a server tick, and some packets need a reply on time. decision: Jev answers only in the tactical layer and picks one of seven modes. Deterministic reflex code carries the mode out, and a safety check always overrides it. cost: The arbiter needs TTL and hysteresis rules, so that a stale or weak answer does not reach the reflex layer. the mode question: seven options and their harness realmbot@5ad9543 · decisions/mode.yaml:8-29 · not public ```yaml id: mode version: 1 type: choice instructions: "What should the character do for the next few seconds?" criteria: engage: "Fight the current target; HP healthy, allies nearby." kite: "Attack while keeping distance; target is dangerous up close." retreat: "Move away from threats toward safety, without leaving the map." loot: "Collect a nearby bag; no immediate threats." travel: "Head toward the current quest objective." regroup: "Move back toward scattered allies; no immediate threat." nexus: "Leave the map immediately through the Nexus portal; imminent death." harness: # Placeholders: Epic 7 tunes threshold/hysteresis/ttl_ms against reliability curves, not guesses. threshold: 0.55 hysteresis: 0.10 ttl_ms: 1500 fallback: heuristic # Safe default if neither Jev nor the heuristic produces a usable answer (rb_brain.fallback): # leave the map, matching `danger`'s default of its most severe level. fallback_option: nexus gated: false ``` decision: A heuristic first, and as the fallback for every call (accepted, 2026-09-23) context: Jev was in early access, with self-reported benchmarks. Without a control group, no test can show that the model helps. decision: A rule-based heuristic answers each question behind the same interface as the model. It answers when the model times out, is unsure, returns a 429 or has an open circuit breaker. It is also the control group. cost: Each question needs a heuristic rule and a model spec, which is about twice the work. decision: The danger threshold comes from a reliability curve, not a guess (accepted, 2026-10-01) context: The first thresholds in the specs were placeholders. decision: A sweep over out-of-fold predictions picked the danger threshold and its hysteresis margin: 0.30 and 0.24. The mode question still uses placeholders. cost: 0.30 is the lowest point of the sweep, and any threshold from 0.30 to 0.45 scores about the same. The sweep used the stand-in tabular model. the danger spec after the sweep realmbot@5ad9543 · decisions/danger.yaml:8-25 · not public ```yaml id: danger version: 2 type: score instructions: "How dangerous is the current situation?" criteria: - Safe - Elevated - Dangerous - Lethal within seconds harness: # threshold and hysteresis: tuned in story 7.5 from out-of-fold reliability on the served # tabular model (`python -m rb_evals.tune`, docs/research/threshold-tuning.md). ttl_ms is still a # placeholder: nothing measured here says how fast a danger answer goes stale. threshold: 0.30 hysteresis: 0.24 ttl_ms: 1500 fallback: heuristic gated: false ``` ### results figure kind value soak against the local server measured 60 min, 0 disconnects server ticks answered, NEWTICK → MOVE measured 17,997 PING → PONG replies measured 1,200 decode errors measured 0 danger accuracy with fallback, threshold 0.55 → 0.30 measured 0.527 → 0.591 danger coverage, same change measured 0.48 → 1.00 method: soak: 3,600 s against a local zig server on 2026-09-24. Danger: 4,455 out-of-fold rows from 57 episodes, scored with the stand-in tabular model. · as of 2026-10-01 ### limits limits: - Every test used stand-ins. Jev itself never answered a question. - The data for the sweep holds only Wizard rows from the Nexus and the Vault. - The soak tested the protocol and the replies for one hour. It did not test play. - No live A/B test compares the model with the heuristic yet. - The danger gain is 6.4 points, with a 95% interval of 1.2 to 11.0. One of five folds shows a loss. ### status and next status: - Done: the protocol, the reflex layer, the arbiter, the action gate, the governor and the evals, with 2,025 tests (2026-10-01). - Blocked: no access to Jev. Paused since 2026-10-01. - Next: the live A/B test against the heuristic, then runs with more than one bot. -- end of page · this page as text: https://brodymontag.com/machine/projects/realmbot · index: https://brodymontag.com/machine · summary: https://brodymontag.com/llms.txt