Skip to content

Instantly share code, notes, and snippets.

@Lokno
Created November 2, 2017 21:48
Show Gist options
  • Save Lokno/a381e75a16507bf7f1866589a3c1cb89 to your computer and use it in GitHub Desktop.
Save Lokno/a381e75a16507bf7f1866589a3c1cb89 to your computer and use it in GitHub Desktop.
Tower of Hanoi Domain for the Metric-FF Planner
(define (domain hanoi-domain)
(:types disk peg - object)
(:predicates (smaller ?x - disk ?y - object )
(on ?x - disk ?y - object)
(clear ?x - object ))
(:functions (cost))
(:action Move
:parameters (?d - disk ?c - object ?n - object)
:precondition (and
(smaller ?d ?n)
(not (= ?n ?c))
(not (= ?n ?d))
(not (= ?c ?d))
(on ?d ?c)
(clear ?d)
(clear ?n))
:effect (and
(clear ?c)
(on ?d ?n)
(not (on ?d ?c))
(not (clear ?n))
(increase (cost) 1)))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment