Coder Social home page Coder Social logo

gmurro / tablut Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 2.0 22.59 MB

Game Player for Fundamentals of Artificial Intelligence and Knowledge Representation class at @UNIBO

License: MIT License

Java 99.94% Shell 0.06%
tablut game-board tree-search minmax-algorithm iterative-deepening-search

tablut's Introduction

♟️ Tablut Challenge 2020

Tablut is an ancient board game which was popular in nothern Europe and whose story is still uncertain. The game board is grid of 9x9 squares where two players alternate in moving their checkers:

  • attacker (black soldiers)
  • defender (white soldiers and one king)

This repository contains an Java-based intelligent agent able to play to the game and it was designed to take part in the Tablut Students Challenge 2020 of the Fundamentals of Artificial Intelligence and Knowledge Representation course held at the University of Bologna.
The agent is based on one of the many versions of the rules for this game, known as "Ashton Tablut" (whose rules are explained in this paper and more briefly in these slides) and it interact with a Server maintained by tutor Andrea Galassi.

Strategy adopted

Both white and black players have been implemented using Iterative Deepening search combined with MinMax algorithm and AlphaBeta cuts. Simple heuristics described in these brief slides guarantee a deep exploration of the game tree.

Results

1° place in the group stage and in the final standings.

Out of a total of 16 games, our player won 13 games, drew 2 and lost 1. Congratulations to all participants, but especially to team tabloidi for being the only team to defeat our player. You can see the awards and results obtained in the competition in this folder or at the offial page.

Download

First of all, you need to download the project through cloning.

git clone https://github.com/gmurro/Tablut.git
cd Tablut

Requirements

You need to have JDK >= 11. From Ubuntu/Debian console, you can install it with these commands:

sudo apt update
sudo apt install openjdk-11-jdk -y

Run

To start playing, you will simply move in jars directory and run the Server with:

java -jar Server.jar

Then you will run either black and white artificial intelligent player:

./runmyplayer black 60 localhost
./runmyplayer white 60 localhost

You can run players also with different parameters:

./runmyplayer <role> <timeout-in-seconds> <server-ip> <debug>
    
    <role> : role of the player in the game (black or white, it is mandatory)
    <timeout-in-seconds> : time taken by the player to find the best moves (default: 60, not mandatory)
    <server-ip> : ip address of the server (default: localhost, not mandatory)
    <debug> : if this argument is explicit, player print logs during the search of the next move (default: none, not mandatory)

Resources & Libraries

Versioning

We use Git for versioning.

Group members

The name of group enrolled in the Tablut Students Challenge 2020 that presented this project is brAInmates.

Reg No. Name Surname Email Username
997317 Giuseppe Murro [email protected] gmurro
985203 Salvatore Pisciotta [email protected] SalvoPisciotta
1005271 Giuseppe Boezio [email protected] giuseppeboezio

License

This project is licensed under the MIT License - see the LICENSE file for details

tablut's People

Contributors

giuseppeboezio avatar gmurro avatar salvopisciotta avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.