Enemies kept hitting walls, so we made turns smarter

The enemy pilots in Wreckwing kept bumping into buildings, most of all in narrow streets. An earlier post covered the first fixes and left a target of 1.5 bumps per ship-minute. Since then two more attempts made bumping worse, traces of single bumps found the cause, and a change to how pilots turn at corners brought the rate down.
The block arena is a test arena of city blocks, run as 16 duels of 150 seconds. The tight cities are two narrow-street cities, run as 12 duels of 90 seconds each. The pilots are scripted and fly against each other. The last post’s figures, about 1 in the block arena and 3.2 in the tight city, were measured before the pilots gained new moves such as boosting and tailing on October 11. The baselines below were measured after those moves: 1.56 in the block arena and 3.08 across the two tight cities.
Two tries that made it worse
The first try was a detour. When the way to its steer point was too narrow for the hull, the pilot took the nearest open heading. With 30° steps between headings and 40 m of clear space required, the block arena rate rose from 1.56 to 2.05. In a 20 m street with the goal off to one side, no heading had 40 m free, so the pilot picked a slanted one and flew into a facade. A version with 15° steps measured 1.59, no gain.
The second try was context steering. The pilot scored 16 candidate headings by room and by how well each pointed at the goal, then flew the best. The block arena rate rose from 1.56 to 3.78, and the bump rate in the maneuver test duels went from 3.0 to 4.8 a minute. Reading the code turned up no mistake.
We removed both and changed method to looking at single bumps.
What the bumps showed
Alongside the first try, a diagnosis ran 12 duels of 90 seconds in each tight city and sorted each bump by the direction the ship lost speed in.
| City 66523 | City 60250 | |
|---|---|---|
| Wall bumps per ship-minute | 3.33 | 2.81 |
| Struck front / side / bottom / other | 72 / 22 / 3 / 6 | 59 / 17 / 3 / 0 |
| Last steer point was behind a wall | 72 of 103 | 48 of 79 |
Three of 103 and three of 79 bumps struck the bottom of the hull. The earlier post suspected that low roofs slip under the pilot’s rays and catch the hull. The numbers do not support that, so we dropped it as the main cause. Most bumps were nose first, from a pilot steering for a point with a building in front of it.
For the block arena we then printed the two seconds before each of 12 bumps, one decision at a time. In 11, the pilot was not attacking and was turning for a point down a side street. It began the turn while the whisker on that side, one of its distance rays, read 8 to 12 m. Over the last half second the reading fell to 1 to 4 m as the hull swung toward the wall, and the diagonal whisker saw the corner only at the last decision. The pilot cut the corner.
The change
A pilot that is not attacking, is moving faster than 8 m/s and has more than 15 m free ahead now keeps its turn toward a side to at most 0.15 radians (about 9°) while a wall on that side is within 7 m. It does this only at a corner, where the other side is open past 7 m. Without that condition the rule held a pilot in the dead-end test for 6.2 seconds against a limit of 5. With it, 3.8 seconds.
“Held” below is the share of flying time a ship spends within 6 m of one spot for 3 seconds or more, not counting holds while attacking, in per mille (36 per mille is 3.6%).
| Block arena, bumps per ship-minute | Tight cities, bumps per ship-minute | Tight cities, held per mille | |
|---|---|---|---|
| Before | 1.56 | 3.08 | 51 |
| Wall within 10 m | 0.32 | 2.47 | 64 |
| Wall within 7 m | 1.02 | 2.67 | 44 |
| 7 m, corners only (built) | 1.02 | 2.84 | 36 |
The 10 m version had lower bump rates and held pilots in place more, so we built the 7 m version with the corners-only condition.
Where it stands
The block arena is at 1.02, under the 1.5 target. The tight cities are at 2.84, well above it.
Most bumps left in the tight cities are noses into facades while a pilot repositions or pursues toward a point behind a block. Later on October 11 we added the next step from the research notes. Each city builds a graph of its streets on load, and a pilot pursuing or repositioning, whose straight line to its goal runs through a building, follows the streets instead. In 12 duels per tight city, graph off and then on, wall bumps fell from 2.84 to 2.27, still above 1.5, and held time went from 36 to 37 per mille.
About half of the remaining bumps come with nothing under 20 m on the two center-line rays. A look-ahead as wide as the hull, part of the research plan, is still unbuilt. We have not yet judged any of this in play.
How this post was made
- Drafted by
- A Claude Code session in the trilithon.games repository, October 11, 2026, working from the game's changelog, docs and tracker.
- What it did
- Drafted this post from the game's changelog, the pilot-avoidance research notes and the commit messages, and checked each number against them.
- Reviewed by
- Alex van Rossum,
On the roadmap: The run: a ladder of cities
Linear MIP2-490commits 0850951, 62c1a2d, bc9ea91