Here's every patch you need to make, organized by ...
Создано: 13 марта 2026 г.
Отвечено с использованием GPT-5.4 Thinking от Chat01
Создано: 13 марта 2026 г.
Отвечено с использованием GPT-5.4 Thinking от Chat01
Here's every patch you need to make, organized by location. Search for the exact FIND text and replace with the REPLACE text.
Search for: winnerEngineLayers / blend weight section in MATCH_PICK
FIND:
var _blEloCap = _blIsWta ? 0.20 : _blIsCh ? 0.22 : 0.25;
REPLACE:
var _blEloCap = _blIsWta ? 0.18 : _blIsCh ? 0.19 : 0.22;
FIND:
var _targetE = Math.min(_wE, 0.05);
REPLACE:
var _targetE = Math.min(_wE, 0.03);
FIND:
var _targetE_pb = Math.min(wElo, 0.05);
REPLACE:
var _targetE_pb = Math.min(wElo, 0.03);
FIND:
var _wSum = _wM + _wS + _wE + _wF_mp;
REPLACE:
text_wE = Math.min(_wE, 0.22); var _wSum = _wM + _wS + _wE + _wF_mp;
FIND:
var _p3MmC = (_p3TK === 'WTA') ? 0.20 : (_p3TK === 'CH') ? 0.18 : 0.16;
REPLACE:
var _p3MmC = (_p3TK === 'WTA') ? 0.12 : (_p3TK === 'CH') ? 0.11 : 0.10;
FIND:
var _p3ClP = (_p3TK === 'WTA') ? 0.03 : (_p3TK === 'CH') ? 0.028 : 0.025;
REPLACE:
var _p3ClP = (_p3TK === 'WTA') ? 0.015 : (_p3TK === 'CH') ? 0.012 : 0.012;
FIND:
var _mpMmC = (_mpTK === 'WTA') ? 0.20 : (_mpTK === 'CH') ? 0.18 : 0.16;
REPLACE:
var _mpMmC = (_mpTK === 'WTA') ? 0.12 : (_mpTK === 'CH') ? 0.11 : 0.10;
FIND:
var _mpClP = (_mpTK === 'WTA') ? 0.03 : (_mpTK === 'CH') ? 0.028 : 0.025;
REPLACE:
var _mpClP = (_mpTK === 'WTA') ? 0.015 : (_mpTK === 'CH') ? 0.012 : 0.012;
FIND (CRITICAL — inverted close penalty):
textvar _set3PenMP = _mpClP * _closeMP; var _pAdjMP = _pDecRawMP * (1 - _mpMmC * _mmMP) - _set3PenMP;
REPLACE:
textvar _set3PenMP = _mpClP * (1 - _closeMP); var _favWpMP = Math.max(Number(_pSeedMP) || 0.5, 1 - (Number(_pSeedMP) || 0.5)); var _shouldCompressMP = (_favWpMP > 0.70) || (_mmMP > 0.60); var _pAdjMP = _shouldCompressMP ? clamp01(_pDecRawMP * (1 - _mpMmC * _mmMP) - _set3PenMP) : _pDecRawMP;
FIND:
var _mpMmCWin = (_mpTKWin === 'WTA') ? 0.20 : (_mpTKWin === 'CH') ? 0.18 : 0.16;
REPLACE:
var _mpMmCWin = (_mpTKWin === 'WTA') ? 0.12 : (_mpTKWin === 'CH') ? 0.11 : 0.10;
FIND:
var _mpClPWin = (_mpTKWin === 'WTA') ? 0.03 : (_mpTKWin === 'CH') ? 0.028 : 0.025;
REPLACE:
var _mpClPWin = (_mpTKWin === 'WTA') ? 0.015 : (_mpTKWin === 'CH') ? 0.012 : 0.012;
FIND (CRITICAL — inverted close penalty):
textvar _set3PenWin = _mpClPWin * _closeWin; _p3AdjWin = clamp01(_pDecRawMkWin * (1 - _mpMmCWin * _mmWin) - _set3PenWin);
REPLACE:
textvar _set3PenWin = _mpClPWin * (1 - _closeWin); var _favWpWin = Math.max(Number(_pSeedWin) || 0.5, 1 - (Number(_pSeedWin) || 0.5)); var _shouldCompressWin = (_favWpWin > 0.70) || (_mmWin > 0.60); _p3AdjWin = _shouldCompressWin ? clamp01(_pDecRawMkWin * (1 - _mpMmCWin * _mmWin) - _set3PenWin) : _pDecRawMkWin;
FIND:
textvar disp = (0.65 * adj) + (0.35 * raw); if (raw >= liveGate && drag >= 0.04) { disp = Math.max(disp, adj + 0.35 * drag); }
REPLACE:
textvar disp = (0.45 * adj) + (0.55 * raw); if (drag > 0.06) { disp = Math.max(disp, 0.85 * raw); } if (raw >= liveGate && drag >= 0.04) { disp = Math.max(disp, adj + 0.40 * drag); }
FIND:
: ((sim && Number.isFinite(_totSim.pDecider)) ? _totSim.pDecider : 0);
REPLACE:
: ((sim && Number.isFinite(sim.pDecider)) ? sim.pDecider : 0);
_mIdx is not defined crash)This is the biggest one. 127 lines throughout your script are at 0-indentation but live inside functions. GAS V8 chokes on them. The block you'll notice first is around var _mIdx / var SET_DELTA_MP inside runMatchSimulation_Exact:[1]
FIND (0-indent block around line ~16735):
textvar _tourK = _taperTourKey_(tourLabel); var _mIdx = _mismatchIdxFromSeeds_(opts, hA, hB, tourLabel); // base correlation var SET_DELTA_MP = 0.03;
REPLACE (add 2-space indent — these are inside runMatchSimulation_Exact):
textvar _tourK = _taperTourKey_(tourLabel); var _mIdx = _mismatchIdxFromSeeds_(opts, hA, hB, tourLabel); // base correlation var SET_DELTA_MP = 0.03;
Do the same for the entire if (_mIdx >= 0.65) block and its } else if — every line needs 2-space indent.
Other 0-indent blocks to fix (same issue — add proper indentation):
MATCH_PICK: lines referencing statsA, statsB, archA, archB, simHoldA around var _sqsRawHoldAMATCH_PREVIEW: lines referencing _sqsTourInfo, _sqsIsWta, displayProbA, _totSim, gamesListAdj, _archDispA, _archDispB, _brQuick way to find them all: search for any line starting at column 0 that references tourLabel, opts, statsA, statsB, simHA, hA, hB, bestOf, _totSim, or gamesListAdj — if it's not a function declaration, it needs indentation.
| # | What | Why |
|---|---|---|
| 1-4 | Elo weight alignment | MATCH_PICK was using old caps, inflating taper seed for 64% favorites |
| 5-7 | Markov coefficients reduced ~40-50% | Compression was too aggressive, crushing adj from 42% → 27% |
| 6-7 | Close penalty formula flipped | Was mpClP * close (penalizes coinflips), should be mpClP * (1-close) (penalizes mismatches) |
| 6-7 | Mismatch gate added | Compression now completely skips favorites below 70% — this is the single biggest fix |
| 8 | Display blend rebalanced | Old 65/35 adj-heavy blend let crushed adj dominate; new 45/55 + floor protects raw |
| 9 | _pDecForUnder bug | Fallback path referenced wrong variable |
| 10 | 0-indent fix | 127 lines causing undefined crashes in GAS V8 |
Update my script then send it as a downloadable txt link