Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//Initial state:
INROOM(ROBOT, R1) ∧ CONNECTS(D1, R1, R2) ∧ CONNECTS(D2, R2, R3) ∧ BOX(BOX1), INROOM(BOX1, R2)
//Goal:
BOX(BOX1) ∧ INROOM(BOX1, R1)
//Actions:
GOTHRU(d, r1, r2) //Robot goes from room r1 to room r2, through door d
Preconditions: INROOM(ROBOT, r1) ∧ CONNECTS(d, r1, r2)
Postconditions: NOT INROOM(ROBOT, r1) ∧ INROOM(ROBOT, r2)
PUSHTHRU(b, d, r1, r2) //Robot pushes box b through door d from room r1 to room r2
Preconditions: INROOM(b, r1) ∧ INROOM(ROBOT, r1) ∧ CONNECTS(d, r1, r2)
Postconditions: NOT INROOM(ROBOT, r1) ∧ NOT INROOM (b, r1) ∧ INROOM(ROBOT, r2) ∧ INROOM(b, r2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment