Real training. Player rules. Your hardware.
The Bot SDK turns confirmed play into a versioned local dataset, fits a small supervised model, evaluates it against independent journeys, and loads the resulting artifact as an ordinary BotBrain. It is real machine learning—multiclass linear softmax—not an LLM and not a secret resident service.
Identity-free CC0 demonstrations you can inspect, copy, and replace.
Healing, banking, staying in the Bank, combat, waiting, loot, resources, run control, and death.
Train, validation, and test evidence stay explicit in every frame.
No production replay service, model upload, training endpoint, or database access.
The included brain proves the complete toolchain and compatibility contract. Your advantage comes from better journeys, teachers, candidates, trainers, and evaluation—not private Fenwild data.
Six stations from first sight to first fight
Observe
Read the same typed world snapshot available to an ordinary player client.
Teach
Choose one legitimate action. Only authority-confirmed decisions become examples.
Split
Keep independent journeys for training, validation, and the final test.
Train
Fit the deterministic reference model—or your own trainer—on local CPU.
Trial
Challenge the artifact against held-out scenarios and public thresholds.
Play
Run the chosen brain through one scoped token and normal game authority.
Collection is the only learning step that needs a live character. Conversion, merging, training, evaluation, and the public benchmark are local-file and local-CPU operations. play reconnects only after you choose an artifact.
Do not let tomorrow's test leak into today's lesson
Collect separate journeys for fitting, tuning, and the final verdict. Adjacent ticks from one run are highly correlated, so Fenwild preserves each journey's split instead of randomly scattering nearby frames across train and test.
export FENWILD_AUTOMATION_TOKEN="the-one-time-secret"
bunx --bun --no-install fenwild-bot-training collect \
--out train.json --id mossmere-train --split train
bunx --bun --no-install fenwild-bot-training collect \
--out validation.json --id yard-validation --split validation
bunx --bun --no-install fenwild-bot-training collect \
--out test.json --id wilds-test --split test
bunx --bun --no-install fenwild-bot-training merge \
--inputs train.json,validation.json,test.json \
--out my-corpus.json --id my-held-out-corpus
# Node.js 22+: npx --no-install instead of bunx --bun --no-installmerge rejects duplicate scenario or frame IDs, incompatible schemas, oversized corpora, and split mismatches before training begins.
Make the brain earn its deployment
Start with benchmark. It validates the shipped corpus and its fingerprint, the reference model's feature schema, and the acceptance thresholds without a token or network connection. Then train your corpus and judge the untouched test journeys.
bunx --bun --no-install fenwild-bot-training benchmark
bunx --bun --no-install fenwild-bot-training train \
--input my-corpus.json \
--out my-brain.json
bunx --bun --no-install fenwild-bot-training evaluate \
--model my-brain.json \
--data my-corpus.json \
--split test
bunx --bun --no-install fenwild-bot-training play --model my-brain.json
# Node.js 22+: npx --no-install instead of bunx --bun --no-installThe loaders fail closed on unknown fields, non-finite weights, invalid labels, incompatible versions, and choices outside their candidate set; training refuses work beyond the bounded local compute budget. A passing test score is evidence for the journeys you authored—not permission to assume every corner of Fenwild is solved.
Teach the behavior you actually value
The built-in teacher is intentionally modest. Point collect at a local ESM module to demonstrate your own choices. The module receives an ordinary typed observation and returns one public action; only actions authority accepts become examples.
// teacher.mjs — a cautious, hometown-aware starting teacher
import { yardTrainer } from "@fenwild/bot-sdk/brains";
export default function decide(observation) {
return yardTrainer(observation);
}
// Collect through the ordinary live player boundary:
// bunx --bun --no-install fenwild-bot-training collect --teacher ./teacher.mjs ...It predicts which action type to take. play offers it only the reference candidates—observe, heal with a carried potion, head to the Bank, enable run, loot, gather, or attack the nearest living NPC of any kind—so this teacher's trainer-only targeting is not reproduced. Routes, economy loops, social play, or your own targeting need your own candidates (predictBotAction accepts a list) or your own trainer inside a BotBrain.
Strategy author
Write a deterministic teacher, collect clean outcomes, and train the included linear model to choose among the reference verbs.
ML builder
Consume the versioned JSON schema with your own trainer, then adapt its result into a local BotBrain.
Experimenter
Compare artifacts on the same frozen holdouts and keep the incumbent when a challenger regresses.
Operator
Supervise one character per controller, bound shutdown, and treat unknown outcomes as unknown.
The game stays a game server
On your machine
- Recordings and identity-minimized datasets
- Feature extraction and model fitting
- Holdout evaluation and benchmarks
- Private, crash-atomic model files
At Fenwild authority
- One scoped realtime character session
- Current player-visible observations
- Rate-limited ordinary player actions
- Accepted, rejected, or unknown outcomes
Never offered
- No training server or reset/step gym
- No source code or database access
- No model upload or hosted inference
- No resident corpus, holdouts, or hidden state
- Local documents are size-bounded, version-checked, written with owner-only permissions, and replaced atomically only when
--forceis explicit. - Training work has a deterministic compute ceiling; oversized example/label/epoch combinations fail before the expensive loop.
- Only
collectandplayaccept the scoped automation token.benchmark,merge,trainandevaluateare tested with networking disabled. - Personal datasets still reveal inventory, progression, and visible surroundings. Keep them private even though player identities and chat are stripped.
