/Prolog-Chessbot

Logical Programming 2020-2021: project

Primary LanguageProlog

Prolog Chess Bot

Chess bot written in Prolog. This bot will take a chess board from stdin and print the best next move, determined by alpha-beta pruning, to stdout. This chess bot was written as project for the course Logical Programming 2020 at Ghent University

Install

Make sure to install the SWI Prolog Suite (swipl) and GNU Make before getting started.

Running

All moves Mode

This mode will take a board from stdin and return all possible next moves to stdout.

cat boards/start.txt | make all-moves

Next move Mode

This mode will take a board from stdin and return the next best move, determined by alpha-beta pruning, to stdout.

cat boards/start.txt | make next-move

Testing

To run all available unit tests:

make test

Building docs

To build the PLDocs run:

make docs