Explore other actions, train from scratch now and then, honour the action lists #175
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent-exploration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this PR does
A learned policy acts greedily, so it only ever runs the action it already prefers. The episode logs then hold no evidence about other actions, and a fine-tune warm-started from the active model keeps making the same choices, so contests end in an exact tie (
not better than the active model (mean diff +0.0000)). This PR gives the agent a way out:agent/explore.py). While the learned policy drives,explore_rate(default 5%) of its windows run another allowed action, held forexplore_windows(default 2) windows for a cleaner reading, favouring the least-tried (weight1/sqrt(1+n)). Rows are markedexplore/explore_p, train the reward model like any other, and count under their ownexploringmetrics block, neverlearned. Never under the baseline. Status gains anexploreblock; the card an Exploring row.fresh_every-th (4) on-device run, or one afterstuck_contests(3) local contests where the candidate chose what the active model chose on every row, trains with--no-warm-start --seed <random>andfresh_timesteps(default 3 ×train_timesteps). Same contest.train.evaluatenow returns each policy's actions; the contest records each candidate's agreement (log line,last_decision, card), and the tally countsfresh_won/fresh_lost.kestrel agent train-now --fresh(atrain-request-freshfile viapi_touch) andagent train --fresh.unsupported_actions. A model can't win by choosing actions nobody has tried.[agent.action]postures,dwell_bucketsandtransmit_modesnow bound every action the agent runs (learned, baseline, exploring), mapped withexplore.nearest_allowed; models keep the fullDiscrete(32), soSPEC_VERSIONis unchanged.sinceon a figure, so the new Exploring screenshot is left out when building a release before 1.0.14 and the 1.0.13 page can still be republished.Checklist
make lint(ansible--syntax-check,yamllint,shellcheck --severity=error, and the real-data check). The Lint workflow runs this on the PR.make test(thekestrel_pipytest suite and the real-data check's tests). The Test workflow runs this on the PR..envfiles, real names, personal emails, device serials, and no real captured or device data: SSIDs, MAC addresses, GPS coordinates, capture files, diagnostics bundles, logs, or screenshots of a real device — placeholders only. The real-data check catches MACs, emails, keys and capture files; real SSIDs, coordinates and screenshots are on you.docs/, and the on-device operator guide (GUIDE_MDinkestrel_pi/userguide.py) where it applies.Release impact
kestrel_pipackage,plugins/*.py, systemd units, the journald drop-in, a lib script already in the engine'sLIB_SCRIPTS, or the CLI.config.txt/cmdline, kernel modules, the base image or partition size,builder/config.json,builder/config.yml, theMakefile, the Release workflow (.forgejo/workflows/main.yml), a shipped config default (config.toml/default.conf), or a brand-new lib script.The new settings are code defaults (
AGENT_DEFAULTS), not in the shippedconfig.toml; the rest is the agent package, the CLI (kestrel.sh), docs and desktop tools.Notes for review
config.tomlonly, likepromotion_margin/promotion_min_z: not on the Advanced page and not inCONFIG_SETTABLE, soplugins-ctlis unchanged. Documented inconfig-reference.md,agent-setup.mdand the guide.kestrel agent train-now --fresh). The dashboard's Train now stays a warm fine-tune.policy = baselineis off by design: the baseline is the reference every model is scored against. A device on baseline gathers no exploring data until switched tolearned.fresh_everycadence, the tie streak), so an agent restart starts them over; the tally's fresh counts persist.[agent.action]behaviour change: narrowing those lists now actually narrows what the agent runs (the defaults allow all 32 actions, so nothing changes for a default config).fresh_won. First on-device run will be the next beta.deferred.md): runs from scratch on the remote host, weighting exploring rows byexplore_p, and pausing training after a tie; the "collapses to one action" entry is narrowed to what's left.since = "1.0.14"; change it if the next stable release has another number.🤖 Generated with Claude Code