Repository navigation
Re-path when a bot lands below its path - #2185
Merged
sunzenshen merged 2 commits intoOct 3, 2026
Merged
Conversation
sunzenshen
force-pushed
the
bot-repath-after-fall
branch
from
October 1, 2026 05:30
66341da to
a0f9ef7
Compare
sunzenshen
force-pushed
the
bot-repath-after-fall
branch
from
October 1, 2026 05:34
a0f9ef7 to
6f0a02d
Compare
sunzenshen
marked this pull request as ready for review
October 1, 2026 05:34
sunzenshen
added a commit
to sunzenshen/neo
that referenced
this pull request
Oct 1, 2026
…the research branch
A bot that falls where the nav mesh does not reach, such as the trench under ntre_vtol_ctg's walkways, keeps the area it fell from as its last known area: UpdateLastKnownArea() finds no area within 50 u of its feet. A re-path then starts from that area and rebuilds the path the bot just fell off, so the landing check fired again on every landing, up to 180 times a match for one bot. The landing re-path now needs a nav area within the same 50 u of the bot's feet. Off the mesh the bot keeps its path and the stuck monitor handles it, as it did before the landing check.
This was referenced Oct 3, 2026
sunzenshen
added a commit
to sunzenshen/neo
that referenced
this pull request
Oct 7, 2026
Upstream's re-path on landing (NeotokyoRebuild#2185) defines LANDING_NAV_AREA_RANGE near the top of NextBotPathFollow.cpp with the same value, so the research block's own definition no longer compiles.
sunzenshen
added a commit
to sunzenshen/neo
that referenced
this pull request
Oct 8, 2026
Upstream's re-path on landing (NeotokyoRebuild#2185) defines LANDING_NAV_AREA_RANGE near the top of NextBotPathFollow.cpp with the same value, so the research block's own definition no longer compiles.
sunzenshen
added a commit
to sunzenshen/neo
that referenced
this pull request
Oct 8, 2026
Upstream's re-path on landing (NeotokyoRebuild#2185) defines LANDING_NAV_AREA_RANGE near the top of NextBotPathFollow.cpp with the same value, so the research block's own definition no longer compiles.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Re-path when a bot lands below its path
When a bot walks or is pushed off a ledge its path does not drop from, it lands below the path and keeps following it. The stock fell-off check in
PathFollower::Updateonly fires when the goal is more than a maximum jump height above the bot's feet, and only once the bot is stuck or within 25 u of that goal. Below a lower ledge the bot therefore walks towards a goal on the floor above it, pressing into whatever is in the way, until the stuck monitor fires several seconds later.ntre_transit_ctgshows this every round. The walkway beside the west track is 41 u wide with a 40 u drop to the track bed. Bots step off it three to four times a match, keep the path along the walkway, and some walk along the track bed into the V between the walkway and the parked pilot car's nose, where they stand until OnStuck.The path follower now remembers whether the bot was on the ground. On the tick the bot lands, if
the follower reports
FAIL_FELL_OFFand invalidates the path, as the stock fell-off check does. The behaviors already re-path on that failure, now from where the bot actually is.The last condition is the second commit. A bot that falls where the nav mesh does not reach keeps the area it fell from as its last known area, because
UpdateLastKnownArea()finds no area within 50 u of its feet. A re-path from there rebuilds the path it just fell off, so without the condition the check fired again on every landing: onntre_vtol_ctga bot in the unmeshed trench under the walkways fired it up to 180 times a match. Off the mesh the bot now keeps its path and the stuck monitor handles it, as before this change.Evidence
Upstream master (at #2168) with this change, neo#2176 (draft) and harness logging (a line each time the new check fires), and a test-only switch that turns the check off. 30 bots, default weapon damage. CTG: 2 rounds of 3 minutes with the ghost pinned at each ghost spawn in turn. Both arms of each pair run in the same 8-wide batch. Every match reached match end with 0 asserts. "Stuck" is
OnStuckplusFAIL_STUCKmove failures, without the round-start spawn crowd and the weapon-scavenging behavior.ntre_transit_ctg, master navmesh, 55 pairs (three batches):FAIL_NO_PATH_EXISTSFAIL_FELL_OFFfailures go from 0.5 to 4.9 a match: the new check reports each re-path that way. Besides the pilot car, the side landings of the east ladder's top and the passage by the south glass pane lose stuck events too.With #2176's behavior switched off (stock ladder code), 15 pairs: x0.73 [0.57, 0.92], 9 down / 5 up; pilot car 3.6 -> 0.1 a match.
On transit with its reworked navmesh (the companion NeotokyoRebuild/neoAssets#145), 20 pairs: x0.96 [0.61, 1.54], pilot car 4.5 -> 0.25 a match; the rework already removes most of the other stuck spots. Over every transit batch (master and five candidate meshes, 195 pairs): x0.83 [0.75, 0.91], 118 down / 69 up.
Other maps, master navmeshes (bullet: the navmesh of its open PR), 77 pairs: stuck x0.89 [0.76, 1.07], 48 down / 25 up; kills 57.9 -> 56.8 a match; fall deaths 0.23 -> 0.16.
ntre_rogue_ctgntre_tarmac_ctgntre_terminal_jgrntre_saitama_ctgntre_oilstain_ctgntre_subsurface_ctgntre_bullet_tdmOn
ntre_rogue_ctgplayer kills went from 43.8 to 40.6 a match (26 pairs, difference -3.2 [-5.9, -0.5]); round outcomes did not move (40 rounds an arm: 7 against 8 ghost captures, no timeouts), and kills by its turret stayed at 6.7-6.8 a match. The other maps show no kill change.Off the nav mesh (second commit)
Upstream master (at #2181) with neo#2176, neo#2186, this PR and harness logging (a line each time the second commit turns a landing away), and a test-only switch for each commit. 30 bots, default weapon damage, 16 wide; for each pin the three arms run back to back. 102 triples on seven maps, 306 matches, every one to match end with 0 asserts.
ntre_vtol_ctgFAIL_FELL_OFF(16 matches an arm)ntre_vtol_ctglandings turned awayntre_transit_ctgstuck at the pilot car (15 matches an arm)ntre_transit_ctglandings turned awayFAIL_FELL_OFFAgainst the first commit alone, stuck is x0.90 [0.74, 1.09] (56 pairs down / 43 up); against stock, x0.78 [0.64, 0.96] (first commit alone x0.87 [0.71, 1.08]). On the other five maps (
ntre_saitama_ctg,ntre_rogue_ctg,ntre_ghost_ctg,ntre_sentinel_ctg,ntre_bullet_tdm) the second commit turned away 0 to 0.4 landings a match. In a cross-map check of 29 maps (446 pairs; this PR, neo#2176 and neo#2186 together against stock), no map's stuck rose in a repeat batch.Cost
One
IsOnGround()call and a comparison per path update, to track the ground state. The path-area scan, the closest-point search and the nearby-area search run only on the tick a bot lands below its path.Toolchain
Linked Issues