Skip to content
dudakaPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

29 Commits

Folders and files

Repository files navigation

Model Reconciliation via Dialogues

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.

Requirements

  • Python >= 3.12 and uv (uv sync installs clingo and all dependencies)

Quick start

uv sync
uv run python main.py --example-dir examples/blocksworld-fig1

This 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).

Layout

  • mrp/ — the implementation
    • model.py — planning problems as sets of plasp-style ASP facts; M (x) eps
    • planner.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 with examples/generate_blocksworld.py
  • data/benchmarks/ — the experiment instances behind Table 1 with the original dialogue logs (see data/benchmarks/README.md)
  • experiments/ — benchmark tooling and recorded results
  • tests/ — reproduce Examples 1-3 of the paper
  • IMPLEMENTATION.md — paper-to-code mapping and the places where the implementation deliberately deviates from the pseudocode, with rationale

Reproducing the paper

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 side

experiments/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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages