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

Add optional goal compass #84

Closed
aishwd94 opened this issue Apr 5, 2020 · 2 comments
Closed

Add optional goal compass #84

aishwd94 opened this issue Apr 5, 2020 · 2 comments

Comments

@aishwd94
Copy link
Contributor

aishwd94 commented Apr 5, 2020

An optional observation variable that points to the direction of the first goal rather than the orientation of the agent. The observable image in itself provides very little information for the agent to advance ( even if a human looked at the partially observable grid, they would have to rely on mere random guessing ). This need for the agent to take arbitrary steps to discover the grid further could be removed.
The direction can be simply the tan inverse of the difference of goal and current position:
dir_radians = numpy.arctan( (goal[1] - agent_pos[1]) / (goal[0] - agent_pos[0]) )

@maximecb
Copy link
Contributor

maximecb commented Apr 5, 2020

Hi @minuteman1911

I think the cleanest way to do this might be to create an ObservationWrapper that adds this information to the info object.

There are already a few wrappers implemented in wrappers.py. If you'd like to implement this, I will accept a pull request.

@aishwd94
Copy link
Contributor Author

aishwd94 commented Apr 8, 2020

Hi,
Thank you for your response! I'll submit a pull request.

@aishwd94 aishwd94 closed this as completed Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants