Is there a way to implement an OpenAI's environment, where the action space changes at each step?
Yes (though some of the premade agents may not work in this case).
@property
def action_space(self):
# Do some code here to calculate the available actions
return Something
The @property
decorator is so that you can fit the standard format for a gym environment, where the action_space is a property env.action_space
rather than a method env.action_space()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With