Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to implement an OpenAI's environment, where the action space changes at each step?

Tags:

openai-gym

Is there a way to implement an OpenAI's environment, where the action space changes at each step?

like image 306
Abhishek Bhatia Avatar asked Jul 09 '17 21:07

Abhishek Bhatia


1 Answers

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().

like image 75
Rob Donnelly Avatar answered Oct 03 '22 09:10

Rob Donnelly