OffLAM

class amlgym.algorithms.OffLAM.OffLAM(**kwargs)[source]

Bases: PassiveAlgorithmAdapter

Adapter class for running the OffLAM algorithm: “Lifted Action Models Learning from Partial Traces”, L. Lamanna, L. Serafini, A. Saetti, A. Gerevini, and P. Traverso, Artificial Intelligence Journal, 2025. https://www.sciencedirect.com/science/article/abs/pii/S0004370224001929

Example

from amlgym.algorithms import get_algorithm
offlam = get_algorithm('OffLAM')
model = offlam.learn('path/to/domain.pddl', ['path/to/trace0', 'path/to/trace1'])
print(model)
__init__(**kwargs)[source]
learn(domain_path, trajectory_paths)[source]
Learns a PDDL action model from:
  1. a (possibly empty) input model which is required to specify the predicates and operators signature;

  2. a list of trajectory file paths.

Parameters:
  • domain_path (str) – input PDDL domain file path

  • trajectory_paths (List[str]) – list of trajectory file paths

Return type:

str

Returns:

a string representing the learned PDDL model