Course:CPSC312-2017-Game-Recommendation

From UBC Wiki

Game Recommendation Project

Authors: Marcus Wong, Alexander Lim, Felix Tso

What is the problem?

As developers continue to push out new games, gamers end up having a huge pool games to choose from, which can be overwhelming. To solve this, we can have a program that provides recommendations on games to play next based on queries made by a gamer. The user would be able to write queries with varying constraints such as rating, genre, release dates and graphics requirements. For example, if the user just finished a game that they really enjoyed, they can ask the program queries like: “What are games similar to X”. The program will then process this query and then set out to find games in the knowledge base that are in the same category. Similarly, if the user dislikes a certain type of game or genre, they can query for it as well and the program will fetch games that aren’t like the ones specified.

What is the something extra?

An extension is that we can retrieve data about games from a JSON API hosted on the web that provides games and information about them such as name, genre, ratings, release dates and graphics requirements. Also, on top of this extension the knowledge base can be created dynamically before any queries need to be run on our program. The program can have a function that will call the JSON API, parse the data and then dynamically create the knowledge base facts based on this data.

For the project to be useful, it should be easily extendable to other domains besides gaming. There should also be several new constraints that could be in the queries based on the domain that it is being asked about. We could extend this project to also recommend movies and TV shows to user. It will be using a similar algorithm as a user will be able to write queries with constraints such as rating, genre, release dates, actors and directors as well. Being able to extend the project to things other than games would make it a useful project, with meaningful applications to several different areas in the real world.

What did we learn from doing this?

We managed to complete our project and extra requirements. Our project has the functionality to call from a JSON API that contains information about games, then parse the data for use in our program. Also, the program can run a function that populates the knowledge base with the game information upon initialization, so the knowledge base is actually created dynamically and no hard coded facts are needed.

Our program then gives the user ability to ask for game recommendations through a command-line interface. For example, the user can ask queries such as "What is a game that is similar to X", and it will be able to match games that have similar genres to game X. Our program is also flexible in the way users can ask queries: For example, a user can also say "Recommend a game with the same release year as X" and it will recommend games that were released in the same year. Also, users can ask a query like: "What is a game that is not similar to X" and it will return games that are of different styles from X. Our program is also built to be extended to several different domains and also can support more NLP rules.

Logic programming was suitable for certain parts of the task and not suitable for some: In particular, for the NLP, Prolog was suitable for that task as it is easy to parse sentences into different syntax categories such as nouns, adjectives, determiners, etc. There is evidence of this in our project as Prolog can easily parse the sentences we passed in into nouns, adjectives, determiners and even relationships between objects.

However, parsing the JSON could have been a lot easier to understand with imperative programming languages such as Java, Python, etc. It took us a lot more time to do the JSON API calls + parsing with Prolog compared to other languages mentioned above. Figuring out how to do the JSON parsing was difficult because of the lack of resources online, but it can parse things with less lines of code.

Overall, this project helped us gain a more solid understanding of how Natural Language Interfaces work. We learned how to extend the existing interface to include more rules, questions and parse different sentences. We also learned how to create HTTP requests in Prolog and parse JSON as well. An interesting lesson from this project was learning how to build a big Prolog program with useful functionality.

Project Submission

Here is a link to the project on GitHub: https://github.com/alexsclim/Game-Recommender