Answer architecture round 2: fail a place naming no dimension, keep a ratchet until a ruling follows, leave the base on a fall-called run, let record-scoring say whether the floor blocks, and name the missing dimension in a discounted vote

This commit is contained in:
2026-10-09 11:04:01 +02:00
parent 75b0e46326
commit 9de87e04cf
8 changed files with 95 additions and 56 deletions
+7 -5
View File
@@ -115,14 +115,16 @@ def appended(history: str, entry: str) -> str:
def ruling_entry(title: str, seats: list[Seat], said: dict[str, list[str]], counted: dict[str, list[str]], ruled: str, fell: list[str]) -> str:
"""A paired ruling's entry, with a `Fell:` line when it is better or same and fell names dimensions; a seat's vote that counted as same for naming no place says so."""
votes = [[seat.name, *map(vote_text, said[seat.name], counted[seat.name])] for seat in seats]
lines = [f"Ruling: {ruled}"] + ([f"Fell: {', '.join(fell)}"] if ruled != "worse" and fell else [])
"""A paired ruling's entry, with a `Fell:` line when fell names dimensions; a seat's vote that counted as same for want of a place says so."""
votes = [[seat.name, *map(vote_text, DIMENSIONS, said[seat.name], counted[seat.name])] for seat in seats]
lines = [f"Ruling: {ruled}"] + ([f"Fell: {', '.join(fell)}"] if fell else [])
return entry_text(title, lines, [["Seat", *DIMENSIONS], *votes], [(f"{seat.name}, {DECIDED_BY}:", seat.places) for seat in seats])
def vote_text(said: str, counted: str) -> str:
return counted if counted == said else f"same (voted {said}, naming no place)"
def vote_text(dimension: str, said: str, counted: str) -> str:
if counted == said:
return counted
return f"same (voted {said}, naming no place)" if dimension == DIMENSIONS[-1] else f"same (voted {said}, no place naming {dimension})"
def scoring_entry(title: str, seats: list[Seat], scores: dict[str, list[str]], means: list[str], lines: list[str]) -> str: