CPSC312-2018-Connect-4-Prolog

From UBC Wiki

Connect 4

Authors: Minxing Wang, Stephen Hou

What is the problem?

We will use Prolog to implement the game Connect 4.

What is the something extra?

We will add a computer player to the game that will compete against real people.

What did we learn from doing this?

We learned about some of the benefits of using Prolog over Haskell. For example, in Prolog it was much easier to write concise code by ommiting type declarations. We learned that you can repeat a procedure until it succeeds and the ! operator stops back tracking. Prolog also makes printing very easy. Lastly, Prolog provides some very powerful ways of trying all the possible states. This made it much simpler when checking for Connect4 win conditions.

Links to code etc

https://github.com/stephenhou/connect4-pl