Griddly icon indicating copy to clipboard operation
Griddly copied to clipboard

Ordering of variable observations is inconsistent

Open daveey opened this issue 2 years ago • 0 comments

Describe the bug

When using a VECTOR observer, the observations are ordered by env.game.get_variable_names(). However, the same game yaml can result in a different order of variables on different machines. This makes it hard to re-use models.

To Reproduce Steps to reproduce the behavior:

I don't have a consistent repro, since it depends on the environment where griddly is built / running.

Expected behavior

I would expect game.get_object_names() and game.get_variable_names() to be consistent. They could either be ordered by when they appear in the yaml, or alphabetically by object_name.variable, followed by global variables

Desktop (please complete the following information):

  • Version 1.7.0 (built from src)

daveey avatar Feb 12 '24 18:02 daveey