diff --git a/docs/re/BACKLOG.md b/docs/re/BACKLOG.md index 67b6edd..fbe4255 100644 --- a/docs/re/BACKLOG.md +++ b/docs/re/BACKLOG.md @@ -428,8 +428,19 @@ search cannot find a *schedule*. first word in a 4 MB window with a plausible rate; intermittent counters pass that test. `timer_probe` had already solved this (286 candidates, modal rate ~17/s) and the lesson was not carried over. **Fixed to a majority vote over the - modal-rate cluster (≤32 witnesses, stall only if I', a, k)[0], struct.unpack_from('>I', b, k)[0] if va < vb and 5 < (vb - va) / 3.0 < 200: cands.append((lo + k, round((vb - va) / 3.0))) - modal = collections.Counter(r for _, r in cands).most_common(1) - ticks = [o for o, r in cands if modal and r == modal[0][0]][:32] - print('tick witnesses: %d candidates, modal rate %s/s, using %d' - % (len(cands), modal[0][0] if modal else '-', len(ticks)) + # The MODAL cluster is not the frame counter. One run picked a modal rate of + # 93/s, and only 11 of 31 of those advanced during active combat -- they are + # subsystem counters that tick in bursts. timer_probe measured the frame-rate + # cluster at ~17/s, matching Canary's 14-19 fps on this box, so prefer a + # cluster in that band and fall back to modal only if none exists. + rates = collections.Counter(r for _, r in cands) + band = [r for r in rates if 8 <= r <= 40] + pick = max(band, key=lambda r: rates[r]) if band else ( + rates.most_common(1)[0][0] if rates else None) + ticks = [o for o, r in cands if r == pick][:32] + print('tick witnesses: %d candidates, using %d at %s/s (frame-rate band)' + % (len(cands), len(ticks), pick) if ticks else 'tick witnesses: NONE -- RUN UNVALIDATED') last_ticks = [struct.unpack('>I', os.pread(fd, 4, o))[0] for o in ticks] @@ -115,7 +123,10 @@ def main(): if ticks: now = [struct.unpack('>I', os.pread(fd, 4, o))[0] for o in ticks] moved = sum(1 for x, y in zip(last_ticks, now) if y > x) - if moved * 2 < len(ticks): + # "Fewer than half" was too strict: 11 of 31 advanced while craft + # were being destroyed. The unambiguous signal in that run was + # 0 of 31, which coincided exactly with losses stopping. + if moved == 0: st = ' *** GUEST STALLED (%d/%d witnesses moved) ***' % (moved, len(ticks)) stalls += 1 last_ticks = now