feat: show 99.5 percent score achievement probability
Publish GitHub Pages output / publish (push) Successful in 35s

This commit is contained in:
2026-09-25 08:22:37 +09:00
parent 8edb732dd9
commit 167c933032
8 changed files with 72 additions and 11 deletions
+16
View File
@@ -100,6 +100,7 @@ test('확정 발동이면 모든 달성 확률이 100%다', () => {
);
assert.deepEqual(result, {
maximum: 1,
atLeast995Percent: 1,
atLeast99Percent: 1,
atLeast95Percent: 1,
samples: 1_000
@@ -134,3 +135,18 @@ test('미발동 토글 시 현재 최고점 기준으로 확률을 계산하고
assert.deepEqual(calculateMaximumScoreProbabilityTimeline(cards, {}, chart([1.1]), options), [1]);
assert.equal(estimateScoreAchievementProbabilities(cards, {}, chart([1.1]), options).maximum, 1);
});
test('99.5% 경계 점수를 포함하고 99% 이상 점수와 구분한다', () => {
const estimate = (fallbackBoost: number) => estimateScoreAchievementProbabilities(
[card('strong', 100, 50), card('fallback', fallbackBoost, 100)],
{ strong: 0, fallback: 0 },
chart([1.1]),
{ perfectNoteScore: 10_000, sampleCount: 25_000, seed: 7 }
);
// 최고점 20,000점에서 19,900점은 포함하고 19,850점은 제외한다.
assert.equal(estimate(99).atLeast995Percent, 1);
const below = estimate(98.5);
assert.ok(Math.abs(below.atLeast995Percent - 0.5) < 0.02);
assert.equal(below.atLeast99Percent, 1);
});