eugenevinitsky / sequential_social_dilemma_games

Repo for reproduction of sequential social dilemmas
MIT License
380 stars 134 forks source link

Observation and agent are rotating in the opposite directions #192

Open rzayanov opened 3 years ago

rzayanov commented 3 years ago

I've created a simple agent that always chooses the MOVE_UP action.

When the agent starts in the UP or DOWN orientation and moves, all the objects in the observation space "go down", as expected (i.e. their Y coordinates increase).

However, when the agent starts in the LEFT or RIGHT orientation, all the objects "go up".

A similar horizontal inversion happens when the agent always chooses MOVE_LEFT.

In other words, instead of rotating with the agent, the observation seems to rotate in the opposite direction. Is this a part of the design?

This direction of the rotation can be changed by swapping the rot90() arguments of the LEFT and RIGHT if branches in the color_view() function.