Skip to content

bjarnithor99/abstractboardgames

Repository files navigation

Project Description

Table of Contents

About

This repo contains the source code for our BSc final project at Reykjavik University. The project is split into a few parts (described below). For more details, see the project’s description below, the READMEs in relevant subfolders, our final report, or the code itself.

The team consists of Bjarni Dagur Thor Kárason and Guðmundur Freyr Ellertsson. Professor Yngvi Björnsson is our instructor.

A Framework and a Language for Abstract Board Games

As a part of ongoing research into general game-playing systems, this project proposes developing a software framework for describing and playing abstract board games. The framework will have three main components: a well-defined game description language, a game-playing agent, and a learning module, each described in more detail below.

The Game Description Language

The game description language expresses the rules of the abstract board games, such as piece movements and terminal conditions. The language needs to be expressive enough to describe popular chess-like games, including western and Chinese chess, yet, at the same time, simple enough to allow for a fast interpretation. The game descriptions compile into runnable Python/C++ code. This component will extend the students’ knowledge of compiler techniques.

There are two language implementations in this repo. The C++ implementation supports the language described in cpp/language_description.txt. This is the implementation used to compare framework to similar existing frameworks. For instructions on how to use it see cpp/README.

The Python implementation supports the language described in PythonParser/language_description.txt. This implementation aims to support a self-contained language. For instructions on how to run it see GameEngine/README.

The Game-Playing Agent

The game-playing agent will be Alpha-Zero-like, using a Monte-Carlo tree search and a deep neural network to control the think-a-head search process. The search will call the compiled game description to provide the game-specific logic. This component will extend the students’ knowledge of artificial intelligence, particularly of informed search methods.

We implemented a few agents to (learn) and play games described in our language. The can be found in Agents/. For instructions on how to train agents see Learning/README. For instructions on how to play games againsts agents (or your friends) see GameEngine/README.

The learning module

The third and last component allows the game agent to autonomously learn game strategies via self-play, using deep neural networks and reinforcement learning.

For instructions on how to use the learning mode see Learning/README.

Deliverables

The project will have three main deliverables:

  • a working software prototype
  • a BSc thesis report,
  • a conference paper, describing the framework and comparing its effectiveness (e.g., expressibility and efficiency) with similar existing frameworks.

Requirements

All the required dependencies for this project (except Doxygen) are listed in requirements.txt. You may want to install PyTorch differently depending on your CUDA version. The requirements can be installed by running

pip install -r requirements.txt

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published