Skip to content
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

Bots can deadlock if the MOVE pos is unreachable #66

Open
smilz0 opened this issue Nov 3, 2023 · 1 comment
Open

Bots can deadlock if the MOVE pos is unreachable #66

smilz0 opened this issue Nov 3, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@smilz0
Copy link
Owner

smilz0 commented Nov 3, 2023

If we use an unreachable position in a MOVE command, the bot can get stuck trying to get there forever.
move_hipri_timeout setting is a workaround for this for the high priority moves but the other moves can take longer and we can't really set a proper timeout.
We should find a way to detect when the bot is executing a MOVE command and so detect when these deadlocks occur.
Best would be to prevent the faulty MOVE by having access to any C++ function that tells whether a pos can be really reached by the bot or not (and maybe how long it will take).

At the moment the only way to get a bot out of this deadlock condition is to use the 'lead' order and then cancel it.

@smilz0 smilz0 added the bug Something isn't working label Nov 3, 2023
@smilz0 smilz0 self-assigned this Nov 3, 2023
@smilz0 smilz0 removed their assignment Feb 10, 2024
@Mystik-Spiral
Copy link

Mystik-Spiral commented Sep 10, 2024

@smilz0 This is not a well thought out plan, just a "brainstorm" in case it helps. What if all moves were relatively short, somewhere between 50-100 hammer units, and at the end of each move you evaluate the flow distance to the target. If you are not close enough to the target then move again. Since the distance of each move is constant, you could set a generous timeout to reach the end of the move, and if the timer expires and the bot has not reached the end of the move, then consider the bot stuck or the target unreachable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants