Webbased chess engines for programming project

Discussion about chess-playing software (engines, hosts, opening books, platforms, etc...)
Post Reply
r3fresh
Posts: 1
Joined: Mon Jan 05, 2015 8:35 pm

Webbased chess engines for programming project

Post by r3fresh » Mon Jan 05, 2015 9:04 pm

Hi all,
I have previously created a small chess application that allows people to play chess against each other over the internet (so no AI, only rule checking). It was a hobby project for fun and to learn some programming stuff. I now want to build a new chess application and want to focus specifically on non-chess related features (finding opponents, keeping track of statistics, better UI etc). Eventhough I did implement the rule checking in my previous project I figure that there are probably chess-engines that do it much more efficient than I did and maybe implement an AI too.

So my question is: are there any open-source Javascript-based chess engines that can be used in commercial products?

I am looking for:
- chess rule checking (see if a move is allowed, 50-move rule, etc.)
- the engine should be able to provide all the possible locations for a given piece.
- The engine is written in Javascript. (if there is no such engine im also interested in PHP engines and Java engines)
- The application will run in the browser and stores moves on the server. For cheat prevention the server should do the rule checking. However, to reduce client-server communication and get a smoother experience I also want the rule checking to be done client side so that the client doesn't have to wait on the server to find out if a move is valid or not. So I need either two different engines or an engine written in a language that can run both in the browser and on the server.
- Would be nice to also have an AI to support single player games too, but this is not a strict requirement.
- preferably the engine also provides chess notations of a move. (not a strict requirement either)

Hope something like that exists, otherwise I'll just have to use my own rule-checking code.

Any tips are welcome!

Gr. Stefan

pgn4web
Posts: 97
Joined: Mon Jun 14, 2010 10:26 pm

Re: Webbased chess engines for programming project

Post by pgn4web » Wed Jan 14, 2015 5:07 pm

They are probably not exactly what you are looking for, but these are a few javascript based chess engines:
- cinnamon: http://cinnamonchess.altervista.org/
- garbochess: https://github.com/glinscott/Garbochess-JS
- lozza: http://op12no2.me/toys/lozza/
- stockfish-js: https://github.com/exoticorn/stockfish-js

You might also want to look at this project that provides a generic chessboard, without playing engine, but with rule checking:
- chessboardjs http://chessboardjs.com/

Post Reply