stockfish.js icon indicating copy to clipboard operation
stockfish.js copied to clipboard

Add a link to documentation of UCI commands stockfish understands

Open franktopel opened this issue 5 years ago • 3 comments

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.

franktopel avatar Apr 16 '20 20:04 franktopel

http://wbec-ridderkerk.nl/html/UCIProtocol.html Stockfish UCI options https://github.com/official-stockfish/Stockfish

gbtami avatar Apr 16 '20 20:04 gbtami

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?

franktopel avatar Apr 16 '20 21:04 franktopel

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.

nmrugg avatar Apr 21 '20 07:04 nmrugg