stockfish.js
stockfish.js copied to clipboard
Add a link to documentation of UCI commands stockfish understands
I'm trying to create a webcomponent based on this and chess.js alongside chessboard-element.js.
The idea is to create a component anyone can drop into their webpage, so that users of that webpage can play chess against stockfish on the website, with stockfish.js running solely on the client.
To get there, first thing I'd need is a complete documentation of the UCI messages that I can control stockfish with.
I did about 2 hours googling for this, but wasn't able to come up with anything worthwhile calling a documentation.
Can you help?
If so, please add these links to your readme.md.
http://wbec-ridderkerk.nl/html/UCIProtocol.html Stockfish UCI options https://github.com/official-stockfish/Stockfish
Thank you for your quick answer. Those were links I was able to come up with when I googled.
I was hoping for some sort of real programming API that understands JSON. I suppose there's nothing remotely similar to the likes of
stockfish.position('
{ "white":
{ "pawns": [ "a2", "b2", "c4", "d2", "e2", "f2", "g2", "h2" ],
"king": "e1",
"queens": [ "e1" ],
. ..
},
"black":
{ "pawns": [ "a7", "b7", "c7", "d7", "e5", "f7", "g7", "h7" ],
...
}
}')
Does, to your knowledge, anything similar exist?
I don't know of anything like that that is freely available.
You could take a look at load_engine.js. It is the very beginnings of an API to work with the engine. However, it follows along the lines of the UCI protocol.
I agree that UCI is not a great protocol, but chess programming has never focused much on ease of use. With some work, you could turn load_engine.js into what you want.