CS计算机代考程序代写 ;; Generated by blocksworld generator

;; Generated by blocksworld generator
;; http://www.cs.rutgers.edu/~jasmuth/blocksworld.tar.gz
;; by John Asmuth (jasmuth@cs.rutgers.edu)
;; and Dave Weissman

(define (domain bw-c-pc-8)
(:requirements :adl :probabilistic-effects :fluents :rewards)
(:types block table)
(:constants table – table)
(:predicates
(is-red ?block – block)
(is-blue ?block – block)
(is-green ?block – block)
(holding ?block – block)
(on-top-of ?block – block ?obj)
)
(:action pick-up-block-from
:parameters (?top – block ?bottom)
:precondition (and (not (= ?top ?bottom))
(forall (?b – block) (not (holding ?b)))
(on-top-of ?top ?bottom)
(forall (?b – block) (not (on-top-of ?b ?top))))
:effect (and (decrease (reward) 1)
(probabilistic 0.75 (and (holding ?top)
(not (on-top-of ?top ?bottom)))
0.25 (when (not (= ?bottom table))
(and (not (on-top-of ?top ?bottom))
(on-top-of ?top table)))))
)
(:action put-down-block-on
:parameters (?top – block ?bottom)
:precondition (and (not (= ?top ?bottom))
(holding ?top)
(or (= ?bottom table)
(forall (?b – block) (not (on-top-of ?b ?bottom)))))
:effect (and (not (holding ?top))
(probabilistic 0.75 (on-top-of ?top ?bottom)
0.25 (on-top-of ?top table)))
)
)
(define (problem bw-c-pc-8)
(:domain bw-c-pc-8)
(:objects block0 block1 block2 block3 block4 block5 block6 block7 – block)
(:init
(on-top-of block0 block1)
(on-top-of block1 table)
(on-top-of block2 table)
(on-top-of block3 block4)
(on-top-of block4 block5)
(on-top-of block5 table)
(on-top-of block6 table)
(on-top-of block7 table)
(is-red block0)
(is-red block1)
(is-green block2)
(is-red block3)
(is-green block4)
(is-red block5)
(is-green block6)
(is-blue block7)
)
(:goal
(and
(exists (?fb0 – block)
(and
(is-green ?fb0)
(exists (?fb1 – block)
(and
(not (= ?fb0 ?fb1))
(is-green ?fb1)
(on-top-of ?fb0 ?fb1)
(exists (?fb2 – block)
(and
(not (= ?fb0 ?fb2))
(not (= ?fb1 ?fb2))
(is-blue ?fb2)
(on-top-of ?fb1 ?fb2)
(exists (?fb3 – block)
(and
(not (= ?fb0 ?fb3))
(not (= ?fb1 ?fb3))
(not (= ?fb2 ?fb3))
(is-red ?fb3)
(on-top-of ?fb2 ?fb3)
(exists (?fb4 – block)
(and
(not (= ?fb0 ?fb4))
(not (= ?fb1 ?fb4))
(not (= ?fb2 ?fb4))
(not (= ?fb3 ?fb4))
(is-red ?fb4)
(on-top-of ?fb3 table)
(exists (?fb5 – block)
(and
(not (= ?fb0 ?fb5))
(not (= ?fb1 ?fb5))
(not (= ?fb2 ?fb5))
(not (= ?fb3 ?fb5))
(not (= ?fb4 ?fb5))
(is-red ?fb5)
(on-top-of ?fb4 ?fb5)
(exists (?fb6 – block)
(and
(not (= ?fb0 ?fb6))
(not (= ?fb1 ?fb6))
(not (= ?fb2 ?fb6))
(not (= ?fb3 ?fb6))
(not (= ?fb4 ?fb6))
(not (= ?fb5 ?fb6))
(is-green ?fb6)
(on-top-of ?fb5 ?fb6)
(exists (?fb7 – block)
(and
(not (= ?fb0 ?fb7))
(not (= ?fb1 ?fb7))
(not (= ?fb2 ?fb7))
(not (= ?fb3 ?fb7))
(not (= ?fb4 ?fb7))
(not (= ?fb5 ?fb7))
(not (= ?fb6 ?fb7))
(is-red ?fb7)
(on-top-of ?fb6 ?fb7)
(on-top-of ?fb7 table)
))))))))))))))))
)
)
(:goal-reward 500)
)