NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Logic Programming for Finding Models in the Logics of Knowledge and its Applications: A Case Study

Chitta Baral, Gregory Gelfond, Enrico Pontelli, Tran Cao SonTheory Pract. Log. Program 2010 · DOI

Abstract

The logics of knowledge are modal logics that have been shown to be effective in representing and reasoning about knowledge in multi-agent domains. Relatively few computational frameworks for dealing with computation of models and useful transformations in logics of knowledge (e.g., to support multi-agent planning with knowledge actions and degrees of visibility) have been proposed. This paper explores the use of logic programming (LP) to encode interesting forms of logics of knowledge and compute Kripke models. The LP modeling is expanded with useful operators on Kripke structures, to support multi-agent planning in the presence of both world-altering and knowledge actions. This results in the first ever implementation of a planner for this type of complex multi-agent domains.

Introduction

In multi-agent environments, planning is not limited to changing the physical state of the world; it often involves changing the epistemic state—what agents know about the world and about each other. For instance, if an agent peeks into a container, their knowledge changes, but if a second agent is distracted during the act, that second agent's knowledge remains unchanged. Furthermore, the first agent may know that the second agent remains ignorant. Modeling these nested layers of knowledge is critical for autonomous systems operating in social or competitive contexts.

Historically, the logics of knowledge have relied on Kripke structures to represent these states. A Kripke structure is essentially a directed graph where nodes represent possible worlds and edges represent an agent's inability to distinguish between those worlds. However, as the number of agents and facts grows, these structures expand exponentially, creating a significant computational hurdle for automated reasoning.

The Computational Challenge: The Grounding Bottleneck

Previous attempts to automate epistemic reasoning often utilized Answer Set Programming (ASP). While ASP is powerful for global optimization, it suffers from a "grounding bottleneck" in the context of modal logic. ASP requires "grounding" (pre-calculating) every possible state and relation before the solver begins its work. In complex epistemic puzzles, this leads to memory exhaustion and crashes even on relatively modest problems.

This paper proposes a shift toward Prolog and logic programming (LP) to manage these models. Unlike the bottom-up approach of ASP, Prolog utilizes top-down, "lazy" evaluation. It computes only the specific parts of the Kripke structure necessary to answer a given query. This approach drastically reduces the memory footprint and allows for the representation of complex knowledge transformations that were previously computationally intractable.

The $m\mathcal{A}$ Action Language and Kripke Operators

To bridge the gap between abstract logic and practical planning, the authors utilize the $m\mathcal{A}$ action language. This language allows for the description of three distinct categories of actions:

  1. World-altering actions: Physical changes to the environment (e.g., picking up an object).
  2. Sensing actions: An agent checking a fact for themselves (e.g., looking inside a box to see its contents).
  3. Announcements: The sharing of information, which can be public (everyone hears), private (only specific agents hear), or partially observed.

The framework defines formal Prolog rules for transforming Kripke structures based on these actions. Key operators include node_minus (to remove worlds that are no longer possible after an announcement) and knowledge_union (to combine the perspectives of different agents). By treating Kripke structures as directed labeled graphs, the authors map modal logic axioms—such as transitivity (if I know X, I know that I know X)—directly onto graph properties.

Experimental Evaluation: The Sum and Product Puzzle

The framework was tested against several classic epistemic challenges, including the "Coin in the Box" scenario and the "Muddy Children" problem. However, the primary benchmark for efficiency was the Sum and Product Puzzle (also known as the Impossible Puzzle).

In this puzzle, two mathematicians are given the sum and product of two integers, respectively. Through a series of public announcements where each states "I do not know the numbers," they eventually deduce the answer. This problem is notoriously difficult for computational solvers because it involves 2,352 initial possible worlds and millions of potential relations. While ASP solvers typically crash or time out after hours of processing this puzzle, the Prolog-based implementation solved it in just 10.5 seconds on a standard laptop.

Conclusion

This research provides the first-ever implementation of a planner capable of handling a unified mix of world-altering, sensing, and private announcement actions in multi-agent domains. By leveraging the top-down execution of logic programming, the authors successfully bypassed the grounding limitations that hindered previous epistemic logic tools.

Future work aims to expand this framework to include non-deterministic action outcomes and to move beyond the "external observer" perspective. Transitioning to a subjective perspective—where planning is done from the limited viewpoint of a single agent within the system—remains a key frontier for multi-agent epistemic planning.

Summary updated

BibTeX
@inproceedings{baral2010logic,
  author = {Chitta Baral and Gregory Gelfond and Enrico Pontelli and Tran Cao Son},
  title = {{Logic Programming for Finding Models in the Logics of Knowledge and its Applications: A Case Study}},
  booktitle = {Theory Pract. Log. Program},
  year = {2010},
  doi = {10.1017/s1471068410000359},
}
Figure