Modeling and Reasoning in Event Calculus Using Goal-Directed Constraint Answer Set Programming
Abstract
Automated commonsense reasoning is essential for building human-like AI systems featuring, for example, explainable AI. Event Calculus (EC) is a family of formalisms that model commonsense reasoning with a sound, logical basis. Previous attempts to mechanize reasoning using EC faced difficulties in the treatment of the continuous change in dense domains (e.g., time and other physical quantities), constraints among variables, default negation, and the uniform application of different inference methods, among others. We propose the use of s(CASP), a query-driven, top-down execution model for Predicate Answer Set Programming with Constraints, to model and reason using EC. We show how EC scenarios can be naturally and directly encoded in s(CASP) and how it enables deductive and abductive reasoning tasks in domains featuring, for example, constraints involving both dense time and dense fluents.
Evaluation
We showed how event calculus can be modeled in s(CASP), a goal-directed implementation of constraint answer set programming with predicates, with much fewer limitations than other approaches. s(CASP) can capture the notion of continuous time (and, in general, fluents) in event calculus thanks to its grounding-free top-down evaluation strategy. It can also represent complex models and answer queries in a flexible manner thanks to the use of constraints. The main contribution of the paper is to show how the event calculus can be elegantly modeled using the s(CASP) predicate ASP system that seamlessly supports constraints. The modeling of the event calculus by s(CASP) is more elegant and faithful compared to other approaches such as F2LP, where time has to be discretized.s(CASP) version:
The evaluation was done with s(CASP) version version 0.20.10.09 corresponding to the commit SHA 14b235306f098420e314f3bf218cac41f216d69d at https://gitlab.software.imdea.org/ciao-lang/sCASPclingo version:
The evaluation was done with clingo version version 5.2.0 available at https://github.com/potassco/clingo/releases/tag/v5.2.0Benchmarks
Benchmark.
- To execute the benchmarks:
$ ./go_light
$ ./go_tap