def __init__(self, gridobj, legal_action, actionClass=BaseAction): """ .. warning:: /!\\\\ Internal, do not use unless you know what you are doing /!\\\\ The actions space is created by the environment. Do not attempt to create one yourself. All parameters (name_gen, name_load, name_line, sub_info, etc.) are used to fill the attributes having the same name. See :class:`ActionSpace` for more information. Parameters ---------- gridobj: :class:`grid2op.Space.GridObjects` The representation of the powergrid. actionClass: ``type`` Note that this parameter expected a class and not an object of the class. It is used to return the appropriate action type. legal_action: :class:`grid2op.RulesChecker.BaseRules` Class specifying the rules of the game used to check the legality of the actions. """ SerializableActionSpace.__init__(self, gridobj, actionClass=actionClass) self.legal_action = legal_action
def __init__(self, gridobj, legal_action, actionClass=BaseAction): """ All parameters (name_gen, name_load, name_line, sub_info, etc.) are used to fill the attributes having the same name. See :class:`ActionSpace` for more information. Parameters ---------- gridobj: :class:`grid2op.Space.GridObjects` The representation of the powergrid. actionClass: ``type`` Note that this parameter expected a class and not an object of the class. It is used to return the appropriate action type. legal_action: :class:`grid2op.RulesChecker.BaseRules` Class specifying the rules of the game used to check the legality of the actions. """ SerializableActionSpace.__init__(self, gridobj, actionClass=actionClass) self.legal_action = legal_action