eugenevinitsky / sequential_social_dilemma_games

Repo for reproduction of sequential social dilemmas
MIT License
387 stars 132 forks source link

hidden_cells can have conflicting values for a cell #108

Closed eugenevinitsky closed 5 years ago

eugenevinitsky commented 5 years ago

Example: You have an empty cell at (row, col) that is hidden by a firing beam. Then, when the beam is fired hidden cells will contain: (row, col, ' '). Now, an apple tries to spawn there. Now hidden cells will contain [(row, col, ' ') and (row, col, 'A')]. This needs to be handled or else it can cause bugs.

As an example of a bug, if the order of the two hidden_cells is reversed, first an apple will be placed, and then it will be cleared.

eugenevinitsky commented 5 years ago

This doesn't actually cause an error because the conflict will always have 'A' after ' ' and so an A will be placed there anyways BUT it's bad to have it sitting there.