fix(backend): allow three from a series rather than two

Measured on a 14,952-game library, 400 random games at six results each:
a cap of two fired on 52% of lists, and each time it swapped a 0.48 match
for a 0.10 one, roughly five times less related. It bought 0.41 more
distinct series than a cap of three.

Three still keeps the tail of a deep franchise off the list, which is what
the cap is for, without discarding a strong match so eagerly. Applied when
serving, so this needs no rebuild.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Sam Dornan
2026-08-10 09:34:28 -05:00
parent 3fe0a21054
commit 022002c4f5

View File

@@ -17,7 +17,14 @@ from typing import Final, TypeVar
from models.rom import Rom
# Neighbours allowed from any one series before the rest are dropped.
MAX_PER_SERIES: Final = 2
#
# Three rather than two, measured on a 14,952-game library over 400 random
# games at six results each. A cap of two fired on 52% of lists and each time
# swapped a 0.48 match for a 0.10 one, roughly five times less related, to buy
# 0.41 more distinct series than a cap of three. Two still leaves the tail of
# a deep franchise unshown, which is the point, without discarding a strong
# match quite so eagerly.
MAX_PER_SERIES: Final = 3
T = TypeVar("T")