UNPKG

ai-planning-val

Version:

Javascript/typescript wrapper for VAL (AI Planning plan validation and evaluation tools from KCL Planning department and the planning community around the ICAPS conference).

35 lines (34 loc) 1.42 kB
import { Variable } from 'pddl-workspace'; import { FunctionValues } from './PlanTimeSeriesParser'; export interface ValueSeqOptions { verbose?: boolean; /** ValueSeq path */ valueSeqPath?: string; /** Adjusts duplicated time stamps. */ adjustDuplicatedTimeStamps?: boolean; } /** * Holds graph values for functions grounded from the same lifted function. */ export declare class GroundedFunctionValues { readonly liftedVariable: Variable; readonly legend: string[]; values: (number | null)[][]; static readonly TIME_DELTA = 1e-10; constructor(liftedVariable: Variable, values: number[][], legend: string[]); static undefinedToNull(value: number): number | null; adjustForStepFunctions(): GroundedFunctionValues; toCsv(): string; } /** Wrapper for the ValueSeq executable. */ export declare class ValueSeq { private domainFile; private problemFile; private planFile; private options?; constructor(domainFile: string, problemFile: string, planFile: string, options?: ValueSeqOptions | undefined); evaluateForLifted(liftedFunction: Variable, groundedFunctions: Variable[]): Promise<GroundedFunctionValues | undefined>; evaluate(groundedFunctions: Variable[]): Promise<Map<string, FunctionValues>>; evaluateMetric(): Promise<Map<string, FunctionValues>>; callValueSeq(groundedFunctions: Variable[]): Promise<string | undefined>; }