Let an early tap be a weak ball, and let the CPU put a sitter away
Step 4 (b), Oliver's pick. v372 measured why the ladder could not climb: nearly every lost point was the player's own early whiff, the CPU barely missed, and the auto-run reached everything, so no opponent dial decided a point. - The follow-through: a groundstroke swing meets a bounced ball up to 60 ms after its window at q 0.05. The early whiff edge goes from ~70 ms back to ~130 ms, where the volley window had it before step 1. - A sitter (a player ball under q 0.5) is put away with a chance that is the ladder (0.2 at the bottom of the Climb, 0.85 at the Champion, by difficulty in classic): clean, at the line, bounded by the rung's width. - The player is on his heels for 0.5 s after a put-away of his own sitter. Without it the auto-run covered the whole court and no put-away won. - Fixed a step-2 regression this surfaced: the drop's dig-out cap fired on every slice drive, so every low contact against the slicer was a sitter. Measured at level 26: the Climb now slopes from 95% of points at the Shambler to 28-39% at the Champion. The net rushers are still easier than their neighbours. The log names put-aways. Three new tests; v373. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5dd5d71c33
commit
4406aeafdb
8 files changed
+231
-31
No files matched your search
+13
-1
@@ -84,6 +84,7 @@ const DT = 1 / 60;
|
||||
const RUNGS = (process.env.RUNGS || '1,6,12,18').split(',').map(Number);
|
||||
const SECS = Number(process.env.SECS || 240);
|
||||
TUNE.autoAssist = 1.15;
|
||||
for (const [k, v] of Object.entries(process.env)) if (k.startsWith('T_')) TUNE[k.slice(2)] = Number(v); // T_punishRead=0.4 etc.
|
||||
const pct = (a, f) => a.length ? Math.round(100 * a.filter(f).length / a.length) : 0;
|
||||
const med = a => { const s = [...a].sort((x, y) => x - y); return s.length ? s[Math.floor(s.length / 2)] : NaN; };
|
||||
// BOT=human (the default): taps on the timed gold ring like a player (JIT ms of timing spread, a
|
||||
@@ -92,7 +93,7 @@ const med = a => { const s = [...a].sort((x, y) => x - y); return s.length ? s[M
|
||||
const HUMAN = (process.env.BOT || 'human') === 'human';
|
||||
const JIT = Number(process.env.JIT ?? 60) / 1000, LAG = 7;
|
||||
const gauss = () => Math.sqrt(-2 * Math.log(1 - Math.random())) * Math.cos(2 * Math.PI * Math.random());
|
||||
const probe = [];
|
||||
const probe = [], kills = []; let kOpen = null, kpow = 1;
|
||||
const bot = { armed: false, fire: -1, jit: null, swipe: null };
|
||||
const sw = (dx, dy, mag) => { const n = Math.hypot(dx, dy) || 1, fx = dx / n, fy = dy / n;
|
||||
return { ax: Math.abs(fx) > 0.38 ? Math.sign(fx) : 0, az: Math.abs(fy) > 0.38 ? Math.sign(fy) : 0, fx, fy, mag }; };
|
||||
@@ -172,6 +173,16 @@ for (const rung of RUNGS) {
|
||||
update(DT);
|
||||
if (process.env.PROBE && lh === 'O' && ball.lastHit === 'P' && bot.land) { const L = bot.land; probe.push({ late: Math.round(((i - L.i) / 60 - L.eta) * 1000), sw: Math.round(L.sw * 1000), q: +ball.pow.toFixed(2), bAtLand: L.b, bAtHit: L.bb, d: +L.d.toFixed(2), y: +L.y.toFixed(2) }); bot.land = null; }
|
||||
if (ball.lastHit !== 'O') G.swipe = null;
|
||||
// KILL=1: every put-away (a q >= .95 CPU ball straight after a player ball under .5) — where it went,
|
||||
// how far the player had to go, how long he had, and whether he got it back
|
||||
if (process.env.KILL) {
|
||||
if (lh === 'P' && ball.lastHit === 'O' && kpow < 0.5 && ball.pow >= 0.95) {
|
||||
const L = gp.predictLanding(); kills.push({ px: +P.x.toFixed(1), pz: +P.z.toFixed(1), lx: L && +L.x.toFixed(1), lz: L && +L.z.toFixed(1), tl: L && +L.t.toFixed(2), v: +Math.hypot(ball.vx, ball.vz).toFixed(1), got: null }); kOpen = kills[kills.length - 1];
|
||||
}
|
||||
if (kOpen && ball.lastHit === 'P' && lh === 'O') { kOpen.got = +ball.pow.toFixed(2); kOpen = null; }
|
||||
if (kOpen && (!ball.active || G.phase !== 'rally')) { kOpen.got = 'LOST'; kOpen.gap = +(G.rallyNear ? G.rallyNear.d : -1).toFixed(2); kOpen = null; }
|
||||
if (ball.lastHit === 'P') kpow = ball.pow;
|
||||
}
|
||||
const rz = process.env.CLASSIC ? state.O : zombies.find(z => z.variant === 'r');
|
||||
if (ball.active && ball.lastHit !== prevLast && (ball.lastHit === 'P' || ball.lastHit === 'O')) {
|
||||
const ch = ball.lastHit === 'P' ? P : rz;
|
||||
@@ -221,6 +232,7 @@ for (const rung of RUNGS) {
|
||||
rows.push({ rung, side: 'rally', shots: rallies.length, medDistNet: med(rallies), '<6.4m(svcline)%': '', '<3.5m(net)%': '', 'volley%': '', medTimeToHit_s: 'shots/pt mean ' + (rallies.reduce((a, b) => a + b, 0) / rallies.length).toFixed(1) });
|
||||
}
|
||||
if (!process.env.SUMMARY) { console.table(rows); console.table(land); }
|
||||
if (process.env.KILL) { console.table(kills.slice(0, 30)); const l = kills.filter(k => k.got === 'LOST').length; console.log('put-aways', kills.length, 'won by CPU', l); }
|
||||
if (process.env.PROBE) { const l = probe.map(p => p.late).sort((a, b) => a - b); console.log("contact after predicted entry, ms: n", l.length, "mean", (l.reduce((a, b) => a + b, 0) / l.length).toFixed(1), "p10", l[l.length * 0.1 | 0], "p50", l[l.length / 2 | 0], "p90", l[l.length * 0.9 | 0]); }
|
||||
if (process.env.JSON) { console.log(JSON.stringify(pts)); process.exit(0); }
|
||||
console.table(pts);
|
||||
|
||||
Reference in new issue
Block a user