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

Fix bot sometimes hanging when trying to pathfind to a warp #627

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

hanzi
Copy link
Collaborator

@hanzi hanzi commented Jan 16, 2025

Description

In order to teach the bot to not 'accidentally' step on warping tiles, I have added an artifical cost to these tiles.

But that also means that if we specifically tell the bot to pathfind towards a warp, the route would appear very expensive and the bot would keep looking for alternative ways that are cheaper.

Depending on the map and the situation, this might mean that the bot would try to check every conceivable path on the world map before accepting the route.

Checklist

  • Black Linter has been ran, using --line-length 120 argument
  • Wiki has been updated (if relevant)

In order to teach the bot to not 'accidentally' step on warping tiles, I have added an artifical cost to these tiles.

But that also means that if we specifically _tell_ the bot to pathfind towards a warp, the route would appear very expensive and the bot would keep looking for alternative ways that are cheaper.

Depending on the map and the situation, this might mean that the bot would try to check every conceivable path on the world map before accepting the route.
@hanzi hanzi merged commit 9e6ecf2 into 40Cakes:main Jan 16, 2025
1 check passed
@hanzi hanzi deleted the pathing-to-warps branch January 16, 2025 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants