SAM
- class amlgym.algorithms.SAM.SAM[source]
Bases:
PassiveAlgorithmAdapterAdapter class for running the SAM algorithm: “Safe Learning of Lifted Action Models”, B. Juba and H. S. Le, and R. Stern, Proceedings of the 18th International Conference on Principles of Knowledge Representation and Reasoning, 2021. https://proceedings.kr.org/2021/36/
Example
from amlgym.algorithms import get_algorithm sam = get_algorithm('SAM') model = sam.learn('path/to/domain.pddl', ['path/to/trace0', 'path/to/trace1']) print(model)
- __init__()
- learn(domain_path, trajectory_paths)[source]
- Learns a PDDL action model from:
a (possibly empty) input model which is required to specify the predicates and operators signature;
a list of trajectory file paths.
- Parameters:
domain_path (
str) – input PDDL domain file pathtrajectory_paths (
List[str]) – list of trajectory file paths
- Return type:
str- Returns:
a string representing the learned PDDL model