Closed aar65537 closed 5 months ago
Sorry for the radio silence, I still want to get this in! What do you think about using cached_properties instead of properties as the spec should never change?
I think cached_properties
should work. The only issue I foresee is you might have to access the properties in the __init__
method to ensure the arrays are initialized outside of a jitted function.
I think
cached_properties
should work. The only issue I foresee is you might have to access the properties in the__init__
method to ensure the arrays are initialized outside of a jitted function.
True, but we know what the cached properties are, so we could call them in the base env classes init
?
Also just a heads up, we're making a push to get sliding tile puzzle and flatpack envs merged before the ICLR camera ready deadline (about a week). Once this is done we'll get to this PR :smile:
Thanks for the heads up. I changed all of the environments to use cached_property
. I think it is more succinct than my original implementation. Thank you for the suggestion.
I've implemented the changes for the SlidingTilePuzzle and cleaned up the last references to action_spec()
in the docs. That should be all the environments.
closes #98
_*_spec
properties on the Environment class. The properties are accessed through*_spec
managed attributes implemented with the@property
decorator. Properties are initialized with_make_*_spec()
methods during Environment initialization.ActionSpec
type on the Environment class in order to statically type theaction_spec
attribute.*_spec()
method to*_spec
attribute.Edit: now also closes #221
Observation
type onEnvironment