Giter Club home page Giter Club logo

kamisado's Introduction

Presentation

This is a program that play the single round basic version of the game Kamisado, you can find the rules here. It provide severals AI and a graphical displayer.

How to run

Dependences

  • SFML

Compilation

cmake CMakeList.txt
make

Launch

python3 interface.py first_player_ai_exe_name second_player_ai_exe_name referee_exe_name display_exe_name (facultative)

Available exe after compilation

  • Kamisado_IA_MCTS : An AI that use an MCTS algorithm to play
  • Kamisado_IA_Minimax : An AI that use a minimax algorithm to play
  • Kamisado_IA_Ramdom : An AI that play at random
  • Kamisado_Referee : The referee that validate each play and announce the end of a game
  • Kamisado_Display : The displayer of the game, using SFML

Launch example

python3 interface.py Kamisado_IA_Ramdom Kamisado_IA_MCTS Kamisado_Referee Kamisado_Display

How to add an AI

You just need to have a program looping over stdin and writing to stdout in reaction to these commands :

Commands Response Other action needed
init\n = \n\n Initialize your board and anything else your program needs to function
name\n = PROGRAM_NAME\n\n
move R1 C1 R2 C2\n = \n\n Update your board so that move has been played
genmove\n = R1 C1 R2 C2\n\n or = resign\n\n Calls your AI to provide to move you want to do depending on the current board state (and update your board with that move)
quit\n = \n\n Do any clean up your program need, send the response and quit.
other or in case of problem = ?\n\n

Note : R1 C1 R2 C2 corresponds respectively to the starting and the ending row and column of a piece.

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.