iglu-contest / gridworld

A reinforcement learning environment for the IGLU 2022 at NeurIPS
GNU Affero General Public License v3.0
32 stars 12 forks source link

Fix: environment returns done in first iteration if target grid is contained in the current grid. #29

Closed mit0110 closed 2 years ago

mit0110 commented 2 years ago

This case is observed when the instruction is to remove a block.

The PR only handles the case where the target structure has fewer blocks than the starting grid, setting done = False. This is logical because there are missing blocks to place. For all other cases, the previous code of maximal intersection is applied.

I tested it for the single turn IGLU dataset only with this script by running a single step with action 0 and checking the value of done condition. https://gist.github.com/mit0110/9fa209603f3faf17e9d3cab515139137 There are still 4 tasks that fail that I did not check, and 1190 that correctly end after the first iteration because the target is equal than the starting grid.

For the multiturn dataset I use a similar script. Before the change, 2 tasks failed. After this change, no task failed. There are 2 tasks with equivalent target and starting grids.