CPSC 312 Project 2: Kenneth and Kelvin

From UBC Wiki
Wiki.png
Section:
Instructor:
Email:
Office:
Office Hours:
Class Schedule:
Classroom:
Important Course Pages
Syllabus
Lecture Notes
Assignments
Course Discussion
[[Category:]]


What is the problem?

We will attempt to create a Clue simulator in Prolog. For simplicity, we will try to faithfully recreate the main mechanics of the game (e.g. guessing murderer, weapon, and location, etc.) but not the more complicated aspects of the game pertaining to the board (e.g. keeping track of player position on the board so that rolling dice will allow them to move into a room, etc.) We will refer to this website for the rules of Clue.

What is the something extra?

We will attempt to create a non-trivial AI that is capable of playing with the user. The AI should make informed decisions that will lead to a correct accusation.

What did we learn from doing this?

Logical programming was relatively useful in designing the AI as it was much easier to allow the AI to make informed decisions regarding the current game state than in Haskell. In Haskell we had to pass the game state as an argument in each and every function to ensure continuity whereas in Prolog we were able to use its database and logic aspects to easily keep track of game state. This ease of access to information from the game state allowed the AI to make decisions with respect to previous suggestions from the player, what cards the NPC has in their hand, etc. and also let us use logical programming effectively to make sure the NPC only made decisions that would narrow down the solution space to solve the murder of Mr. Boddy.

Links to code, etc.

Code