GithubHelp home page GithubHelp logo

thinktt / bot-o-tron Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tailuge/bot-o-tron

0.0 1.0 0.0 941 KB

Try out lichess' bot interface

License: GNU General Public License v3.0

JavaScript 100.00%

bot-o-tron's Introduction

bot-o-tron

Build Status Coverage Status Dependency Status devDependency Status CodeFactor Open in Gitpod

Try out lichess' bot interface https://lichess.org/api#tag/Chess-Bot

Setup

$ nvm use v10.15.3
$ yarn install

# Linux
$ export API_TOKEN=xxxxxxxxxx

# Windows
$ setx API_TOKEN xxxxxxxxxx

Test

$ yarn test

Run

$ yarn start

To implement your chess bot you only need to create one class that implements the method:

  getNextMove(moves) {
      return uciMove;
  }

Where moves is a list of moves so far in uci format e.g. ["e2e4", "b8c6", "f2f4"]

See RandomPlayer for minimal implementation using chess.js

Hosting

If you register a free heroku account you can host a BOT like this one as is - just add your API_TOKEN to the environment property configuration. This code auto deploys and is live at https://test-o-a.herokuapp.com/

Hostless

You do not need to own a server to host a BOT, this code also runs in a browser. Watch how a BOT communicates with the server https://tailuge.github.io/bot-o-tron/dist/testBot.html

Tounaments

Compare bots locally - and the winner of the 8 x round-robin tournament is...

$ yarn tournament

Results
[ { player: 'AntiPatzerPlayer    ', score: 32.5 },
  { player: 'PatzerPlayer        ', score: 23 },
  { player: 'RandomPlayer        ', score: 22.5 },
  { player: 'SwarmKingPlayer     ', score: 18 } ]

bot-o-tron's People

Contributors

tailuge avatar harrymt avatar thinktt avatar

Watchers

James Cloos 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.