테스트: 야추·오델로 무작위 대국의 한 수 처리 시간 상한 5ms→30ms (병렬 실행 중 부하로 가끔 실패, 다른 게임과 같은 값)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -530,12 +530,12 @@ describe('random playouts (docs/09 §7)', () => {
|
||||
fullHouseAllowsYacht: i % 2 === 0,
|
||||
yahtzeeJoker: i % 6 === 0 ? 'free' : 'forced',
|
||||
});
|
||||
const a = randomPlayout(yacht, { players, options, seed: seedN(i), maxSteps: 20_000, invariant: checker() });
|
||||
const a = randomPlayout(yacht, { players, options, seed: seedN(i), maxSteps: 20_000, invariant: checker(), maxApplyMs: 30 });
|
||||
if (!a.finished) throw new Error(`seed ${i} did not finish`);
|
||||
const r = yacht.result(a.finalState as YachtState)!;
|
||||
expect(r.ranking.flat().sort()).toEqual([...players].sort());
|
||||
if (i % 25 === 1) {
|
||||
const b = randomPlayout(yacht, { players, options, seed: seedN(i), maxSteps: 20_000 });
|
||||
const b = randomPlayout(yacht, { players, options, seed: seedN(i), maxSteps: 20_000, maxApplyMs: 30 });
|
||||
expect(JSON.stringify(b.finalState)).toBe(JSON.stringify(a.finalState));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user