Hotel Booking

From UBC Wiki

What is the problem?

Hotels receive a large number of room bookings every day through online services and other means. Once a guest has checked in to the hotel, they are unlikely to want to switch rooms. In order to maximize profits, it is important to assign a room to each guest in an efficient way so as to maximize the number of filled rooms each night.

What is the something extra?

Using a knowledge base of room booking requests, we will create an optimization function using prolog to maximize the hotel's profits over the booking period.

What did we learn from doing this?

Through completing this project we have seen that prolog has excellent support for HTML,CSS and Javascript. This feature set of prolog means that building web applications is greatly simplified, and by integrating prolog's side effect free programming style we can easily build responsive and fast web pages.

Prolog's builtin findall function allowed up to generate exhaustive lists of tuple data structures which formed the basis of the bookings optimizer, however this function was difficult to work with when using more complex data as a template (tuples worked fine, but lists of tuples did not). The problem we attempted to solve turned out to increase exponentially in size, which quickly caused issues with stack space and runtime, something we did not anticipate at the start. Fixing the stack space issues was simple with a few tweaks to the powerset function - limiting the resulting list to valid entries only, instead of generating the list and then filtering for valid entries.

Links to code etc