Course:CPSC312-2023-Checkers

From UBC Wiki

Authors: Jordan, Avery, Chris

What is the problem?

We will be implementing Checkers using the command line interface. The board will be printed to the command line and users input moves using a coordinate system. A list of possible moves is printed to the console each turn, to aid the player with inputting moves. Players can choose to play against bots of varying difficulty, from easy to hard.

What is the something extra?

We implemented an AI that uses the Min-Max algorithm to determine the best moves to a certain depth. The value function used in the Min-Max algorithm is as follows:

Where is the value of a piece belonging to player 1, and n is the number of pieces player 1 owns. We arbitrarily set the value of common pieces to 1, and kings to 4.

What did we learn from doing this?f

Functional programming was pretty suitable to this project. Haskell's strong type system aided with finding a lot of bugs during compile time, when objects weren't the types we expected. We learned the value of pattern matching and guards to really simplify functions and cover all possible cases of input.(This should be written after you have done the work.) What is the bottom-line? Is functional programming suitable for (part-of) the task? Make sure you include the evidence for your claims.

Links to code etc

https://github.com/AveryQuan/CS-312-project