/*			APPENDIX  C
	Section C.4  ADD-based Representation of a Delivery Example
*/
Fluents:
hcX - a person X has coffee
hmX - a person X has mail
rl - the robot location
g  - going /* not considered, we can abstract it away */
cf - the robot is carrying coffee
cmX - the robot is carrying mail for a person X
wcX - wantsCoffee (one of people)
mpX - mailPresent (for one of people)
Actions:
pc - pickup coffee
pmAn - pickup mail for Ann
pmJo - pickup mail for Joe
gcAn - give coffee to Ann
gcJo - give coffee to Joe
gmAn - give mail to Ann
gmJo - give mail to Joe
gotoMO - go to the main office from the current location
gotoAn - go to Ann's office from the current location
gotoJo - go to Joe's office from the current location
pbc  - put back coffee
pbmAn - put Ann's mail back into his mailbox
pbmJo - put Joe's mail back into his mailbox 
--------------------------------------------------------------------
(variables (hcAn yes no) (hcJo yes no) (hmAn yes no) (hmJo yes no) 
(rl mo hl an jo) (cf yes no) (cmAn yes no) (cmJo yes no) 
(wcAn yes no) (wcJo yes no) (mpAn yes no) (mpJo yes no))
action pc
   hcAn   (hcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hcJo   (hcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmAn   (hmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmJo   (hmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   rl     (rl     (mo    (1.0  0.0  0.0  0.0))
                  (hl    (0.0  1.0  0.0  0.0))
                  (an    (0.0  0.0  1.0  0.0))
                  (jo    (0.0  0.0  0.0  1.0)))
   cf     (cf     (yes   (1.0 0.0))
                  (no    (rl   (mo   (1.0 0.0))
                               (hl   (0.0 1.0))
                               (an   (0.0 1.0))
                               (jo   (0.0 1.0)))))
   cmAn   (cmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmJo   (cmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcAn   (wcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcJo   (wcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpAn   (mpAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpJo   (mpJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
endaction
action pmAn
   hcAn   (hcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hcJo   (hcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmAn   (hmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmJo   (hmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   rl     (rl     (mo    (1.0  0.0  0.0  0.0))
                  (hl    (0.0  1.0  0.0  0.0))
                  (an    (0.0  0.0  1.0  0.0))
                  (jo    (0.0  0.0  0.0  1.0)))
   cf     (cf     (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmAn   (cmAn   (yes   (1.0 0.0))
                  (no    (mpAn   (yes   (rl   (mo   (1.0 0.0))
                                              (hl   (0.0 1.0))
                                              (an   (0.0 1.0))
                                              (jo   (0.0 1.0))))
                                 (no   (0.0  1.0)))))
   cmJo   (cmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcAn   (wcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcJo   (wcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpAn   (mpAn   (yes   (0.0 1.0))
                  (no    (0.0 1.0)))
   mpJo   (mpJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
endaction
action pmJo
   hcAn   (hcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hcJo   (hcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmAn   (hmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmJo   (hmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   rl     (rl     (mo    (1.0  0.0  0.0  0.0))
                  (hl    (0.0  1.0  0.0  0.0))
                  (an    (0.0  0.0  1.0  0.0))
                  (jo    (0.0  0.0  0.0  1.0)))
   cf     (cf     (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmAn   (cmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmJo   (cmJo   (yes   (1.0 0.0))
                  (no    (mpJo   (yes   (rl   (mo   (1.0 0.0))
                                              (hl   (0.0 1.0))
                                              (an   (0.0 1.0))
                                              (jo   (0.0 1.0))))
                                 (no   (0.0  1.0)))))
   wcAn   (wcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcJo   (wcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpAn   (mpAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpJo   (mpJo   (yes   (0.0 1.0))
                  (no    (0.0 1.0)))
endaction
action gcAn
   hcAn   (hcAn   (yes   (1.0 0.0))
                  (no    (cf   (yes   (rl   (mo   (0.0  1.0))
                                            (hl   (0.0  1.0))
                                            (an   (0.95  0.05))
                                            (jo   (0.0  1.0))))
                               (no   (0.0  1.0)))))
   hcJo   (hcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmAn   (hmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmJo   (hmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   rl     (rl     (mo    (1.0  0.0  0.0  0.0))
                  (hl    (0.0  1.0  0.0  0.0))
                  (an    (0.0  0.0  1.0  0.0))
                  (jo    (0.0  0.0  0.0  1.0)))
   cf     (cf     (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmAn   (cmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmJo   (cmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcAn   (wcAn   (yes   (cf   (yes   (rl   (mo   (1.0  0.0))
                                            (hl   (1.0  0.0))
                                            (an   (0.05  0.95))
                                            (jo   (1.0  0.0))))
                               (no   (1.0  0.0))))
                  (no    (0.0 1.0)))
   wcJo   (wcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpAn   (mpAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpJo   (mpJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
endaction
action gcJo
   hcAn   (hcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hcJo   (hcJo   (yes   (1.0 0.0))
                  (no    (cf   (yes   (rl   (mo   (0.0  1.0))
                                            (hl   (0.0  1.0))
                                            (an   (0.0  1.0))
                                            (jo   (0.95  0.05))))
                               (no   (0.0  1.0)))))
   hmAn   (hmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmJo   (hmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   rl     (rl     (mo    (1.0  0.0  0.0  0.0))
                  (hl    (0.0  1.0  0.0  0.0))
                  (an    (0.0  0.0  1.0  0.0))
                  (jo    (0.0  0.0  0.0  1.0)))
   cf     (cf     (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmAn   (cmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmJo   (cmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcAn   (wcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcJo   (wcJo   (yes   (cf   (yes   (rl   (mo   (1.0  0.0))
                                            (hl   (1.0  0.0))
                                            (an   (1.0  0.0))
                                            (jo   (0.05  0.95))))
                               (no   (1.0  0.0))))
                  (no    (0.0 1.0)))
   mpAn   (mpAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpJo   (mpJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
endaction
action gmAn
   hcAn   (hcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hcJo   (hcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmAn   (hmAn   (yes   (1.0 0.0))
                  (no    (cmAn   (yes   (rl   (mo   (0.0  1.0))
                                              (hl   (0.0  1.0))
                                              (an   (0.95  0.05))
                                              (jo   (0.0  1.0))))
                                 (no   (0.0  1.0)))))
   hmJo   (hmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   rl     (rl     (mo    (1.0  0.0  0.0  0.0))
                  (hl    (0.0  1.0  0.0  0.0))
                  (an    (0.0  0.0  1.0  0.0))
                  (jo    (0.0  0.0  0.0  1.0)))
   cf     (cf     (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmAn   (cmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmJo   (cmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcAn   (wcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcJo   (wcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpAn   (mpAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpJo   (mpJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
endaction
action gmJo
   hcAn   (hcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hcJo   (hcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmAn   (hmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmJo   (hmJo   (yes   (1.0 0.0))
                  (no    (cmJo   (yes   (rl   (mo   (0.0  1.0))
                                              (hl   (0.0  1.0))
                                              (an   (0.0  1.0))
                                              (jo   (0.95  0.05))))
                                 (no   (0.0  1.0)))))
   rl     (rl     (mo    (1.0  0.0  0.0  0.0))
                  (hl    (0.0  1.0  0.0  0.0))
                  (an    (0.0  0.0  1.0  0.0))
                  (jo    (0.0  0.0  0.0  1.0)))
   cf     (cf     (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmAn   (cmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmJo   (cmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcAn   (wcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcJo   (wcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpAn   (mpAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpJo   (mpJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
endaction
action gotoMO
   hcAn   (hcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hcJo   (hcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmAn   (hmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmJo   (hmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   rl     (rl     (mo    (0.99  0.01  0.0  0.0))
                  (hl    (0.99  0.01  0.0  0.0))
                  (an    (0.99  0.01  0.0  0.0))
                  (jo    (0.99  0.01  0.0  0.0)))
   cf     (cf     (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmAn   (cmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmJo   (cmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcAn   (wcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcJo   (wcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpAn   (mpAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpJo   (mpJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
endaction
action gotoAn
   hcAn   (hcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hcJo   (hcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmAn   (hmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmJo   (hmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   rl     (rl     (mo    (0.0  0.01  0.99  0.0))
                  (hl    (0.0  0.01  0.99  0.0))
                  (an    (0.0  0.01  0.99  0.0))
                  (jo    (0.0  0.01  0.99  0.0)))
   cf     (cf     (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmAn   (cmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmJo   (cmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcAn   (wcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcJo   (wcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpAn   (mpAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpJo   (mpJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
endaction
action gotoJo
   hcAn   (hcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hcJo   (hcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmAn   (hmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmJo   (hmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   rl     (rl     (mo    (0.0  0.01  0.0  0.99))
                  (hl    (0.0  0.01  0.0  0.99))
                  (an    (0.0  0.01  0.0  0.99))
                  (jo    (0.0  0.01  0.0  0.99)))
   cf     (cf     (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmAn   (cmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmJo   (cmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcAn   (wcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcJo   (wcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpAn   (mpAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpJo   (mpJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
endaction
action pbc
   hcAn   (hcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hcJo   (hcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmAn   (hmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmJo   (hmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   rl     (rl     (mo    (1.0  0.0  0.0  0.0))
                  (hl    (0.0  1.0  0.0  0.0))
                  (an    (0.0  0.0  1.0  0.0))
                  (jo    (0.0  0.0  0.0  1.0)))
   cf     (cf     (yes   (rl   (mo   (0.0 1.0))
                               (hl   (1.0 0.0))
                               (an   (1.0 0.0))
                               (jo   (1.0 0.0))))
                  (no    (0.0 1.0)))
   cmAn   (cmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmJo   (cmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcAn   (wcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcJo   (wcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpAn   (mpAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpJo   (mpJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
endaction
action pbmAn
   hcAn   (hcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hcJo   (hcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmAn   (hmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmJo   (hmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   rl     (rl     (mo    (1.0  0.0  0.0  0.0))
                  (hl    (0.0  1.0  0.0  0.0))
                  (an    (0.0  0.0  1.0  0.0))
                  (jo    (0.0  0.0  0.0  1.0)))
   cf     (cf     (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmAn   (cmAn   (yes   (rl   (mo   (0.0 1.0))
                               (hl   (1.0 0.0))
                               (an   (1.0 0.0))
                               (jo   (1.0 0.0))))
                  (no    (0.0 1.0)))
   cmJo   (cmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcAn   (wcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcJo   (wcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpAn   (mpAn   (yes   (1.0 0.0))
                  (no    (rl   (mo   (1.0 0.0))
                               (hl   (0.0 1.0))
                               (an   (0.0 1.0))
                               (jo   (0.0 1.0)))))
   mpJo   (mpJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
endaction
action pbmJo
   hcAn   (hcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hcJo   (hcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmAn   (hmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   hmJo   (hmJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   rl     (rl     (mo    (1.0  0.0  0.0  0.0))
                  (hl    (0.0  1.0  0.0  0.0))
                  (an    (0.0  0.0  1.0  0.0))
                  (jo    (0.0  0.0  0.0  1.0)))
   cf     (cf     (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmAn   (cmAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   cmJo   (cmJo   (yes   (rl   (mo   (0.0 1.0))
                               (hl   (1.0 0.0))
                               (an   (1.0 0.0))
                               (jo   (1.0 0.0))))
                  (no    (0.0 1.0)))
   wcAn   (wcAn   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   wcJo   (wcJo   (yes   (1.0 0.0))
                  (no    (0.0 1.0)))
   mpAn   (mpAn   (yes   (1.0 0.0))
                  (no    (1.0 0.0)))
   mpJo   (mpJo   (yes   (1.0 0.0))
                  (no    (rl   (mo   (1.0 0.0))
                               (hl   (0.0 1.0))
                               (an   (0.0 1.0))
                               (jo   (0.0 1.0)))))
endaction
reward  (hcAn  (yes  (hmAn  (yes  (hcJo  (yes  (hmJo  (yes  (55.0))
                                                      (no   (25.0))))
                                         (no  (hmJo   (yes  (55.0))
	                                              (no   (55.0))))))
                            (no   (hcJo  (yes  (hmJo  (yes  (55.0))
                                                      (no   (25.0))))
                                         (no   (hmJo  (yes  (55.0))
	                                        (no   (25.0))))))))
                (no  (hmAn  (yes  (hcJo  (yes  (hmJo  (yes  (30.0))
                                                      (no   (0.0))))
                                         (no  (hmJo   (yes  (30.0))
	                                              (no   (30.0))))))
                            (no   (hcJo  (yes  (hmJo  (yes  (30.0))
                                                      (no   (0.0))))
                                         (no   (hmJo  (yes  (30.0))
	                                              (no   (0.0)))))))))
discount 1.000000
horizon 5.000000