Course:CPSC312-2016-Settlers-of-Catan

From UBC Wiki

Settlers of Catan

Authors: Avery Beardmore, Adrian Palidis, Roxy Promhouse

What is the problem?

Settlers of Catan is a popular multiplayer boardgame. Settlers was the motivation for an article on using Monte-Carlo Tree Search as a learning agent. In the paper, the agent was implemented in Java.

The goal of our project is to explore how Settlers of Catan may be implemented in Haskell. We further seek to implement a learning player that uses the Monte-Carlo Tree Search algorithm.

What is the something extra?

The biggest component to this project will be attempting to build a game board for Settlers of Catan in Haskell. The board will be represented as a complex data structure. As the game contains many individual components, these will be constructed with independent functions.

Based on the success of our implementation of Settlers of Catan, we will also implement a smart player that uses the MCTS. The player will be able to, given a game state, choose an effective strategy and improve its position in the game by simulating the results of several games before making its decision.

What did we learn from doing this?

Overall, Haskell was fairly useful for implementing some of the features of a basic game board for Settlers of Catan. Many of the individual components in the game are list structures. The list comprehension functionality worked extremely well for the implementation of those constructors. In addition, it encouraged adhering to best practice guidelines for building modular systems.

Due to time constraints, we were unable to complete the smart player implementation. Some rules of the game and game functionality had to be cut for the scope of this project, but the program could be expanded to accommodate these rules. Some of these elements include the game board graphics, the trading system rules and the robber. However, while it would be possible to accommodate these elements, it would be harder and much more time consuming to implement them using functional programming versus object oriented programming.

By extension, although we did not have time to complete the smart player, the research we did suggests that an AI implemented with the MCTS algorithm is entirely possible in Haskell, and takes advantage of the fact that Haskell allows the tree definition to be separate from the algorithm that walks it.

In conclusion, while we believe it is feasible for Settlers of Catan to be implemented in Haskell, object oriented programming would be better suited for the implementation of this project.