Course:CPSC312-2024/Smashdle

From UBC Wiki

Authors: Jordan Sue, Matthew Lai

What is the problem?

We will be implementing the guessing game Smashdle in prolog.

What is the something extra?

We implement the game with a basic UI instead of playing the game from console.

What did we learn from doing this?

  • Prolog can be used to efficiently query user inputs to compare against a given dataset making the logic in coding Smashdle quite simple. This is due to the fact that Prolog is rule based and since the whole game of Smashdle is essentially made up of true or false rules it could easily be represented in Prolog.
  • Manually creating the dataset is tedious, but there is some flexibility as types minimally interfere with the attributes of data.
  • How to create a GUI using XPCE for Prolog programs, and dealing with trying to use very old libraries.
  • However, Prolog is slightly inefficient in debugging, although there is a trace function running traces on recursive functions can be tedious and give a lot of extra information that is not needed.

Work division

  • Dataset, Jordan and Matthew
  • Backend, Matthew
  • Frontend, Jordan

Links to code etc.

https://github.com/mklai10/smashdle