Runescape

From UBC Wiki

Title

Authors:

Mitchell Currie, Julian Chan

What is the problem?

State the general problem. If applicable, tell us what information you will use, e.g., a link to some web site that provides the information you used. What will you do?

We will attempt to create a program to answer queries for the infamous game, Runescape. This program will in essence act as a guide for new players. Possible queries may be:

- What kind of armour should I buy?

- What kind of weapon should I buy?

- Where should I be training?

- Where can I find this item drop?

What is the something extra?

To significantly reduce the amount of hardcode, we will attempt to dynamically populate our knowledge base from a JSON API containing various in game information.

What did we learn from doing this?

We found that prolog was quite the suitable language for the NLP tasks we wanted to implement for our project. By constructing numerous variations of the possible questions that a user may ask our program, we were able to handle many queries. By breaking down a question into different parts of speech, the program was much more manageable not only in the sense of organizing our code, but also scalability. By having such a modular program, it was incredibly easy to create new types of questions for the program to handle. The pattern matching nature of the program allowed for incredible flexibility in how a sentence could be constructed. As a consequence, often times we would add a new fact to our knowledge base and without even realizing it, we’d be able to handle queries we didn’t even think about.

For our extra deliverables, we included the ability for users to dynamically allocate new facts to the knowledge base. Although, it was not immediately obvious how to do this because of the scarcity of resources for learning Prolog functions, creating facts dynamically took merely a couple lines. Firstly, we would prompt user for input, followed by setting the input as a new fact.

Our other extra feature was to allow for creating the knowledge base of facts by parsing in a json object which would contain all the facts. Again, this was not obvious as to how to achieve such action in Prolog because of the scarcity of information. We found that it was possible to call the JSON api and receive some kind of object in prolog (not a json object). We would have to parse the information through clever use of pattern matching in order to filter out unnecessary characters so that we could extract the information we wanted. Once we got the information from the key value pairs of the objects, populating the knowledge base with this information was much like how we created the dynamic data in our earlier extra deliverable.

All in all, Prolog met our expectation with its proficiency in handling a NLP program. Though often times information was hard to find, attending office hours to get help was usually just enough to get us moving again whenever we got stuck.

Links to code etc

https://github.com/juwlz00/runescape/blob/master/runescape.pl