Implementation of the dialog-based model reconciliation framework from:
@inproceedings{ho2022modelreconciliation,
title={On Model Reconciliation: How to Reconcile When Robot Does not Know Human's Model?},
author={Ho, Tuan Dung and Tran, Cao Son},
booktitle={ICLP Technical Communications / Doctoral Consortium},
year={2022},
url={https://arxiv.org/abs/2208.03091}
}The robot computes an explanation for its optimal plan through a dialogue
with a human whose planning model it does not know. In each round the robot
sends a proposal (plan, explanation) and the human replies with her
evaluation: accept, redundant, not executable (with reasons), or a better
plan. Planning and plan validation use the multi-shot solving feature of
clingo.
- Python >= 3.12 and uv (
uv syncinstalls clingo and all dependencies)
uv sync
uv run python main.py --example-dir examples/blocksworld-fig1This runs the dialogue for the Blocksworld problem of Figure 1 and ends
with the minimal explanation of Example 1: add precondition holding(b)
to stack(b,a) and clear(b) to pickup(b).
mrp/— the implementationmodel.py— planning problems as sets of plasp-style ASP facts;M (x) epsplanner.py—Solve(M): cost-minimal plans via incremental ASP (Section 2)validate.py—ValidatePlan(M, pi)(Listing 1)human.py— human dialogue controller (Algorithm 1)robot.py— robot dialogue controller and proposal queue (Algorithms 2-4, helper functions of Algorithms 5-11)dialogue.py— message passing between the two controllers (Definition 4)
examples/— the running examples of the paper (Figures 1-2), regenerable withexamples/generate_blocksworld.pydata/benchmarks/— the experiment instances behind Table 1 with the original dialogue logs (seedata/benchmarks/README.md)experiments/— benchmark tooling and recorded resultstests/— reproduce Examples 1-3 of the paperIMPLEMENTATION.md— paper-to-code mapping and the places where the implementation deliberately deviates from the pseudocode, with rationale
Examples 1-3 (Section 3): uv run pytest runs assertions that the
dialogues and ValidatePlan produce exactly the explanations and reasons
given in the paper.
Experiments (Section 4, Table 1):
uv run python experiments/run_benchmarks.py all # ~1 h, 6 instances in parallel
uv run python experiments/parse_reference.py # extract the original logs' numbers
uv run python experiments/compare.py # ours vs original, side by sideexperiments/results.csv and experiments/reference.csv contain a recorded
run and the original numbers. Plan lengths reproduce Table 1 exactly;
explanation sizes match at schema granularity (see IMPLEMENTATION.md);
round counts and times are implementation- and machine-dependent.