Skip to content
This repository was archived by the owner on Jul 27, 2021. It is now read-only.

WIP: proof of concept for a collaboration wrapper on behavior#41

Open
mike-anderson wants to merge 5 commits into
masterfrom
snake_cooperation
Open

WIP: proof of concept for a collaboration wrapper on behavior#41
mike-anderson wants to merge 5 commits into
masterfrom
snake_cooperation

Conversation

@mike-anderson

Copy link
Copy Markdown
Contributor

No description provided.

@mike-anderson mike-anderson changed the title WIP proof of concept for a collaboration wrapper on behavior proof of concept for a collaboration wrapper on behavior Mar 8, 2020
@mike-anderson mike-anderson changed the title proof of concept for a collaboration wrapper on behavior WIP: proof of concept for a collaboration wrapper on behavior Mar 8, 2020
@mike-anderson

Copy link
Copy Markdown
Contributor Author

The way this works now is by ordering the partner snakes by ID (since in theory each snake is given a unique orderable ID)

the collaborate function takes the pathfinding grid and runs each snake that comes before the acting snake to determine their decision.

as a result, each snake takes its decision in order and there should be no chance of a collision on any collaborated move as the previous snakes in the order will mark their decision as unwalkable for the next snakes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant