Impossible runs: one definition, left out of the route model and the site statistics (#21, #22)
CI / test (pull_request) Successful in 41s
CI / test (pull_request) Successful in 41s
- core/spec/form.yaml impossible_flags: the flags that mean a run cannot have happened as recorded (a dragon an encounter does not have, a Green or the Black in the valley, two bonds, two burns, a cadet path that does not follow, an early death that still reached the hour...). atlas.runs.impossible() reads it. - The route model and the site statistics (and the riders' paths) leave those runs out, from every source; every other run is used, however partial. The runs stay in runs_clean.csv, flagged. 80 runs: 75 form, 5 Reddit. Route-model odds move by at most 0.2 points. - collection/etl/runs.py: the community form gets the same game-rule checks as "Report a run" and the Reddit comments (10 form rows newly flagged); new rule: the Black in the valley. - The first-sighting pool stays a flag only: it is what riders have seen, not a rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
036c86a1d1
commit
46c1f00150
@@ -38,14 +38,10 @@ def low_bias(r, lb=CONFIG["low_bias"]):
|
||||
return r["goal"] not in lb["rare_goals"]
|
||||
|
||||
|
||||
def drop_flagged(runs, cfg=CONFIG.get("drop_flagged") or {}):
|
||||
"""Without the runs of the sources read automatically from free text that break a game rule
|
||||
(planner/policy.yaml drop_flagged): every other run is kept, however partial."""
|
||||
sources, rules = set(cfg.get("sources") or ()), tuple(cfg.get("rules") or ())
|
||||
|
||||
def impossible(r):
|
||||
return any(rule in f for f in (r.get("data_flags") or "").split("; ") for rule in rules)
|
||||
return [r for r in runs if r["source"] not in sources or not impossible(r)]
|
||||
def drop_flagged(runs, on=CONFIG.get("drop_impossible", True)):
|
||||
"""Without the runs that cannot have happened as recorded (atlas.runs.impossible; planner/policy.yaml
|
||||
drop_impossible): every other run is kept, however partial."""
|
||||
return [r for r in runs if not (on and runs_io.impossible(r))]
|
||||
|
||||
|
||||
def clean(o):
|
||||
|
||||
+4
-14
@@ -8,20 +8,10 @@ version: 1
|
||||
# the `source` values of data/public/runs_clean.csv the model learns from
|
||||
sources: [reddit spreadsheet, reported, bot, reddit comment]
|
||||
|
||||
# Sources read automatically from free text: only a run that breaks one of the game's rules (the checks of
|
||||
# collection/etl/runs.py rule_flags, matched as text inside its flags) is left out of the model, since it cannot have
|
||||
# happened as read. Every other run is kept, however partial. A hand fix that clears the flag brings the run back.
|
||||
# The first-sighting pool is not here: form runs outside it are kept too, so these are kept for the same reason.
|
||||
drop_flagged:
|
||||
sources: [reddit comment]
|
||||
rules:
|
||||
- "encounter, which has only"
|
||||
- "Green recorded on a Valley run"
|
||||
- "does not follow"
|
||||
- "fight answers on a run that did not help"
|
||||
- "a path after the fight on a run without a fight"
|
||||
- "a second fight move without pausing to assess"
|
||||
- "died before the hour, yet reached"
|
||||
# Every run of the sources above is used, however partial, except a run that cannot have happened as recorded
|
||||
# (core/spec/form.yaml impossible_flags: it breaks one of the game's rules). Such runs stay in runs_clean.csv, flagged;
|
||||
# a hand fix that clears the flag brings a Reddit or reported run back. The site statistics use the same rule.
|
||||
drop_impossible: true
|
||||
|
||||
# Two samples. "all" is every run above. "lowBias" leaves out runs where a rare sighting is more likely to have
|
||||
# been reported than a miss: form submissions and reports from riders chasing Blue or Black. The bot logs every
|
||||
|
||||
Reference in New Issue
Block a user