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

[Exploration] Agents are stuck on closed areas #17

Open
rafaelcaue opened this issue Aug 22, 2019 · 2 comments
Open

[Exploration] Agents are stuck on closed areas #17

rafaelcaue opened this issue Aug 22, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@rafaelcaue
Copy link
Member

If the clear event spawns obstacles and closes the agent, and assuming the area that is closed is bigger than the agent vision, then it is impossible for it to get out.

I don't see any solution for this in the dummy version, unless we start using clear during exploration, however using linked lists it should be possible to solve this problem, using clear only when it is really needed.

@rafaelcaue rafaelcaue added the bug Something isn't working label Aug 22, 2019
@rafaelcaue
Copy link
Member Author

@FabioPapacchini try to think if there is a solve for this problem.

Both strategies that we discussed in the last meeting do not work.
Remember that a plan for figuring out if the agent is stuck would be called whenever we call the exploration plan (once at start, and again every few steps).
So it has to work for agents that are not stuck too.

First, the strategy about picking adjacent blocks until we arrive at the initial block does not work.
For example:
O|O
O|O
A|--
Imagine that all other visible cells are empty. The agent is clearly not stuck, however that algorithm would return that it is stuck, as we can go from one obstacle to the other, without repetition, until arriving at the initial obstacle.

Picking an empty position past an obstacle and planning the path also does not work.
O|--|--|O|O
O|--|O|A|O
O|--|--|--|O
O|O|O|O|O
Here if we pick the empty position at west from the agent, past the obstacle, we can plan a path, however we are still stuck.

@FabioPapacchini
Copy link
Contributor

@FabioPapacchini try to think if there is a solve for this problem.

Both strategies that we discussed in the last meeting do not work.
Remember that a plan for figuring out if the agent is stuck would be called whenever we call the exploration plan (once at start, and again every few steps).
So it has to work for agents that are not stuck too.

First, the strategy about picking adjacent blocks until we arrive at the initial block does not work.
For example:
O|O
O|O
A|--
Imagine that all other visible cells are empty. The agent is clearly not stuck, however that algorithm would return that it is stuck, as we can go from one obstacle to the other, without repetition, until arriving at the initial obstacle.

How about this:

  1. collect coordinates of all empty cells at distance 5 from the agent (e.g., (5,0), (4,1), (3,2), etc.). If no such cell exists the agent is in a closed area.
  2. the agent is in a closed area if there is no path to any of the collected coordinates (strictly speaking we can stop as soon as we find a path to one of the cells found at point 1)

Picking an empty position past an obstacle and planning the path also does not work.
O|--|--|O|O
O|--|O|A|O
O|--|--|--|O
O|O|O|O|O
Here if we pick the empty position at west from the agent, past the obstacle, we can plan a path, however we are still stuck.

Not sure how you are deciding what to clear here. I would use some heuristic so to pick the direction with most empty cells (which could be right if there are more empty cells beyond the obstacle). On the specific example, however, clearing the obstacle on the left should also clear the second obstacle on the left (the center of the clear action should be (-2,0) w.r.t. A).

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