DeMaCS-UNICAL / ThinkEngine

A Unity asset for a tight integration of AI in games: asset, showcase, web page.
19 stars 1 forks source link

DLV specific option being used for other solver too #33

Open Farfi55 opened 1 year ago

Farfi55 commented 1 year ago

The --filter=predicate/arity options exists only for the dlv executable, but if we try to run a brain using clingo for example, it won't recognize it and fail execution.

// inside ASPReactiveExecutor
protected override List<OptionDescriptor> SpecificOptions()
{
    List<OptionDescriptor> options = new List<OptionDescriptor>();
    options.Add(new OptionDescriptor("--filter=setOnActuator/1 "));
    return options;
}
// inside ASPPlannerExecutor
protected override List<OptionDescriptor> SpecificOptions()
{
    List<OptionDescriptor> options = new List<OptionDescriptor>();
    options.Add(new OptionDescriptor("--filter=applyAction/2,actionArgument/3 "));
    return options;
}

A possible fix would be to add #show setOnActuator/1. for the reactive Executor and #show applyAction/2. #show actionArgument/3. for Planner executor.

This won't guarantee that the only predicates received in output by the ThinkEngine are the ones specified in the filter, as the user can also use the #show ... functionality for other predicates.