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

custom unwalkable entities #1536

Merged
merged 3 commits into from
Sep 19, 2023

Conversation

kostmo
Copy link
Member

@kostmo kostmo commented Sep 17, 2023

Builds upon #1523 (merge that one first)

Allows specifying certain entities as unwalkable on a per-robot basis.

Motivation

For #835, custom pathfinding logic was implemented entirely in swarm-lang. This logic used the blocked command to test for fence enclosure, while also special-casing an entity called "gate". The "gate" entity is defined as walkable, but the sheep robot program is hard-coded not to be able to walk through a "gate".

This new robot property will facilitate use of the new path command while differentiating

@kostmo kostmo force-pushed the feature/custom-unwalkable-entities branch from be55b76 to 915e12e Compare September 18, 2023 00:15
@kostmo kostmo changed the base branch from main to feature/pathfinding September 18, 2023 00:17
@kostmo kostmo changed the title Feature/custom unwalkable entities custom unwalkable entities Sep 18, 2023
@kostmo kostmo marked this pull request as ready for review September 19, 2023 05:17
@kostmo kostmo merged commit a0c061d into feature/pathfinding Sep 19, 2023
2 checks passed
@mergify mergify bot deleted the feature/custom-unwalkable-entities branch September 19, 2023 05:18
mergify bot pushed a commit that referenced this pull request Mar 10, 2024
A walkability "blacklist" had already been implemented in #1536.  The whitelist shall **only** permit walking on the specified entities; blank cells become unwalkable.

This feature would allow use of the `path` command to check for "connectivity" by way of a "trail" of entities.

## Use cases

* system robots or goal conditions can use this to check whether the player has connected two points with a road, cable, aqueduct, etc.
* monkeys, which can only move along `tree`s
* sea life, which should only be able to move in `water`

## Testing

    scripts/run-tests.sh --test-arguments '--pattern "walkable-entities"'
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.

1 participant