-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pathfinding command #1523
Pathfinding command #1523
Conversation
3e2002a
to
6404d7a
Compare
f07a66a
to
d59335f
Compare
2cfc025
to
7483350
Compare
7483350
to
d383cec
Compare
data/scenarios/Testing/836-pathfinding/836-automatic-waypoint-navigation.yaml
Outdated
Show resolved
Hide resolved
data/scenarios/Testing/836-pathfinding/836-automatic-waypoint-navigation.yaml
Show resolved
Hide resolved
data/scenarios/Testing/836-pathfinding/836-automatic-waypoint-navigation.yaml
Outdated
Show resolved
Hide resolved
@kostmo could you please test this on the sheep challenge? I would be interested to know how this performs. Also based on the signature it returns just the first step direction right? I guess the intent is to check for existence of a path, but won't that be too slow with repeated calls? I apologise if those questions are answered in code somewhere, I am in mountains on my phone. Either way it would be nice to have some more info in the PR description. |
d383cec
to
ce2e396
Compare
-- = Design considerations | ||
-- One possible design of the @path@ command entailed storing a computed | ||
-- shortest path and providing a mechanism to retrieve parts of it later | ||
-- without recomputing the whole thing. | ||
-- However, in general the playfield can be dynamic and obstructions may | ||
-- appear that invalidate a given computed shortest path. | ||
-- Therefore, there can be limited value in caching a computed path for use | ||
-- across ticks. | ||
-- | ||
-- Instead, in the current implementation a complete path is computed | ||
-- internally upon invoking the @path@ command, and just the direction of the | ||
-- first "move" along that path is returned as a result to the caller. | ||
-- | ||
-- == Max distance | ||
-- | ||
-- We allow the caller to supply a max distance, but also impose an internal maximum | ||
-- distance to prevent programming errors from irrecoverably freezing the game. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI some design rationale
Done: #1537
Empirically, it seems to be fine. More rationale is here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sheep challenge simplification looks great! 👍
* allow per-robot specifying certain entities as unwalkable * add test * Use 'path' command to check goal in sheep scenario (#1537)
Closes #836
Tests
Demo