Javascript/WASM Engine with permissive license

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

grandmastermac
Posts: 15
Joined: Mon Apr 20, 2020 7:07 am
Full name: Paul Macdonald

Javascript/WASM Engine with permissive license

Post by grandmastermac »

Hi there, we have a project where we need a chess engine that plays orthodox Chess that is suitable for web assembly or Javascript, and also has a permissive license. The project involves adapting it to playing our variant requiring three pieces moves to be modified. A rook to a chancellor (so it moves rook+knight). The knight to a wildebeest - also known as a unicorn (so it moves 2+1 and 3+1). And a bishop to an arch-bishop (so it moves bishop+knight).

We want to build bots that can play the game at various rating levels ranging from 100 up to 3000 preferably by configurable parameters.

Anybody know of something that would do the trick?
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Javascript/WASM Engine with permissive license

Post by Ras »

Garbochess-JS (BDS-3-clause): https://github.com/glinscott/Garbochess-JS
That's the only JS engine with permissive licence that I know, the others are under GPL.
Rasmus Althoff
https://www.ct800.net
grandmastermac
Posts: 15
Joined: Mon Apr 20, 2020 7:07 am
Full name: Paul Macdonald

Re: Javascript/WASM Engine with permissive license

Post by grandmastermac »

Thanks Ras - this was really helpful.
User avatar
yurikvelo
Posts: 710
Joined: Sat Dec 06, 2014 1:53 pm

Re: Javascript/WASM Engine with permissive license

Post by yurikvelo »

Garbochess upper limit is ~2000 elo, not 3000
grandmastermac
Posts: 15
Joined: Mon Apr 20, 2020 7:07 am
Full name: Paul Macdonald

Re: Javascript/WASM Engine with permissive license

Post by grandmastermac »

Thanks Yuri - do you know if GarboChess-JS has been tested anywhere?
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Javascript/WASM Engine with permissive license

Post by hgm »

There is a GarboChess 3.0 in the CCRL 40/15 list, rated 2587/2537 (64bit/32bit). But I guess these are not the JavaScript versions.
fabianVDW
Posts: 146
Joined: Fri Mar 15, 2019 8:46 pm
Location: Germany
Full name: Fabian von der Warth

Re: Javascript/WASM Engine with permissive license

Post by fabianVDW »

Well, FabChess (as Rust) engine can theoretically be made to compile on WASM, and there are current efforts for doing so, although it is not quite there yet, and I am also really unexperienced in that area, but I have one contributor on the project being interested in compilation for WASM . License is also BSD-3, although I can not guarantee I will support your endeavours, you can go ahead and do with Fab what you want.
Author of FabChess: https://github.com/fabianvdW/FabChess
A UCI compliant chess engine written in Rust.
FabChessWiki: https://github.com/fabianvdW/FabChess/wiki
fabianvonderwarth@gmail.com
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Javascript/WASM Engine with permissive license

Post by Ras »

hgm wrote: Mon Apr 27, 2020 11:10 pmThere is a GarboChess 3.0 in the CCRL 40/15 list, rated 2587/2537 (64bit/32bit). But I guess these are not the JavaScript versions.
This is likely the C++ version. The tomitank Github repo (JS engine under GPL3) says that pure JS is 5 times slower than C. If we assume 60 Elo per doubling, that's 140 Elo, so the JS version of GarboChess should be around 2400.
Rasmus Althoff
https://www.ct800.net
User avatar
yurikvelo
Posts: 710
Joined: Sat Dec 06, 2014 1:53 pm

Re: Javascript/WASM Engine with permissive license

Post by yurikvelo »

For online game (is pondering possible??) 40 minute time control seems unapropriate. Top hardware is unexpected.
Maybe fortification with deep-book (Brainfish-style) can help.
grandmastermac
Posts: 15
Joined: Mon Apr 20, 2020 7:07 am
Full name: Paul Macdonald

Re: Javascript/WASM Engine with permissive license

Post by grandmastermac »

Thanks Harm, Fab, Ras and Yuri. All useful comments.