Open matomatical opened 4 months ago
The baselines
branch includes a fix for the first example in the Cheese in the Corner environment. There is still an issue with the spawning of the mouse in that environment. More generally there is still more work to do to systematically find more examples.
In some rare[^1] cases, the level generators will create "invalid" levels, for which important assumptions underlying the environment implementation are violated. For example:
corner_size
parameter is set to 1). In this case, the cheese might spawn inside a wall, or perhaps along the boundary, I'm not sure, the point being that the code assumes this won't happen.There are probably more examples. Resolving this issue will require finding all of them.
Once found, the generators should be improved such that it is no longer possible to generate these levels. For example, in (1), if the corner region is entirely occupied, wall could be removed to make room for the cheese. For (2), walls could be removed to make room for the chests and keys to spawn, and the level generator could have static assertions added that prevent the number of keys and chests (plus the mouse) from exceeding the maximum number of available cells.
Notes:
[^1]: Rare in this case means vanishingly unlikely for default configuration, however note that some of these issues are quite likely or can be ensured under some pathological configurations (e.g. setting block probabilities or #keys/#chests very high in the above examples).