mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
test: tune canonical live case selection
This commit is contained in:
parent
7d3ce42040
commit
e4fc557aac
2 changed files with 29 additions and 10 deletions
|
|
@ -100,7 +100,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"case_id": "linear-ascend-sprint-mm12-gap5-dy1p0",
|
||||
"case_id": "linear-ascend-sprint-mm12-gap2-dy1p0",
|
||||
"bucket_id": "linear:ascend:sprint:boundary",
|
||||
"family": "linear",
|
||||
"subfamily": "ascend",
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
"difficulty_band": "boundary",
|
||||
"expected_result": "pass",
|
||||
"world_recipe_id": "linear-ascend",
|
||||
"gap_blocks": 5,
|
||||
"gap_blocks": 2,
|
||||
"delta_y": 1.0,
|
||||
"ceiling_height": null,
|
||||
"wall_width": null,
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
"z": 100.5
|
||||
},
|
||||
"goal": {
|
||||
"x": 106.0,
|
||||
"x": 103.0,
|
||||
"y": 81.0,
|
||||
"z": 100.0
|
||||
}
|
||||
|
|
@ -175,7 +175,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"case_id": "linear-descend-sprint-mm12-gap7-dym1p0",
|
||||
"case_id": "linear-descend-sprint-mm12-gap2-dym1p0",
|
||||
"bucket_id": "linear:descend:sprint:boundary",
|
||||
"family": "linear",
|
||||
"subfamily": "descend",
|
||||
|
|
@ -184,7 +184,7 @@
|
|||
"difficulty_band": "boundary",
|
||||
"expected_result": "pass",
|
||||
"world_recipe_id": "linear-descend",
|
||||
"gap_blocks": 7,
|
||||
"gap_blocks": 2,
|
||||
"delta_y": -1.0,
|
||||
"ceiling_height": null,
|
||||
"wall_width": null,
|
||||
|
|
@ -194,7 +194,7 @@
|
|||
"z": 100.5
|
||||
},
|
||||
"goal": {
|
||||
"x": 108.0,
|
||||
"x": 103.0,
|
||||
"y": 79.0,
|
||||
"z": 100.0
|
||||
}
|
||||
|
|
@ -225,7 +225,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"case_id": "linear-flat-sprint-mm12-gap6-dy0p0",
|
||||
"case_id": "linear-flat-sprint-mm12-gap5-dy0p0",
|
||||
"bucket_id": "linear:flat:sprint:boundary",
|
||||
"family": "linear",
|
||||
"subfamily": "flat",
|
||||
|
|
@ -234,7 +234,7 @@
|
|||
"difficulty_band": "boundary",
|
||||
"expected_result": "pass",
|
||||
"world_recipe_id": "linear-flat",
|
||||
"gap_blocks": 6,
|
||||
"gap_blocks": 5,
|
||||
"delta_y": 0.0,
|
||||
"ceiling_height": null,
|
||||
"wall_width": null,
|
||||
|
|
@ -244,7 +244,7 @@
|
|||
"z": 100.5
|
||||
},
|
||||
"goal": {
|
||||
"x": 107.0,
|
||||
"x": 106.0,
|
||||
"y": 80.0,
|
||||
"z": 100.0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,25 @@ def _canonical_goal(case: TheoryCase) -> tuple[dict[str, float], dict[str, float
|
|||
return start, {"x": float(goal_x), "y": 80.0, "z": 100.0}
|
||||
|
||||
|
||||
def _select_boundary_case(
|
||||
family: str,
|
||||
subfamily: str,
|
||||
reachable: list[TheoryCase],
|
||||
) -> TheoryCase:
|
||||
if family == "linear":
|
||||
preferred_gap_by_subfamily = {
|
||||
"flat": 5,
|
||||
"ascend": 2,
|
||||
"descend": 2,
|
||||
}
|
||||
preferred_gap = preferred_gap_by_subfamily.get(subfamily)
|
||||
if preferred_gap is not None:
|
||||
for case in reachable:
|
||||
if case.gap_blocks == preferred_gap:
|
||||
return case
|
||||
return reachable[0]
|
||||
|
||||
|
||||
def build_canonical_live_cases(cases: list[TheoryCase]) -> list[CanonicalLiveCase]:
|
||||
live_candidate_cases = [
|
||||
case
|
||||
|
|
@ -58,7 +77,7 @@ def build_canonical_live_cases(cases: list[TheoryCase]) -> list[CanonicalLiveCas
|
|||
(case for case in reversed(reachable) if (case.margin or 0.0) >= 0.50),
|
||||
reachable[-1],
|
||||
)
|
||||
boundary = reachable[0]
|
||||
boundary = _select_boundary_case(family, subfamily, reachable)
|
||||
selected.append(("easy", easy))
|
||||
if boundary.case_id != easy.case_id:
|
||||
selected.append(("boundary", boundary))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue