Commit f576120
test(cliffs): exonerate the tile resolver as issue #18's residual
The lava collision rejection (#73) costs 10 real cliffs, and the guess
recorded alongside it was that the Vulcanus tile resolver - ~98.2% on the
19-way tile name - is worse at a lava boundary. Measured now, on the two
committed fixtures, with no Factorio run needed. The guess was wrong in
its premise and right in its conclusion.
The binary lava/not classification, which is the only thing
`tryToAddCliff` reads, is EXACT: 381 oracle positions, 49 lava and 332
not, zero mismatches in either direction. All 7 name errors are
non-lava/non-lava confusions inside one biome family, and the 42
positions sitting directly on a lava boundary are 42/42 correct on the
full name.
It is still off by about a tile, and every real cliff proves it: the game
ran this same rejection and kept the cliff, so it saw no lava in that
box. 10 of the 1400 real cliffs we place contradict us (0.71%), and in
all 10 the offending tile sits at Chebyshev depth 1 inside our own lava.
Depth 1 alone does not discriminate, so the control is region
[1500,1500]'s 173 correct rejections, spread across the whole range (65
at depth 1, 52 deeper than 6).
That rules the resolver out as a cause of the remaining over-placement,
which is why it was worth measuring before reading more of
generateCliffs. An under-calling resolver would leave false positives
next to lava; they are not. Only 4.2% of region [0,0]'s 95 surviving
false positives come within 2 tiles of lava against 7.2% of its matched
true positives - the wrong way round - and elsewhere the bulk (42/62,
20/29) are more than 8 tiles from any lava.
Adds a zero-mismatch pin on the lava classification, with its sensitivity
measured rather than assumed: planted scale factors on lava's probability
show 1.02 and 1.2 pass while 2, 5 and 20 fail, so it guards against a
broken range expression and not against a sub-tile shift. Says so at the
assertion.
No production code changes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013eczw9uoWDfN6Wc6kA7UBY1 parent ff4787b commit f576120
3 files changed
Lines changed: 131 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
219 | 259 | | |
220 | 260 | | |
221 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
129 | 159 | | |
130 | 160 | | |
131 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
52 | 101 | | |
0 commit comments