GithubHelp home page GithubHelp logo

koikoz / chess.com Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scaljeri/chess.com

0.0 0.0 0.0 64.83 MB

A chess bot for chess.com

Shell 0.41% JavaScript 2.03% Python 0.67% TypeScript 95.90% HTML 0.75% Dockerfile 0.25%

chess.com's Introduction

This project is an experiment where I wrote a chess bot for chess.com. You can checkout my article about this project here.

Install

$> lerna bootstrap

or

$> yarn 

Build

 $> lerna run build

Run - WebAssembly Stockfish

My chess bot can be started as follows

$> lerna run start:bot

If you're lucky it will work and the browser will start and it shows the injected display at the bottom left corner. If you select a bot and hit Play the WebAssembly Stockfish will start playing.

Note: If it doesn't work you can go to package/bot and run yarn build and yarn start which will give you more detailed output!

Run - Docker Stockfish

It is also possible to run the Docker Stockfish engine, which plays stronger. For that to work you need to reconfigure the bot (README). This bot also uses my OpeningBook, but that will probably not work out of the box ( README). It will however work without it.

Finally you have to configure the browser bundle a bit. Open the file [./packages/bot/src/frontend/environment.ts](packages/bot/src/frontend/environment.ts). It will have these lines

        // **** BOT CONFIGURATION ****/
        // Pure browser engine
        'chess.engine.browser': 'browser.chess.engine.stockfish',
        'chess.uci': 'browser.chess.uci.browser'

        // Combi engine
        // 'chess.engine.browser': 'browser.chess.engine.stockfish',
        // 'chess.uci': 'browser.chess.uci.combi',

        // Pure backend engine
        // 'chess.uci': 'browser.chess.uci.backend

This is where I tell my DI what to inject. Comment out the 2 lines below
Pure browser engine and uncomment the single line below Pure backend engine. Thats all, lets build this and play (from the root of the project)

$> lerna run build
$> lerna run start

Thats it, good luck with that. If things don't work and require a fix or improvement, please feel free to create a Pull Request!!

Nice games

  • 4303717585
  • ...

Bookmarks

Checkout the other READMEs as well

chess.com's People

Contributors

scaljeri avatar mccallw23 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.