Skip to content

Instantly share code, notes, and snippets.

@ivancorrales
Created September 2, 2021 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivancorrales/a4bb06390401d4dd8af11f61435d1df7 to your computer and use it in GitHub Desktop.
Save ivancorrales/a4bb06390401d4dd8af11f61435d1df7 to your computer and use it in GitHub Desktop.
(define
(problem waiter-service)
(:domain restaurant)
; objects with types
(:objects
w1 w2 - waiter
g1 g2 - group
t1 t2 - table
)
(:init
; The waiters are available to attend clients
(is_available w1)
(is_available w2)
; The tables are free
(is_free t1)
(is_free t2)
; The groups are waiting for being accompained to the table
(waiting_for_a_table g1)
(waiting_for_a_table g2)
; Initialize to 0 the tips of the waiters
(= (tips w1) 0)
(= (tips w2) 0)
; Establish the capacity of each table
(= (capacity t1) 4)
(= (capacity t2) 6)
; Define the number of people in each group
(= (group_size g1) 3)
(= (group_size g2) 4)
)
; The problem will be resolved when all the groups have paid
; and exit from the restaurant
(:goal (and
(bye g1)
(bye g2)
))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment