GRAML: Goal Recognition As Metric Learning