The goal of this project was to create a functional inn in Unity using Goal Oriented Action Planning to implement the actor's actions and goals. The following video shows the final result:
The simulation has four types of agents: Guests, Bellboys, Waiters and Cooks.
Guests are the main protagonists of the scene, because there is a constant flow of new Guests that enter the hotel, while the other actors stay the same for the whole simulation. When they spawn, they take the following actions:
Go To Inn: the agent goes to the inn's door
Check In: once the Guest is inside the Inn, it goes to the hall's check-in area. There, a Bellboy will go to meet it
Visit New Room: the Guest is taken to its new room by the Bellboy, and it stores a reference to it in case the agents needs to go back there
Once the agent has done the check-in, it's officially a Guest of the inn, so the timer that marks when it will have to leave starts to tick. Since this is a simulation, the agent's stay lasts for some seconds. At this point, other actions become available for the Guest if it's hungry:
Go To Restaurant: if the agent is hungry, it can go to the inn's restaurant and order some food
Order Food: once it's at the restaurant, the agent goes to a free table and decides what to eat. After doing this, all it has to do is wait until a Waiter takes the order and brings the meal
Eat: the Guest eats the meal brought by the Waiter, which removes the agent's hunger
However, if the Guest isn't hungry, it randomly decides its next action from a pool of possible activites, which are:
Go To Garden: the agent visits the inn's garden near the pool
Go To Swimming Pool: the Guest takes a bath in the inn's pool
Go To Sleep: the agent goes to sleep at its room
Activities 7-9 can only be performed until the agent must leave the inn. However, it the timer runs out while the Guest is eating, it will not exit the inn until it has finished having the meal. Once the agent's stay is finished, it follows this sequence of actions:
Get Luggage From Room: the agent goes back to its room one last time
Check Out: the Guest goes to the check-in area in the hall to return the room's key
Exit Inn: finally, the agent leaves the inn
The Bellboys's only purpose is to accompany the Guests to their rooms once they have done the check-in. For this reason, their pool of actions is smaller than the ones of the rest of actors. This agent's actions are:
Get Guest: the Bellboy goes to meet a Guest that has recently registered its stay
Take Guest To Room: once the agent has completed the previous action's objective, it takes the Guest to its room
Go To Main Hall: if there are no Guests to meet at the hall, the Bellboy simply goes to the hall to wait
This agent's actions are simple, and they are centered around taking orders from the Guests that are sitting at a table at the restaurant, and delivering the meals to the correct customers once the Cook has prepared them. Waiters can do the following actions:
Take Order: the Waiter goes to meet a Guest at a table and stores the information of its order
Take Order To Kitchen: the agent goes to the kitchen with the order and leaves it at the kitchen bar, from where the Cook will take it in order to prepare the requested meal
Get Meal From Kitchen Bar: after the Cook leaves a meal at the kitchen bar, the Waiter must go there to pick it up
Deliver Meal: the agent checks where is the Guest that ordered the meal and delivers it to the correct table
Go To Waiter Area: if the Waiter has no orders to take and no meals to serve, it goes to a place at the restaurant named the "Waiter Area", where it won't hinder the movement of other agents that try to pass through the restaurant
This agent's purpose is to cook the meals requested by the Guests. In order to do this, Cooks can perform the following actions:
Collect Orders: the Cook goes to the kitchen bar to get the orders that it must cook
Cook Meal: the agent prepares all the orders that it picked up from the kitchen bar
Take Meals To Bar: once the Cook has prepared the meals, it goes back to the kitchen bar and leaves them there, so that the Waiters can deliver them to the customers
Go To Kitchen: similarly to the Waiters and Bellboys, the Cook can go to a place in the kitchen if it has nothing to do