diff --git a/bridge/sds/SdsPathfind.java b/bridge/sds/SdsPathfind.java index c9b1464..6971030 100644 --- a/bridge/sds/SdsPathfind.java +++ b/bridge/sds/SdsPathfind.java @@ -53,17 +53,18 @@ import megamek.common.units.Entity; * *

Bound. An offline fixture, committed once. Nothing dumps during a * match. The cases are given on the command line, and the committed set is in - * {@code sds/match.py}: two boards, three starts each, two facings and two MP - * budgets. Two boards because open ground and heavy forest are the two - * regimes - 6 MP reaches forty-odd hexes on one and ten on the other, and a - * cost model that is wrong shows up in only one of them. Three starts because - * hex geometry in MegaMek is column-parity dependent, so an even column and an - * odd column are different tests, and a start beside an elevation change is a - * third. Two MP budgets because the state set for {@code n} must be a subset - * of the set for {@code n + 1}, which is a property the corpus can be asked - * for directly. Twenty-four cases regenerate in well under a minute and commit - * to about a hundred kilobytes; a whole board's worth of starts would be - * megabytes and would test the same three things. + * {@code sds/match.py}: three boards, three starts each, two facings and two + * MP budgets. Three boards because open ground, heavy forest and water are + * regimes a cost model can be wrong in separately - 6 MP reaches forty-odd + * hexes on the first and ten on the second, and only the third charges for + * depth or refuses a climb. Three starts because hex geometry in MegaMek is + * column-parity dependent, so an even column and an odd column are different + * tests, and a start beside an elevation change is a third. Two MP budgets + * because the state set for {@code n} must be a subset of the set for + * {@code n + 1}, which is a property the corpus can be asked for directly. + * Thirty-six cases regenerate in well under a minute and commit to about a + * hundred kilobytes; a whole board's worth of starts would be megabytes and + * would test the same three things. * *

Output is JSON Lines. A {@code board} line in the wire form * {@link Observation#board(Board)} produces, then one {@code case} line per @@ -198,6 +199,13 @@ public final class SdsPathfind { unit.setFacing(facing); unit.setSecondaryFacing(facing); unit.setElevation(0); + // Elevation is relative to the hex's level, so a Mek wading in water + // stands at minus the depth and not at zero. Placing it at zero leaves + // it at an elevation `isElevationValid` refuses, and every step out of + // the hex - a turn included - comes back illegal, which reads as a + // unit that cannot move rather than as a bad placement. + // `fixElevation` is MegaMek's own repair for exactly this. + unit.fixElevation(); unit.setProne(false); unit.setHullDown(false); unit.setDone(false); diff --git a/crates/sds-core/tests/corpus/pathfind.jsonl b/crates/sds-core/tests/corpus/pathfind.jsonl index 76c492b..aa18602 100644 --- a/crates/sds-core/tests/corpus/pathfind.jsonl +++ b/crates/sds-core/tests/corpus/pathfind.jsonl @@ -24,3 +24,16 @@ {"type":"case","x":2,"y":4,"facing":0,"mp":6,"considered":396,"legal":222,"states":[[0,0,5,6,5,0,"MOVE_WALK"],[0,1,0,6,4,0,"MOVE_WALK"],[0,1,4,6,4,0,"MOVE_WALK"],[0,1,5,5,4,0,"MOVE_WALK"],[0,2,0,5,3,0,"MOVE_WALK"],[0,2,1,6,3,0,"MOVE_WALK"],[0,2,3,6,3,0,"MOVE_WALK"],[0,2,4,5,3,0,"MOVE_WALK"],[0,2,5,4,3,0,"MOVE_WALK"],[0,3,0,5,2,0,"MOVE_WALK"],[0,3,1,6,2,0,"MOVE_WALK"],[0,3,3,6,2,0,"MOVE_WALK"],[0,3,4,5,2,0,"MOVE_WALK"],[0,3,5,4,2,0,"MOVE_WALK"],[0,4,3,6,2,0,"MOVE_WALK"],[0,4,4,5,2,0,"MOVE_WALK"],[0,4,5,6,2,0,"MOVE_WALK"],[0,5,3,6,2,0,"MOVE_WALK"],[0,5,4,5,2,0,"MOVE_WALK"],[0,5,5,6,2,0,"MOVE_WALK"],[1,0,0,6,4,0,"MOVE_WALK"],[1,0,4,6,4,0,"MOVE_WALK"],[1,0,5,5,4,0,"MOVE_WALK"],[1,1,0,5,3,0,"MOVE_WALK"],[1,1,1,6,3,0,"MOVE_WALK"],[1,1,3,6,3,0,"MOVE_WALK"],[1,1,4,5,3,0,"MOVE_WALK"],[1,1,5,4,3,0,"MOVE_WALK"],[1,2,0,4,2,0,"MOVE_WALK"],[1,2,1,5,2,0,"MOVE_WALK"],[1,2,2,6,2,0,"MOVE_WALK"],[1,2,3,5,2,0,"MOVE_WALK"],[1,2,4,4,2,0,"MOVE_WALK"],[1,2,5,3,2,0,"MOVE_WALK"],[1,3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E_WALK"],[4,5,3,6,2,0,"MOVE_WALK"],[5,0,1,6,5,0,"MOVE_WALK"],[5,1,0,6,4,0,"MOVE_WALK"],[5,1,1,5,4,0,"MOVE_WALK"],[5,1,2,6,4,0,"MOVE_WALK"],[5,2,0,6,3,0,"MOVE_WALK"],[5,2,1,5,3,0,"MOVE_WALK"],[5,2,2,6,3,0,"MOVE_WALK"],[5,3,2,6,3,0,"MOVE_WALK"],[5,5,2,6,3,0,"MOVE_WALK"],[6,1,1,6,5,0,"MOVE_WALK"],[6,2,1,6,4,0,"MOVE_WALK"]],"board":"open"} {"type":"case","x":2,"y":4,"facing":1,"mp":4,"considered":99,"legal":43,"states":[[1,2,5,4,2,0,"MOVE_WALK"],[1,3,5,4,1,0,"MOVE_WALK"],[2,1,0,4,3,0,"MOVE_WALK"],[2,2,0,3,2,0,"MOVE_WALK"],[2,2,1,4,2,0,"MOVE_WALK"],[2,2,5,4,2,0,"MOVE_WALK"],[2,3,0,2,1,0,"MOVE_WALK"],[2,3,1,3,1,0,"MOVE_WALK"],[2,3,2,4,1,0,"MOVE_WALK"],[2,3,4,4,1,0,"MOVE_WALK"],[2,3,5,3,1,0,"MOVE_WALK"],[2,4,0,1,0,0,"MOVE_WALK"],[2,4,1,0,0,0,"NONE"],[2,4,2,1,0,0,"MOVE_WALK"],[2,4,3,2,0,0,"MOVE_WALK"],[2,4,4,3,0,0,"MOVE_WALK"],[2,4,5,2,0,0,"MOVE_WALK"],[2,5,3,4,1,0,"MOVE_WALK"],[3,2,0,4,2,0,"MOVE_WALK"],[3,2,1,4,2,0,"MOVE_WALK"],[3,3,0,3,1,0,"MOVE_WALK"],[3,3,1,2,1,0,"MOVE_WALK"],[3,3,2,3,1,0,"MOVE_WALK"],[3,3,3,4,1,0,"MOVE_WALK"],[3,3,5,4,1,0,"MOVE_WALK"],[3,4,1,4,1,0,"MOVE_WALK"],[3,4,2,3,1,0,"MOVE_WALK"],[3,4,3,4,1,0,"MOVE_WALK"],[4,3,0,4,2,0,"MOVE_WALK"],[4,3,1,3,2,0,"MOVE_WALK"],[4,3,2,4,2,0,"MOVE_WALK"],[4,5,2,4,2,0,"MOVE_WALK"],[5,2,1,4,3,0,"MOVE_WALK"]],"board":"open"} {"type":"case","x":2,"y":4,"facing":1,"mp":6,"considered":387,"legal":197,"states":[[0,1,5,6,4,0,"MOVE_WALK"],[0,2,0,6,3,0,"MOVE_WALK"],[0,2,4,6,3,0,"MOVE_WALK"],[0,2,5,5,3,0,"MOVE_WALK"],[0,3,0,6,2,0,"MOVE_WALK"],[0,3,4,6,2,0,"MOVE_WALK"],[0,3,5,5,2,0,"MOVE_WALK"],[0,4,4,6,2,0,"MOVE_WALK"],[0,5,4,6,2,0,"MOVE_WALK"],[1,0,5,6,4,0,"MOVE_WALK"],[1,1,0,6,3,0,"MOVE_WALK"],[1,1,4,6,3,0,"MOVE_WALK"],[1,1,5,5,3,0,"MOVE_WALK"],[1,2,0,5,2,0,"MOVE_WALK"],[1,2,1,6,2,0,"MOVE_WALK"],[1,2,3,6,2,0,"MOVE_WALK"],[1,2,4,5,2,0,"MOVE_WALK"],[1,2,5,4,2,0,"MOVE_WALK"],[1,3,0,5,1,0,"MOVE_WALK"],[1,3,1,6,1,0,"MOVE_WALK"],[1,3,3,6,1,0,"MOVE_WALK"],[1,3,4,5,1,0,"MOVE_WALK"],[1,3,5,4,1,0,"MOVE_WALK"],[1,4,3,6,1,0,"MOVE_WALK"],[1,4,4,5,1,0,"MOVE_WALK"],[1,4,5,6,1,0,"MOVE_WALK"],[2,0,0,5,4,0,"MOVE_WALK"],[2,0,1,6,4,0,"MOVE_WALK"],[2,0,5,6,4,0,"MOVE_WALK"],[2,1,0,4,3,0,"MOVE_WALK"],[2,1,1,5,3,0,"MOVE_WALK"],[2,1,2,6,3,0,"MOVE_WALK"],[2,1,4,6,3,0,"MOVE_WALK"],[2,1,5,5,3,0,"MOVE_WALK"],[2,2,0,3,2,0,"MOVE_WALK"],[2,2,1,4,2,0,"MOVE_WALK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0,"MOVE_WALK"],[6,2,0,6,4,0,"MOVE_WALK"],[6,2,1,5,4,0,"MOVE_WALK"],[6,2,2,6,4,0,"MOVE_WALK"],[6,3,2,6,4,0,"MOVE_WALK"],[6,4,2,6,4,0,"MOVE_WALK"],[6,6,2,6,4,0,"MOVE_WALK"],[7,1,1,6,5,0,"MOVE_WALK"]],"board":"open"} +{"type":"board","width":16,"height":17,"hexes":[{"x":2,"y":0,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":7,"y":0,"level":0,"terrain":{"water":1}},{"x":2,"y":1,"level":0,"terrain":{"woods":2,"foliage_elev":2}},{"x":3,"y":1,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":7,"y":1,"level":0,"terrain":{"water":1}},{"x":8,"y":1,"level":0,"terrain":{"incline_bottom":1}},{"x":9,"y":1,"level":0,"terrain":{"incline_bottom":1}},{"x":2,"y":2,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":5,"y":2,"level":0,"terrain":{"water":1}},{"x":6,"y":2,"level":0,"terrain":{"water":1}},{"x":7,"y":2,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":8,"y":2,"level":1,"terrain":{"incline_top":1}},{"x":9,"y":2,"level":0,"terrain":{"incline_bottom":1}},{"x":5,"y":3,"level":0,"terrain":{"water":1}},{"x":6,"y":3,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":7,"y":3,"level":2,"terrain":{"incline_top":1}},{"x":8,"y":3,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":9,"y":3,"level":0,"terrain":{"incline_bottom":1}},{"x":5,"y":4,"level":0,"terrain":{"water":1}},{"x":6,"y":4,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":7,"y":4,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":8,"y":4,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":9,"y":4,"level":0,"terrain":{"incline_bottom":1}},{"x":6,"y":5,"level":0,"terrain":{"water":1}},{"x":7,"y":5,"level":0,"terrain":{"water":1}},{"x":8,"y":5,"level":0,"terrain":{"woods":2,"foliage_elev":2,"incline_bottom":1}},{"x":9,"y":5,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":6,"y":6,"level":0,"terrain":{"water":1}},{"x":7,"y":6,"level":0,"terrain":{"water":1}},{"x":8,"y":6,"level":0,"terrain":{"water":1}},{"x":9,"y":6,"level":0,"terrain":{"water":1}},{"x":13,"y":6,"level":0,"terrain":{"incline_bottom":1}},{"x":5,"y":7,"level":0,"terrain":{"water":1}},{"x":6,"y":7,"level":0,"terrain":{"water":1}},{"x":7,"y":7,"level":0,"terrain":{"water":2}},{"x":8,"y":7,"level":0,"terrain":{"water":1}},{"x":9,"y":7,"level":0,"terrain":{"water":1}},{"x":10,"y":7,"level":0,"terrain":{"water":1}},{"x":11,"y":7,"level":0,"terrain":{"water":1}},{"x":12,"y":7,"level":0,"terrain":{"incline_bottom":1}},{"x":13,"y":7,"level":1,"terrain":{"incline_top":1}},{"x":14,"y":7,"level":0,"terrain":{"incline_bottom":1}},{"x":5,"y":8,"level":0,"terrain":{"water":1}},{"x":6,"y":8,"level":0,"terrain":{"water":1}},{"x":7,"y":8,"level":0,"terrain":{"water":3}},{"x":8,"y":8,"level":0,"terrain":{"water":3}},{"x":9,"y":8,"level":0,"terrain":{"water":2}},{"x":10,"y":8,"level":0,"terrain":{"water":1}},{"x":11,"y":8,"level":0,"terrain":{"water":1}},{"x":12,"y":8,"level":1,"terrain":{"incline_top":1}},{"x":13,"y":8,"level":1,"terrain":{"incline_top":1}},{"x":14,"y":8,"level":0,"terrain":{"incline_bottom":1}},{"x":3,"y":9,"level":0,"terrain":{"woods":2,"foliage_elev":2}},{"x":4,"y":9,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":5,"y":9,"level":0,"terrain":{"water":1}},{"x":6,"y":9,"level":0,"terrain":{"water":1}},{"x":7,"y":9,"level":0,"terrain":{"water":2}},{"x":8,"y":9,"level":0,"terrain":{"water":3}},{"x":9,"y":9,"level":0,"terrain":{"water":1}},{"x":10,"y":9,"level":0,"terrain":{"water":1}},{"x":11,"y":9,"level":0,"terrain":{"water":1}},{"x":12,"y":9,"level":1,"terrain":{"woods":1,"foliage_elev":2,"incline_top":1}},{"x":13,"y":9,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":14,"y":9,"level":0,"terrain":{"incline_bottom":1}},{"x":15,"y":9,"level":0,"terrain":{"incline_bottom":1}},{"x":3,"y":10,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":4,"y":10,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":5,"y":10,"level":0,"terrain":{"water":1}},{"x":6,"y":10,"level":0,"terrain":{"water":1}},{"x":7,"y":10,"level":0,"terrain":{"water":1}},{"x":8,"y":10,"level":0,"terrain":{"water":1}},{"x":9,"y":10,"level":0,"terrain":{"water":1}},{"x":10,"y":10,"level":0,"terrain":{"water":1}},{"x":11,"y":10,"level":1,"terrain":{"woods":1,"incline_top":1,"incline_bottom":1,"incline_high_bottom":1,"foliage_elev":2}},{"x":12,"y":10,"level":1,"terrain":{"woods":2,"incline_top":1,"incline_bottom":1,"incline_high_bottom":1,"foliage_elev":2}},{"x":13,"y":10,"level":2,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":14,"y":10,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":15,"y":10,"level":0,"terrain":{"incline_bottom":1}},{"x":2,"y":11,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":3,"y":11,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":4,"y":11,"level":0,"terrain":{"woods":2,"foliage_elev":2}},{"x":5,"y":11,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":6,"y":11,"level":0,"terrain":{"water":1}},{"x":7,"y":11,"level":0,"terrain":{"water":1}},{"x":8,"y":11,"level":0,"terrain":{"water":1}},{"x":9,"y":11,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":10,"y":11,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":11,"y":11,"level":2,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":12,"y":11,"level":4,"terrain":{"incline_high_top":1,"incline_top":1}},{"x":13,"y":11,"level":1,"terrain":{"incline_high_bottom":1,"incline_top":1,"incline_bottom":1}},{"x":14,"y":11,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":15,"y":11,"level":0,"terrain":{"incline_bottom":1}},{"x":2,"y":12,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":3,"y":12,"level":0,"terrain":{"woods":2,"foliage_elev":2}},{"x":4,"y":12,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":5,"y":12,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":6,"y":12,"level":0,"terrain":{"woods":1,"foliage_elev":2}},{"x":7,"y":12,"level":0,"terrain":{"incline_bottom":1}},{"x":8,"y":12,"level":1,"terrain":{"incline_top":1}},{"x":9,"y":12,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":10,"y":12,"level":3,"terrain":{"incline_top":1}},{"x":11,"y":12,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":12,"y":12,"level":1,"terrain":{"incline_high_bottom":1,"incline_top":1,"incline_bottom":1}},{"x":13,"y":12,"level":0,"terrain":{"incline_bottom":1}},{"x":14,"y":12,"level":0,"terrain":{"incline_bottom":1}},{"x":8,"y":13,"level":0,"terrain":{"incline_bottom":1}},{"x":9,"y":13,"level":0,"terrain":{"incline_bottom":1}},{"x":10,"y":13,"level":1,"terrain":{"incline_top":1,"incline_bottom":1}},{"x":11,"y":13,"level":0,"terrain":{"incline_bottom":1}},{"x":12,"y":13,"level":0,"terrain":{"incline_bottom":1}},{"x":9,"y":14,"level":0,"terrain":{"incline_bottom":1}},{"x":10,"y":14,"level":1,"terrain":{"incline_top":1}},{"x":11,"y":14,"level":0,"terrain":{"incline_bottom":1}},{"x":10,"y":15,"level":0,"terrain":{"incline_bottom":1}}],"board":"water","scenario":"pathfind-water.mms","unit":"Phoenix Hawk PXH-1","walkMp":6,"runMp":9} +{"type":"case","x":6,"y":7,"facing":0,"mp":4,"considered":60,"legal":28,"states":[[4,6,5,4,2,0,"MOVE_WALK"],[5,6,0,4,1,0,"MOVE_WALK"],[5,6,4,4,1,0,"MOVE_WALK"],[5,6,5,3,1,0,"MOVE_WALK"],[5,7,4,4,1,-1,"MOVE_WALK"],[6,5,0,4,2,-1,"MOVE_WALK"],[6,6,0,2,1,-1,"MOVE_WALK"],[6,6,1,3,1,-1,"MOVE_WALK"],[6,6,2,4,1,-1,"MOVE_WALK"],[6,6,4,4,1,-1,"MOVE_WALK"],[6,6,5,3,1,-1,"MOVE_WALK"],[6,7,0,0,0,-1,"NONE"],[6,7,1,1,0,-1,"MOVE_WALK"],[6,7,2,2,0,-1,"MOVE_WALK"],[6,7,3,3,0,-1,"MOVE_WALK"],[6,7,4,2,0,-1,"MOVE_WALK"],[6,7,5,1,0,-1,"MOVE_WALK"],[7,6,0,4,1,-1,"MOVE_WALK"],[7,6,1,3,1,-1,"MOVE_WALK"],[7,6,2,4,1,-1,"MOVE_WALK"]],"board":"water"} +{"type":"case","x":6,"y":7,"facing":0,"mp":6,"considered":195,"legal":99,"states":[[2,5,5,6,4,0,"MOVE_WALK"],[3,5,0,6,3,0,"MOVE_WALK"],[3,5,4,6,3,0,"MOVE_WALK"],[3,5,5,5,3,0,"MOVE_WALK"],[3,6,4,6,3,0,"MOVE_WALK"],[3,7,4,6,3,0,"MOVE_WALK"],[4,5,0,6,3,0,"MOVE_WALK"],[4,5,5,6,3,0,"MOVE_WALK"],[4,6,0,5,2,0,"MOVE_WALK"],[4,6,1,6,2,0,"MOVE_WALK"],[4,6,3,6,2,0,"MOVE_WALK"],[4,6,4,5,2,0,"MOVE_WALK"],[4,6,5,4,2,0,"MOVE_WALK"],[4,7,3,6,2,0,"MOVE_WALK"],[4,7,4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"],[7,6,1,3,1,-1,"MOVE_WALK"],[7,6,2,4,1,-1,"MOVE_WALK"],[7,6,3,5,1,-1,"MOVE_WALK"],[7,6,4,6,1,-1,"MOVE_WALK"],[7,6,5,5,1,-1,"MOVE_WALK"],[8,6,0,6,2,-1,"MOVE_WALK"],[8,6,1,5,2,-1,"MOVE_WALK"],[8,6,2,6,2,-1,"MOVE_WALK"],[8,7,2,6,2,-1,"MOVE_WALK"]],"board":"water"} +{"type":"case","x":6,"y":7,"facing":1,"mp":4,"considered":51,"legal":25,"states":[[5,6,5,4,1,0,"MOVE_WALK"],[6,6,0,3,1,-1,"MOVE_WALK"],[6,6,1,4,1,-1,"MOVE_WALK"],[6,6,5,4,1,-1,"MOVE_WALK"],[6,7,0,1,0,-1,"MOVE_WALK"],[6,7,1,0,0,-1,"NONE"],[6,7,2,1,0,-1,"MOVE_WALK"],[6,7,3,2,0,-1,"MOVE_WALK"],[6,7,4,3,0,-1,"MOVE_WALK"],[6,7,5,2,0,-1,"MOVE_WALK"],[6,8,3,4,1,-1,"MOVE_WALK"],[7,6,0,3,1,-1,"MOVE_WALK"],[7,6,1,2,1,-1,"MOVE_WALK"],[7,6,2,3,1,-1,"MOVE_WALK"],[7,6,3,4,1,-1,"MOVE_WALK"],[7,6,5,4,1,-1,"MOVE_WALK"],[8,6,1,4,2,-1,"MOVE_WALK"]],"board":"water"} +{"type":"case","x":6,"y":7,"facing":1,"mp":6,"considered":162,"legal":80,"states":[[3,5,5,6,3,0,"MOVE_WALK"],[4,6,0,6,2,0,"MOVE_WALK"],[4,6,4,6,2,0,"MOVE_WALK"],[4,6,5,5,2,0,"MOVE_WALK"],[4,7,4,6,2,0,"MOVE_WALK"],[5,5,0,6,2,0,"MOVE_WALK"],[5,5,5,6,2,0,"MOVE_WALK"],[5,6,0,5,1,0,"MOVE_WALK"],[5,6,1,6,1,0,"MOVE_WALK"],[5,6,3,6,1,0,"MOVE_WALK"],[5,6,4,5,1,0,"MOVE_WALK"],[5,6,5,4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,"MOVE_WALK"],[8,7,3,6,2,-1,"MOVE_WALK"]],"board":"water"} +{"type":"case","x":7,"y":10,"facing":0,"mp":4,"considered":42,"legal":20,"states":[[6,10,0,4,1,-1,"MOVE_WALK"],[6,10,4,4,1,-1,"MOVE_WALK"],[6,10,5,3,1,-1,"MOVE_WALK"],[6,11,4,4,1,-1,"MOVE_WALK"],[7,10,0,0,0,-1,"NONE"],[7,10,1,1,0,-1,"MOVE_WALK"],[7,10,2,2,0,-1,"MOVE_WALK"],[7,10,3,3,0,-1,"MOVE_WALK"],[7,10,4,2,0,-1,"MOVE_WALK"],[7,10,5,1,0,-1,"MOVE_WALK"],[8,10,0,4,1,-1,"MOVE_WALK"],[8,10,1,3,1,-1,"MOVE_WALK"],[8,10,2,4,1,-1,"MOVE_WALK"],[8,11,2,4,1,-1,"MOVE_WALK"]],"board":"water"} +{"type":"case","x":7,"y":10,"facing":0,"mp":6,"considered":129,"legal":63,"states":[[5,9,0,6,2,-1,"MOVE_WALK"],[5,9,4,6,2,-1,"MOVE_WALK"],[5,9,5,5,2,-1,"MOVE_WALK"],[5,10,4,6,2,-1,"MOVE_WALK"],[6,9,0,6,2,-1,"MOVE_WALK"],[6,10,0,4,1,-1,"MOVE_WALK"],[6,10,1,5,1,-1,"MOVE_WALK"],[6,10,2,6,1,-1,"MOVE_WALK"],[6,10,3,5,1,-1,"MOVE_WALK"],[6,10,4,4,1,-1,"MOVE_WALK"],[6,10,5,3,1,-1,"MOVE_WALK"],[6,11,0,6,1,-1,"MOVE_WALK"],[6,11,2,6,1,-1,"MOVE_WALK"],[6,11,3,5,1,-1,"MOVE_WALK"],[6,11,4,4,1,-1,"MOVE_WALK"],[6,11,5,5,1,-1,"MOVE_WALK"],[7,9,0,5,1,-2,"MOVE_WALK"],[7,9,1,6,1,-2,"MOVE_WALK"],[7,9,5,6,1,-2,"MOVE_WALK"],[7,10,0,0,0,-1,"NONE"],[7,10,1,1,0,-1,"MOVE_WALK"],[7,10,2,2,0,-1,"MOVE_WALK"],[7,10,3,3,0,-1,"MOVE_WALK"],[7,10,4,2,0,-1,"MOVE_WALK"],[7,10,5,1,0,-1,"MOVE_WALK"],[7,11,2,6,1,-1,"MOVE_WALK"],[7,11,3,5,1,-1,"MOVE_WALK"],[7,11,4,6,1,-1,"MOVE_WALK"],[8,10,0,4,1,-1,"MOVE_WALK"],[8,10,1,3,1,-1,"MOVE_WALK"],[8,10,2,4,1,-1,"MOVE_WALK"],[8,10,3,5,1,-1,"MOVE_WALK"],[8,10,4,6,1,-1,"MOVE_WALK"],[8,10,5,5,1,-1,"MOVE_WALK"],[8,11,0,6,1,-1,"MOVE_WALK"],[8,11,1,5,1,-1,"MOVE_WALK"],[8,11,2,4,1,-1,"MOVE_WALK"],[8,11,3,5,1,-1,"MOVE_WALK"],[8,11,4,6,1,-1,"MOVE_WALK"],[9,9,0,6,2,-1,"MOVE_WALK"],[9,9,1,5,2,-1,"MOVE_WALK"],[9,9,2,6,2,-1,"MOVE_WALK"],[9,10,2,6,2,-1,"MOVE_WALK"]],"board":"water"} +{"type":"case","x":7,"y":10,"facing":1,"mp":4,"considered":51,"legal":25,"states":[[6,10,5,4,1,-1,"MOVE_WALK"],[7,10,0,1,0,-1,"MOVE_WALK"],[7,10,1,0,0,-1,"NONE"],[7,10,2,1,0,-1,"MOVE_WALK"],[7,10,3,2,0,-1,"MOVE_WALK"],[7,10,4,3,0,-1,"MOVE_WALK"],[7,10,5,2,0,-1,"MOVE_WALK"],[7,11,3,4,1,-1,"MOVE_WALK"],[8,10,0,3,1,-1,"MOVE_WALK"],[8,10,1,2,1,-1,"MOVE_WALK"],[8,10,2,3,1,-1,"MOVE_WALK"],[8,10,3,4,1,-1,"MOVE_WALK"],[8,10,5,4,1,-1,"MOVE_WALK"],[8,11,1,4,1,-1,"MOVE_WALK"],[8,11,2,3,1,-1,"MOVE_WALK"],[8,11,3,4,1,-1,"MOVE_WALK"],[9,9,1,4,2,-1,"MOVE_WALK"]],"board":"water"} +{"type":"case","x":7,"y":10,"facing":1,"mp":6,"considered":132,"legal":70,"states":[[5,9,5,6,2,-1,"MOVE_WALK"],[6,10,0,5,1,-1,"MOVE_WALK"],[6,10,1,6,1,-1,"MOVE_WALK"],[6,10,3,6,1,-1,"MOVE_WALK"],[6,10,4,5,1,-1,"MOVE_WALK"],[6,10,5,4,1,-1,"MOVE_WALK"],[6,11,3,6,1,-1,"MOVE_WALK"],[6,11,4,5,1,-1,"MOVE_WALK"],[6,11,5,6,1,-1,"MOVE_WALK"],[7,9,0,6,1,-2,"MOVE_WALK"],[7,10,0,1,0,-1,"MOVE_WALK"],[7,10,1,0,0,-1,"NONE"],[7,10,2,1,0,-1,"MOVE_WALK"],[7,10,3,2,0,-1,"MOVE_WALK"],[7,10,4,3,0,-1,"MOVE_WALK"],[7,10,5,2,0,-1,"MOVE_WALK"],[7,11,1,6,1,-1,"MOVE_WALK"],[7,11,2,5,1,-1,"MOVE_WALK"],[7,11,3,4,1,-1,"MOVE_WALK"],[7,11,4,5,1,-1,"MOVE_WALK"],[7,11,5,6,1,-1,"MOVE_WALK"],[7,12,3,6,2,0,"MOVE_WALK"],[8,10,0,3,1,-1,"MOVE_WALK"],[8,10,1,2,1,-1,"MOVE_WALK"],[8,10,2,3,1,-1,"MOVE_WALK"],[8,10,3,4,1,-1,"MOVE_WALK"],[8,10,4,5,1,-1,"MOVE_WALK"],[8,10,5,4,1,-1,"MOVE_WALK"],[8,11,0,5,1,-1,"MOVE_WALK"],[8,11,1,4,1,-1,"MOVE_WALK"],[8,11,2,3,1,-1,"MOVE_WALK"],[8,11,3,4,1,-1,"MOVE_WALK"],[8,11,4,5,1,-1,"MOVE_WALK"],[8,11,5,6,1,-1,"MOVE_WALK"],[9,9,0,5,2,-1,"MOVE_WALK"],[9,9,1,4,2,-1,"MOVE_WALK"],[9,9,2,5,2,-1,"MOVE_WALK"],[9,9,3,6,2,-1,"MOVE_WALK"],[9,9,5,6,2,-1,"MOVE_WALK"],[9,10,1,6,2,-1,"MOVE_WALK"],[9,10,2,5,2,-1,"MOVE_WALK"],[9,10,3,6,2,-1,"MOVE_WALK"],[9,11,2,6,2,0,"MOVE_WALK"],[10,9,1,6,3,-1,"MOVE_WALK"]],"board":"water"} +{"type":"case","x":12,"y":12,"facing":0,"mp":4,"considered":66,"legal":30,"states":[[10,13,4,4,2,0,"MOVE_WALK"],[11,11,0,4,1,0,"MOVE_WALK"],[11,11,4,4,1,0,"MOVE_WALK"],[11,11,5,3,1,0,"MOVE_WALK"],[11,12,3,4,1,0,"MOVE_WALK"],[11,12,4,3,1,0,"MOVE_WALK"],[11,12,5,4,1,0,"MOVE_WALK"],[12,12,0,0,0,0,"NONE"],[12,12,1,1,0,0,"MOVE_WALK"],[12,12,2,2,0,0,"MOVE_WALK"],[12,12,3,3,0,0,"MOVE_WALK"],[12,12,4,2,0,0,"MOVE_WALK"],[12,12,5,1,0,0,"MOVE_WALK"],[13,11,0,3,1,0,"MOVE_WALK"],[13,11,1,2,1,0,"MOVE_WALK"],[13,11,2,3,1,0,"MOVE_WALK"],[13,11,3,4,1,0,"MOVE_WALK"],[13,11,5,4,1,0,"MOVE_WALK"],[13,12,2,4,1,0,"MOVE_WALK"],[14,11,0,4,2,0,"MOVE_WALK"],[14,11,1,3,2,0,"MOVE_WALK"],[14,11,2,4,2,0,"MOVE_WALK"]],"board":"water"} +{"type":"case","x":12,"y":12,"facing":0,"mp":6,"considered":213,"legal":106,"states":[[9,12,5,6,3,0,"MOVE_WALK"],[9,13,4,6,3,0,"MOVE_WALK"],[10,11,0,6,2,0,"MOVE_WALK"],[10,11,4,6,2,0,"MOVE_WALK"],[10,11,5,5,2,0,"MOVE_WALK"],[10,12,4,6,2,0,"MOVE_WALK"],[10,13,0,6,2,0,"MOVE_WALK"],[10,13,2,6,2,0,"MOVE_WALK"],[10,13,3,5,2,0,"MOVE_WALK"],[10,13,4,4,2,0,"MOVE_WALK"],[10,13,5,5,2,0,"MOVE_WALK"],[10,14,3,6,3,0,"MOVE_WALK"],[11,11,0,4,1,0,"MOVE_WALK"],[11,11,1,5,1,0,"MOVE_WALK"],[11,11,2,6,1,0,"MOVE_WALK"],[11,11,3,5,1,0,"MOVE_WALK"],[11,11,4,4,1,0,"MOVE_WALK"],[11,11,5,3,1,0,"MOVE_WALK"],[11,12,0,5,1,0,"MOVE_WALK"],[11,12,1,6,1,0,"MOVE_WALK"],[11,12,2,5,1,0,"MOVE_WALK"],[11,12,3,4,1,0,"MOVE_WALK"],[11,12,4,3,1,0,"MOVE_WALK"],[11,12,5,4,1,0,"MOVE_WALK"],[11,13,3,6,2,0,"MOVE_WALK"],[12,12,0,0,0,0,"NONE"],[12,12,1,1,0,0,"MOVE_WALK"],[12,12,2,2,0,0,"MOVE_WALK"],[12,12,3,3,0,0,"MOVE_WALK"],[12,12,4,2,0,0,"MOVE_WALK"],[12,12,5,1,0,0,"MOVE_WALK"],[12,13,2,6,1,0,"MOVE_WALK"],[12,13,3,5,1,0,"MOVE_WALK"],[12,13,4,6,1,0,"MOVE_WALK"],[12,14,3,6,2,0,"MOVE_WALK"],[13,10,0,5,2,0,"MOVE_WALK"],[13,10,1,6,2,0,"MOVE_WALK"],[13,10,5,6,2,0,"MOVE_WALK"],[13,11,0,3,1,0,"MOVE_WALK"],[13,11,1,2,1,0,"MOVE_WALK"],[13,11,2,3,1,0,"MOVE_WALK"],[13,11,3,4,1,0,"MOVE_WALK"],[13,11,4,5,1,0,"MOVE_WALK"],[13,11,5,4,1,0,"MOVE_WALK"],[13,12,0,6,1,0,"MOVE_WALK"],[13,12,1,5,1,0,"MOVE_WALK"],[13,12,2,4,1,0,"MOVE_WALK"],[13,12,3,5,1,0,"MOVE_WALK"],[13,12,4,6,1,0,"MOVE_WALK"],[13,13,3,6,2,0,"MOVE_WALK"],[14,10,0,5,3,0,"MOVE_WALK"],[14,10,1,6,3,0,"MOVE_WALK"],[14,10,5,6,3,0,"MOVE_WALK"],[14,11,0,4,2,0,"MOVE_WALK"],[14,11,1,3,2,0,"MOVE_WALK"],[14,11,2,4,2,0,"MOVE_WALK"],[14,11,3,5,2,0,"MOVE_WALK"],[14,11,4,6,2,0,"MOVE_WALK"],[14,11,5,5,2,0,"MOVE_WALK"],[14,12,1,6,2,0,"MOVE_WALK"],[14,12,2,5,2,0,"MOVE_WALK"],[14,12,3,6,2,0,"MOVE_WALK"],[14,13,1,6,2,0,"MOVE_WALK"],[14,13,2,5,2,0,"MOVE_WALK"],[14,13,3,6,2,0,"MOVE_WALK"],[15,10,0,6,3,0,"MOVE_WALK"],[15,10,1,5,3,0,"MOVE_WALK"],[15,10,2,6,3,0,"MOVE_WALK"],[15,11,2,6,3,0,"MOVE_WALK"],[15,12,2,6,3,0,"MOVE_WALK"],[15,13,2,6,3,0,"MOVE_WALK"]],"board":"water"} +{"type":"case","x":12,"y":12,"facing":1,"mp":4,"considered":84,"legal":41,"states":[[11,11,5,4,1,0,"MOVE_WALK"],[11,12,4,4,1,0,"MOVE_WALK"],[12,12,0,1,0,0,"MOVE_WALK"],[12,12,1,0,0,0,"NONE"],[12,12,2,1,0,0,"MOVE_WALK"],[12,12,3,2,0,0,"MOVE_WALK"],[12,12,4,3,0,0,"MOVE_WALK"],[12,12,5,2,0,0,"MOVE_WALK"],[12,13,3,4,1,0,"MOVE_WALK"],[13,10,0,4,2,0,"MOVE_WALK"],[13,11,0,2,1,0,"MOVE_WALK"],[13,11,1,1,1,0,"MOVE_WALK"],[13,11,2,2,1,0,"MOVE_WALK"],[13,11,3,3,1,0,"MOVE_WALK"],[13,11,4,4,1,0,"MOVE_WALK"],[13,11,5,3,1,0,"MOVE_WALK"],[13,12,1,4,1,0,"MOVE_WALK"],[13,12,2,3,1,0,"MOVE_WALK"],[13,12,3,4,1,0,"MOVE_WALK"],[14,10,0,4,3,0,"MOVE_WALK"],[14,11,0,3,2,0,"MOVE_WALK"],[14,11,1,2,2,0,"MOVE_WALK"],[14,11,2,3,2,0,"MOVE_WALK"],[14,11,3,4,2,0,"MOVE_WALK"],[14,11,5,4,2,0,"MOVE_WALK"],[14,12,2,4,2,0,"MOVE_WALK"],[14,13,2,4,2,0,"MOVE_WALK"],[15,10,1,4,3,0,"MOVE_WALK"]],"board":"water"} +{"type":"case","x":12,"y":12,"facing":1,"mp":6,"considered":273,"legal":143,"states":[[10,11,5,6,2,0,"MOVE_WALK"],[10,13,3,6,2,0,"MOVE_WALK"],[10,13,4,5,2,0,"MOVE_WALK"],[10,13,5,6,2,0,"MOVE_WALK"],[11,11,0,5,1,0,"MOVE_WALK"],[11,11,1,6,1,0,"MOVE_WALK"],[11,11,3,6,1,0,"MOVE_WALK"],[11,11,4,5,1,0,"MOVE_WALK"],[11,11,5,4,1,0,"MOVE_WALK"],[11,12,0,6,1,0,"MOVE_WALK"],[11,12,2,6,1,0,"MOVE_WALK"],[11,12,3,5,1,0,"MOVE_WALK"],[11,12,4,4,1,0,"MOVE_WALK"],[11,12,5,5,1,0,"MOVE_WALK"],[11,13,4,6,2,0,"MOVE_WALK"],[12,12,0,1,0,0,"MOVE_WALK"],[12,12,1,0,0,0,"NONE"],[12,12,2,1,0,0,"MOVE_WALK"],[12,12,3,2,0,0,"MOVE_WALK"],[12,12,4,3,0,0,"MOVE_WALK"],[12,12,5,2,0,0,"MOVE_WALK"],[12,13,1,6,1,0,"MOVE_WALK"],[12,13,2,5,1,0,"MOVE_WALK"],[12,13,3,4,1,0,"MOVE_WALK"],[12,13,4,5,1,0,"MOVE_WALK"],[12,13,5,6,1,0,"MOVE_WALK"],[12,14,2,6,2,0,"MOVE_WALK"],[12,14,3,5,2,0,"MOVE_WALK"],[12,14,4,6,2,0,"MOVE_WALK"],[12,15,3,6,3,0,"MOVE_WALK"],[13,9,0,6,3,0,"MOVE_WALK"],[13,9,5,6,4,0,"MOVE_WALK"],[13,10,0,4,2,0,"MOVE_WALK"],[13,10,1,5,2,0,"MOVE_WALK"],[13,10,2,6,2,0,"MOVE_WALK"],[13,10,4,6,2,0,"MOVE_WALK"],[13,10,5,5,2,0,"MOVE_WALK"],[13,11,0,2,1,0,"MOVE_WALK"],[13,11,1,1,1,0,"MOVE_WALK"],[13,11,2,2,1,0,"MOVE_WALK"],[13,11,3,3,1,0,"MOVE_WALK"],[13,11,4,4,1,0,"MOVE_WALK"],[13,11,5,3,1,0,"MOVE_WALK"],[13,12,0,5,1,0,"MOVE_WALK"],[13,12,1,4,1,0,"MOVE_WALK"],[13,12,2,3,1,0,"MOVE_WALK"],[13,12,3,4,1,0,"MOVE_WALK"],[13,12,4,5,1,0,"MOVE_WALK"],[13,12,5,6,1,0,"MOVE_WALK"],[13,13,2,6,2,0,"MOVE_WALK"],[13,13,3,5,2,0,"MOVE_WALK"],[13,13,4,6,2,0,"MOVE_WALK"],[13,14,3,6,3,0,"MOVE_WALK"],[14,9,0,6,4,0,"MOVE_WALK"],[14,10,0,4,3,0,"MOVE_WALK"],[14,10,1,5,3,0,"MOVE_WALK"],[14,10,2,6,3,0,"MOVE_WALK"],[14,10,4,6,3,0,"MOVE_WALK"],[14,10,5,5,3,0,"MOVE_WALK"],[14,11,0,3,2,0,"MOVE_WALK"],[14,11,1,2,2,0,"MOVE_WALK"],[14,11,2,3,2,0,"MOVE_WALK"],[14,11,3,4,2,0,"MOVE_WALK"],[14,11,4,5,2,0,"MOVE_WALK"],[14,11,5,4,2,0,"MOVE_WALK"],[14,12,0,6,2,0,"MOVE_WALK"],[14,12,1,5,2,0,"MOVE_WALK"],[14,12,2,4,2,0,"MOVE_WALK"],[14,12,3,5,2,0,"MOVE_WALK"],[14,12,4,6,2,0,"MOVE_WALK"],[14,13,0,6,2,0,"MOVE_WALK"],[14,13,1,5,2,0,"MOVE_WALK"],[14,13,2,4,2,0,"MOVE_WALK"],[14,13,3,5,2,0,"MOVE_WALK"],[14,13,4,6,2,0,"MOVE_WALK"],[14,14,3,6,3,0,"MOVE_WALK"],[15,9,0,6,4,0,"MOVE_WALK"],[15,10,0,5,3,0,"MOVE_WALK"],[15,10,1,4,3,0,"MOVE_WALK"],[15,10,2,5,3,0,"MOVE_WALK"],[15,10,3,6,3,0,"MOVE_WALK"],[15,10,5,6,3,0,"MOVE_WALK"],[15,11,1,6,3,0,"MOVE_WALK"],[15,11,2,5,3,0,"MOVE_WALK"],[15,11,3,6,3,0,"MOVE_WALK"],[15,12,1,6,3,0,"MOVE_WALK"],[15,12,2,5,3,0,"MOVE_WALK"],[15,12,3,6,3,0,"MOVE_WALK"],[15,13,1,6,3,0,"MOVE_WALK"],[15,13,2,5,3,0,"MOVE_WALK"],[15,13,3,6,3,0,"MOVE_WALK"]],"board":"water"} diff --git a/crates/sds-core/tests/pathfind_corpus.rs b/crates/sds-core/tests/pathfind_corpus.rs index 3ed3046..1be57de 100644 --- a/crates/sds-core/tests/pathfind_corpus.rs +++ b/crates/sds-core/tests/pathfind_corpus.rs @@ -11,9 +11,8 @@ //! It is an offline fixture, committed once, the way the line of sight corpus //! and the hit tables are. Nothing dumps during a match. //! -//! The differential test - our reachable state set equals MegaMek's - belongs -//! with the reachability search, which does not exist yet. What is here is the -//! corpus's own contract: that it covers the cases it claims to, that it is +//! The differential test - our reachable state set equals MegaMek's - is in +//! `pathfind_differential.rs`. What is here is the corpus's own contract: that it covers the cases it claims to, that it is //! internally consistent, and that it is written in an order that does not //! depend on the heap. A corpus that quietly lost half its cases would //! otherwise still let the differential test pass. @@ -93,13 +92,13 @@ fn the_corpus_covers_the_cases_worth_testing() { assert_eq!( boards.keys().collect::>(), - vec!["forest", "open"], - "one open board and one heavily wooded one" + vec!["forest", "open", "water"], + "open ground, heavy forest, and a lake with a spur beside it" ); assert_eq!( cases.len(), - 24, - "two boards, three starts, two facings, two budgets" + 36, + "three boards, three starts, two facings, two budgets" ); for board in boards.values() { @@ -124,7 +123,7 @@ fn the_corpus_covers_the_cases_worth_testing() { ); assert_eq!(relief("open"), 0, "the open board is flat"); - for board in ["open", "forest"] { + for board in ["open", "forest", "water"] { let starts: BTreeSet<(i32, i32)> = cases .iter() .filter(|case| case.board == board) @@ -281,7 +280,7 @@ fn a_bigger_budget_only_adds() { compared += 1; } assert_eq!( - compared, 12, + compared, 18, "every start and facing compared at both budgets" ); } diff --git a/scenarios/pathfind-water.mms b/scenarios/pathfind-water.mms new file mode 100644 index 0000000..2e98011 --- /dev/null +++ b/scenarios/pathfind-water.mms @@ -0,0 +1,27 @@ +# A board and one machine, for the movement corpus. Not a benchmark. +# +# The third board, and the reason it is here: neither pathfind-open nor +# pathfind-forest carries a drop of water, and no two adjacent hexes on either +# differ by more than two levels. So the differential test confirmed the woods +# and level-change arms of the cost model and left two rules untested - the +# double charge for water, once for the depth and once for the lower floor, and +# the refusal of a climb or a drop of more than two levels. +# +# `Map Set 2/16x17 Lake Area` closes both in one board: 42 water hexes at +# depths one, two and three, and a level 4 spike beside level 1 ground. +# +# Not a match board. It is never played on, only walked over. +# +# MegaMek Data (C) 2025 by The MegaMek Team is licensed under CC BY-NC-SA 4.0. +# https://creativecommons.org/licenses/by-nc-sa/4.0/ +MMSVersion=1 +Name=pathfind-water +Description=A lake and a spur. The water and steep-ground movement corpus fixture. +BoardWidth=1 +BoardHeight=1 +Maps=Map Set 2/16x17 Lake Area +Factions=North,South +Location_North=N +Location_South=S +Unit_North_1=Phoenix Hawk PXH-1,North 1,4,5 +Unit_South_1=Phoenix Hawk PXH-1,South 1,4,5 diff --git a/sds/match.py b/sds/match.py index 0bb9f57..0760e94 100644 --- a/sds/match.py +++ b/sds/match.py @@ -333,10 +333,10 @@ def los_dump(scenarios: list[Path], out: Path, cases: int = 600) -> int: # The committed movement cases: board, start, facing, MP budget. # -# Two boards because open ground and heavy forest are the two regimes a cost -# model can be wrong in separately. Three starts each because MegaMek's hex -# geometry is column-parity dependent, so an even column and an odd one are -# different tests, and a start on a hillside is a third. Two MP budgets because +# Three boards because open ground, heavy forest and water-with-cliffs are +# regimes a cost model can be wrong in separately. Three starts each because +# MegaMek's hex geometry is column-parity dependent, so an even column and an +# odd one are different tests, and a start on a hillside is a third. Two MP budgets because # the state set for 4 must be a subset of the set for 6, which is a property # the corpus can be asked for directly rather than argued. # @@ -345,6 +345,7 @@ def los_dump(scenarios: list[Path], out: Path, cases: int = 600) -> int: PATHFIND_BOARDS = { "open": REPO / "scenarios" / "pathfind-open.mms", "forest": REPO / "scenarios" / "pathfind-forest.mms", + "water": REPO / "scenarios" / "pathfind-water.mms", } PATHFIND_STARTS = { @@ -354,6 +355,13 @@ PATHFIND_STARTS = { # The hilltop, where every neighbour is an elevation change, on an even # column and then an odd one, plus flat heavy forest away from it. "forest": [(6, 5), (7, 5), (4, 8)], + # Two starts standing in the lake, on an even column and then an odd one, + # where the neighbours run from dry ground to depth three - water is + # charged twice, once for the depth and once for the floor being lower, so + # a start in it tests both directions. The third is beside the level 4 + # spur, whose neighbours are three levels below it and so cannot be + # climbed at all. + "water": [(6, 7), (7, 10), (12, 12)], } PATHFIND_FACINGS = (0, 1)