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

GridWorld.grid uses a (y, x) coordinate system while all the object.location parameters of objects return (x, y) tuples #332

Open
noopynolife opened this issue Jun 13, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@noopynolife
Copy link

Describe the bug
GridWorld.grid uses a (y, x) coordinate system while all the object.location parameters of objects in Matrx return (x, y) tuples.

To Reproduce
Perform a object_ids = Grid_world.grid[obj.location] call on an env_object obj where obj.location[0] != obj.location[1].

On inspection, object_ids will not include the env_object obj, because we effectively asked the grid_world to search (obj.location[1], obj.location[0]).

Expected behavior
It is expected that Grid_world.grid[obj.location] shows all object_ids that are registered at the location of the object.

Additional context
@thaije suggested I use search the State object instead, which I'll happily do, though that does not address the counterintuitive coordinate system of .grid

@noopynolife noopynolife added the bug Something isn't working label Jun 13, 2023
@thaije thaije changed the title Matr GridWorld.grid uses a (y, x) coordinate system while all the object.location parameters of objects in Matrx return (x, y) tuples Feb 21, 2024
@thaije thaije changed the title GridWorld.grid uses a (y, x) coordinate system while all the object.location parameters of objects in Matrx return (x, y) tuples GridWorld.grid uses a (y, x) coordinate system while all the object.location parameters of objects return (x, y) tuples Feb 21, 2024
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

1 participant