Three of the six DATC deviations were bugs
The illegal/invalid line (6.A.5, 6.D.8). The document separates an order that is impossible in this position from one this position allows that merely did not come off. The first is ignored and its unit is holding like any other; the second means the unit tried to leave and cannot be propped up where it stands. An army sent across water with a fleet on the route and no convoy ordered is the second; the identical order with nobody in the sea at all is the first. Guessing at this once cost four passing cases to buy one. Reading the document cost nothing -- it says so outright, in the note under 6.D.8 and again under 6.D.32. A support that only looked like a hold (6.A.5). "Supports A Yorkshire" and "Supports A Yorkshire - Yorkshire" are the same shape once parsed, and the case turns on the difference: the first holds a unit down, the second supports a move nobody can legally make. The extractor was throwing that away; it now keeps it, and the fixture is regenerated. The head of a cycle (6.F.22). Kruijswijk's resolver guesses that an order fails, sees what follows, then guesses the other way. Only the outermost order in a cycle may do that, because its answer is the one everything else was computed against. This engine let any order that reached the dependency list first declare the cycle its own -- and an inner one takes both guesses with its callers' provisional answers held fixed, gets the same result twice for that reason, and writes it down as settled. The cycle then becomes invisible: the backup rule never runs and Szykman's rule never fires, and the position resolves to whichever of its two consistent readings the search happened to walk into first. It had been doing this on every paradox and getting away with it, because on a first-order paradox both readings agree. Also carried across from the reference algorithm: an order that resolved itself while a nested call was away must not have the guess written over it. Three remain. 6.F.28 and 6.F.29 are sixth-order paradoxes -- the same twenty-six orders with one support between them, and the point of the pair is that the answer swings on it, where this resolver gives both the same answer. 6.G.19 the document itself gives three answers to, calls a little bit pedantic, and advises adjudicators not to offer at all.
This commit is contained in:
+7
-1
@@ -153,8 +153,14 @@ def main() -> int:
|
||||
order = {'type': 'convoy', 'at': at,
|
||||
'from': place(m2.group(2)), 'to': place(m2.group(3))}
|
||||
elif m2 := re.match(r'^(.*?)\s+Supports\s+[AF]\s+(.*?)\s+-\s+(.*)$', rest, re.I):
|
||||
# A destination was written out. Worth keeping even when it
|
||||
# is the mover's own province: "Supports A Yorkshire" and
|
||||
# "Supports A Yorkshire - Yorkshire" come out identically
|
||||
# otherwise, and 6.A.5 turns on the difference between
|
||||
# them -- the first holds a unit down, the second supports
|
||||
# a move nobody can legally make.
|
||||
at = place(m2.group(1))
|
||||
order = {'type': 'support', 'at': at,
|
||||
order = {'type': 'support', 'at': at, 'ofMove': True,
|
||||
'from': place(m2.group(2)), 'to': place(m2.group(3))}
|
||||
elif m2 := re.match(r'^(.*?)\s+Supports\s+[AF]\s+(.*)$', rest, re.I):
|
||||
at = place(m2.group(1))
|
||||
|
||||
Reference in New Issue
Block a user