﻿# unfinished, need to adapt to the boxes world

(define (domain boxes-domain)
  (:constants box1 box2 box3 box4 agent p1 p2 p3)
  (:predicates (on-floor) (at ?x ?y) (onbox) (hasknife) (hasbananas)
	       (hasglass) (haswater) (location ?x))
  (:action go-to
	   :parameters (?x ?y)
	   :precondition (and (not (= ?y ?x)) (on-floor) (at monkey ?y))
	   :effect (and (at monkey ?x) (not (at monkey ?y))))
  (:action climb
	   :parameters (?x)
	   :precondition (and (at box ?x) (at monkey ?x))
	   :effect (and (onbox) (not (on-floor))))
  (:action push-box
	   :parameters (?x ?y)
	   :precondition (and (not (= ?y ?x)) (at box ?y) (at monkey ?y)
			      (on-floor))
	   :effect (and (at monkey ?x) (not (at monkey ?y))
			(at box ?x) (not (at box ?y))))
  (:action get-knife
	   :parameters (?y)
	   :precondition (and (at knife ?y) (at monkey ?y))
	   :effect (and (hasknife) (not (at knife ?y))))
  (:action grab-bananas
	   :parameters (?y)
	   :precondition (and (at monkey ?y) (hasknife) (at bananas ?y) (onbox))
	   :effect (hasbananas))
  (:action pickglass
	   :parameters (?y)
	   :precondition (and (at glass ?y) (at monkey ?y))
	   :effect (and (hasglass) (not (at glass ?y))))
  (:action getwater
	   :parameters (?y)
	   :precondition (and (hasglass)
			      (at waterfountain ?y)
			      (at monkey ?y)
			      (on-floor))
	   :effect (haswater)))
