Course:CPSC312-2017-Movie-Guru

From UBC Wiki
Jump to: navigation, search

Movie Guru

Authors: Wyatt Verchere and Gurjosh Jhinger

What is the problem?

Many people on a day to day basis face the arduous struggle of not knowing what movie to watch with their precious free time. What if they pick the wrong one and end up an hour later having watched Tommy Wiseau complaining about Lisa and questioning their entire life.

A movie recommender is the solution. We intend to create a basic natural language program that allows the user to ask for different recommendations of movies to watch depending on different criteria. For example, they might be a really big fan of Ryan Gosling and will want to see another movie with him in it, or they might end up wanting to see a horror movie instead. Asking our program (in natural language) should return with a random recommendation from a database of movies. The database should also be able to be queried for information about a given movie, such as who the stars were or what genre it is.


What is the something extra?

We want to include the ability to modify prolog's database. We never learned about this in class and want to know if its possible for the facts prolog pulls from to change over the course of its runtime.

We plan to implement this by adding customization to the user's preferences. Perhaps after they watched The Notebook, they decide they really don't like Ryan Gosling after all, or maybe just romances in general. They should be able to tell the Movie Guru this, and the Movie Guru should take this into account and no longer recommend Ryan Gosling movies when asked for recommendations in the future.

What did we learn from doing this?

Is logic programming suitable for (part-of) the task?

Logic programming is perfect for the task at hand. We are not doing any complex algorithms or analysis of the data, simply returning facts about the database according to modifying specifications and it fits really well in prolog.

We designed our KB as one fact per movie asserting all their values together, but we could have easily done it with triples or any of the many other options logic programming has to offer. It is very easy to implement a natural language parser in logic programming and because of these I would argue it fits the task perfectly.

Is the code readable and well documented? Does it give the intended interpretation for all symbols? Would someone else be able to take your code and build on it?

We've separated the code into distinct sections and provided comments for all the methods and symbols we used. It should be very easy to read and interpret what we have done. It should also be possible to build on our code to create a more functional system- however, one issue we found is that if we wanted to build further on it we should have used a system such as triples/prop instead of invent our own, as it made the code kind of hard to build upon and add new values to (For example, if we wanted to add a third actor or add the director we would have to modify almost every function.

Code: github.