top | item 13963973

Stockfish – Strong Open-Source Chess Engine

198 points| mabynogy | 9 years ago |stockfishchess.org | reply

50 comments

order
[+] xal|9 years ago|reply
One aspect of chess that's really interesting is UCI which stands for univeral chess interface. It's a simple protocol that all engines "speak" and almost all pieces of chess software support. Chess players tend to collect engines that are good at certain things and then use whatever UX they are most comfortable with. At least in the past before Stockfish became so dominant.

The chess community in general is pretty technical. lichess.org is an absolute marvel of a website. It's full of brilliance and it's all open source. Interestingly it's computer analysis feature went through a notable progressions of approaches:

First it was server sided stockfish. Later they compiled stockfish via emscripten to .js so that analysis could run locally. This recently became PNACL for speed and finally even more recently WebAssembly for portability. Pretty cutting edge for the community of such an old game!

[+] lpage|9 years ago|reply
It's a community that knows low level CS/AI well. The chess programming wiki [1] is quite the knowledge hole for everything from bit twiddling hacks to obscure search algorithms.

[1] https://chessprogramming.wikispaces.com

[+] virtualwhys|9 years ago|reply
Interesting, lichess server-side is written in Scala, but client is straight js/jquery. I'd think they'd switch to Scala.js at some point, but if it works as is maybe no need to change anything...
[+] xoroshiro|9 years ago|reply
Wow, WebAssembly! I knew that Stockfish was really technical, and I spent some time looking at its source. But I did not know (even though I used to regularly use it) that lichess was also open source and that the chess community was also bleeding edge.
[+] ReverseCold|9 years ago|reply
UCI is undocumented for the most part... Or was that the ICS protocol? No clue, it's been a while. Everyone learns it by taking to other people.
[+] billforsternz|9 years ago|reply
For Windows computers Tarrasch Chess GUI http://www.triplehappy.com is a very simple way to experiment with Stockfish (it's installed as the default engine). Disclosure: I am the author of the Tarrasch Chess GUI.
[+] glinscott|9 years ago|reply
Very cool to see Stockfish up here :). One of the cool parts is that the testing framework is fully open as well, at http://tests.stockfishchess.org/tests. It's been pretty amazing to watch the progress of SF since it was put on github by Marco and Joona. http://spcc.beepworld.de/ has some nice graphs. Those graphs are in ELO scale as well, so a linear line is getting exponentially stronger.

Currently for example, there 87 machines, contributing 341 cores of computing power for testing patches. That's pretty awesome for completely volunteer driven community!

[+] posnet|9 years ago|reply
Wow, it's only 8000 lines of code.
[+] dfan|9 years ago|reply
Pull requests are regularly rejected for increasing the size of the codebase, even if they slightly improve the strength of the engine. It's hard to argue with the results.
[+] atemerev|9 years ago|reply
Wow, this is BY FAR the best C++ code I ever saw!

It should be a study in itself.

[+] 1ba9115454|9 years ago|reply
Chess can be life changing. To get to any decent level you have to think how your opponent will respond to your next move.

I found myself applying this to day to day life situations.

[+] nojvek|9 years ago|reply
Could some one explain how stock fish does its magic? What are the underlying algos it's using to beat humans like a fly swat.
[+] ch8230|9 years ago|reply
Here's a very simple web client I wrote if you want to give Stockfish a whirl: https://chessui.com/

Shameless plug I know but I'm posting it for those who want to give it a shot against stockfish.

[+] Aron|9 years ago|reply
So how are all the magical constants optimized?
[+] lenocinor|9 years ago|reply
I also want to know this.
[+] mrcactu5|9 years ago|reply
is this an effective tool for beginners?
[+] tbrake|9 years ago|reply
I will say no.

It's tough - maybe impossible - for engines to really accurately simulate lower level play. You usually get one of two outcomes : A) an opponent who plays 10 moves like God and then drops a rook out of thin air or B) essentially random moves.

Beginners have little use or value from the deep analysis engines can provide as well. Once they're stronger then they benefit more but until then it's just an opponent who stomps you every game and you can't even understand it when it tries to tell you why.

The most effective tools for beginning players will be playing other players (online or OTB) who are around the same level or slightly stronger and daily tactics training via tactical puzzles see: http://chesstempo.com, http://chess24.com and a host of others.

As well, the St. Louis Chess Club has a ton of great videos with GMs Seirawan, Finegold, Akobian, and others, starting at the beginner range and going up. I think beginners can get a lot of value out of their lectures.

https://www.youtube.com/user/STLChessClub

[+] chongli|9 years ago|reply
Stockfish is fantastic for analyzing your games to find where to improve. Don't use it until you've gone over the game first, though. You want to develop your own ability to recognize mistakes and then use the engine to check your work.

It's just like using a calculator while learning math: do the work first and then check for mistakes with the calculator.

[+] TylerE|9 years ago|reply
Depends on what you want?'

To play against...no. It will crush you like a cockroachh. it will crush a grandmaster like a cockroach....running on a smartphone.

[+] dragontamer|9 years ago|reply
Yes.

Get PCID vs SCID and have it analyze your games. Generally speaking, beginners make obvious mistakes, and Stockfish will automatically find those mistakes you make.

Every now and then, you miss an obscure "Checkmate in 12-moves" that Stockfish will see... just ignore those that are too difficult for you to visualize yourself. Otherwise, its excellent to have a 3300+ Elo player double-checking your moves after each game.

[+] gingerbread-man|9 years ago|reply
There are substantial differences in how people and computers play chess, at least with current algorithms (stockfish included.) If you want to learn to play chess against people, computer opponents can help in your training, over-the-board games are an absolute must as well.
[+] bambax|9 years ago|reply
According to this page

http://www.computerchess.org.uk/ccrl/404/

Stockfish has the highest ELO of all engines... but how can an open-source engine be best? How don't the other engines learn from it and become at least as good, if not better?