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

state_tracker dropping knowledge too soon #251

Open
Wouter1 opened this issue Jan 18, 2021 · 1 comment
Open

state_tracker dropping knowledge too soon #251

Wouter1 opened this issue Jan 18, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Wouter1
Copy link

Wouter1 commented Jan 18, 2021

Describe the bug
The state_tracker forgets too quick that there is some obstacle (a human agent) on the way
It re-routes the planned path, takes one step away from the human, and then turns around and steps again into the human.

To Reproduce
Run patrollingagent together with a humanbot.
Place humanbot at the right corridor somewhere in the narrow pathway.
Bots will run towards human , take 1 step backwards, and then one step forward, never getting around him.
Even with knowledge_decay=0 this remains this way

Expected behavior
remembering the obstacle, especially with knowledge_decay=0, and take a complete detour to reach destination

Additional context
I debugged this.
I think the problem can be localized to line 84 of state_tracker where objects are removed that
should be visible given the known perceptrange for that type of object.

This 'known perceptrange' info is stored in self.sense_capability and contains

{<class 'matrx.objects.agent_body.AgentBody'>: 2, <class 'builder.CollectableBlock'>: 2, '*': inf}

Because HumanAgentBrain is not in this list, it is assumed it should be visible anyway, and since it's not (it's just outside the range after the bot took 1 step back) it's removed.

Maybe the default is set wrong, or maybe this is a bug somewhere else. The sense_capability map is incomplete and the default is wrong in this case.

@Wouter1 Wouter1 added the bug Something isn't working label Jan 18, 2021
@thaije
Copy link
Collaborator

thaije commented Jan 19, 2021

@Wouter1 thanks for notifying on this issue.

@jwaa could you take a look at this issue and #250, as the expert on the state tracker? 😄

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

3 participants