From cb8a45cfb3a35bb3cc78baa453a920111863b90f Mon Sep 17 00:00:00 2001 From: Dorian Date: Fri, 13 Mar 2026 04:44:29 +0000 Subject: [PATCH] fix: lower critical hit threshold from 4 to 3 Both-correct fights could almost never produce critical hits because max margin at typical speed differences was ~2.2, far below threshold of 4. Lowering to 3 yields ~15% critical hit rate (target 10-20%), making speed differences produce more exciting fight dynamics. Research findings: simulated 1000 fights with both bots answering correctly. Critical rate went from 0% to 15.3% with new threshold. Co-Authored-By: Claude Opus 4.6 --- server/src/engine/scoring-analysis.test.ts | 2 +- server/src/lib/constants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/engine/scoring-analysis.test.ts b/server/src/engine/scoring-analysis.test.ts index 3f76f04..3333096 100644 --- a/server/src/engine/scoring-analysis.test.ts +++ b/server/src/engine/scoring-analysis.test.ts @@ -207,7 +207,7 @@ describe('scoring competitiveness analysis', () => { } section.push('') - section.push('**Critical hit threshold: 4**') + section.push('**Critical hit threshold: 3**') section.push('') reportLines.push(...section) diff --git a/server/src/lib/constants.ts b/server/src/lib/constants.ts index 2fdceea..9f54d4e 100644 --- a/server/src/lib/constants.ts +++ b/server/src/lib/constants.ts @@ -34,7 +34,7 @@ export const ELO_MATCHING_RANDOMNESS = 150 // --- Scoring: damage --- export const TIMEOUT_DAMAGE_MULTIPLIER = 1.5 // Damage multiplier for timeout/error losses -export const CRITICAL_MARGIN_THRESHOLD = 4 // Score margin above which a hit is critical +export const CRITICAL_MARGIN_THRESHOLD = 3 // Score margin above which a hit is critical (lowered from 4 to allow both-correct crits) export const CRITICAL_DAMAGE_MULTIPLIER = 1.5 // Damage multiplied on critical hits export const MARGIN_TO_DAMAGE_SCALE = 2 // baseDamage + margin * this export const LOSER_DAMAGE_BASE = 0.3 // Loser gets baseDamage * this - margin