Pokedex

From UBC Wiki

Authors: Andy Liang, Lauren Luey

What is the problem?

We are trying to build a mini-pokedex.

The Pokedex is able to fetch information like where to find a Pokemon, what type a Pokemon is, what are Pokemon that are X type, what are Pokemon that live in X area. Just like in the game, the Pokedex also has the ability to learn about a Pokemon through "encounters".

The main question we are investigating is how suitable is Prolog to build a client side interface that can create HTTP calls, parse the responses, and manage performance by taking advantage of the language's knowledge base property in a cache-like way. Further more, we will investigate how to handle bad user input and whether prolog is built for error handling.

What is the something extra?

  1. Calling HTTP get requests to an external API
  2. Parsing JSON responses to get the information our Pokedex needs
  3. Using dynamic asserts into our KB in order to improve performance by reducing redundant HTTP get calls
  4. Error handling for every route

What did we learn from doing this?

We learned that indeed prolog can be used to create HTTP calls. We also learned that we can take advantage of Prolog's dynamic knowledge base system in order to "cache" HTTP call results in order to improve performance. We also learned that Prolog is capable of error handling, although it seems to take a second to process the error.

Links to code etc.

https://github.com/AndyLiang1/CPSC-312-Prolog-Project