amlgym.modeling package
Submodules
amlgym.modeling.UPEnv module
- class amlgym.modeling.UPEnv.UPEnv(domain_path, problem_path)[source]
Bases:
EnvA Gymnasium environment which simulates a PDDL problem through the unified-planning sequential simulator.
Set environment state and seed through
reset()for reproducibility- __init__(domain_path, problem_path)[source]
Set environment state and seed through
reset()for reproducibility
- applicable_actions(state)[source]
Returns the set of actions applicable in the current state s :type state: :param state: the current state s :rtype:
Dict[str,Set[str]] :return: the list of actions applicable in the current state s
- apply(state, action)[source]
Return the state \(s'\) reached after executing action \(a\) in state \(s\). :type state: :param state: current state \(s\) :type action: :param action: action \(a\) to be executed :return: future state \(s'\)
- property ground_actions: Dict[str, Any]
Return a list of all ground actions for the current environment. :return: ground actions list
-
problem:
Problem
amlgym.modeling.env module
- class amlgym.modeling.env.Env[source]
Bases:
ABC- An AMLGym environment interface that is required for measuring predictive power
metrics. An example of AMLGym environment is a unified-planning sequential simulator that implements the
apply()andapplicable_actions()methods.
- abstract applicable_actions(state)[source]
Returns the set of actions applicable in the current state s :type state:
TypeVar(StateType) :param state: the current state s :rtype:List[TypeVar(ActionType)] :return: the list of actions applicable in the current state s
- abstract apply(s, a)[source]
Return the state obtained after exeucuting action a in the current state s :type s:
TypeVar(StateType) :param s: the current state s :type a:TypeVar(ActionType) :param a: the action a to execute :rtype:TypeVar(StateType) :return: the state s’ reached after executing action a in state s