Stockfish how to use
Stockfish how to use
Improve your chess understanding using Stockfish!
How does the engine think?
When we are deciding what to play in any given chess position, we consider some of our possibilities and our opponent’s probable good replies to the moves we are considering, and then we try to judge who’s better at that point we are anticipating ourselves to; maybe two, three, four moves in advance: “I want to play this, then he/she could play this, and after that I have this move and I like this resulting position”.
Unlike our human minds, which start considering a move based mainly on our chess knowledge, a computer chess engine can “calculate” all possibilities in any position.
The engine then determines who has the advantage using evaluation functions based on mathematical algorithms and parameters. Such as material unbalance, central pawns, exposed enemy king maybe. It is extremely complicated, at least for me! (If you’re interested on learning more you can check out this article https://chess24.com/en/read/news/how-do-chess-engines-think)
Long story short, these evaluation parameters aren’t flawless; there are certain gaps where they simply do not apply.
When the machine gets it wrong:
The next game, played by actual people, for real, is a brilliant example of when the “machine” gets it wrong.
Black’s turn, Stockfish is showing winning advantage for white, did you verify that? It is reasonable, the g3-bishop is worthless for black and b6 in the next move seems unavoidable, after that black’s position collapses. Hot to prevent b6? There’s no way, apparently. Stockfish shows Be1, Qa8, Kb7. these all lead to an excruciating position for the player with black’s pieces. But it gets interesting, THERE IS a way to stop b6, is just that the “machine” can’t «see» it, but a human player did, in the actual game, Laszlo Hazai played
b6 is stopped!! Is this a good move? Stockfish keeps saying white is winning.
After taking the Queen, white plays h4. The only way to try to open a path for the Queen so it may attack through the h3-c8 diagonal, or else, the Queen could be useless.
3. gxh4 4.Qd2 h3!! was played. No open diagonal for anyone!. And also a move the machine can’t «see»
There’s nothing better for white than a draw. A few more moves were played. I bet the player with the white pieces couldn’t believe his eyes, nor could I if this had happened to me. Stockfish still doesn’t «believe» it, keeps showing winning advantage for white. But the fact is that material advantage is only a real advantage if it’s effective to checkmate the opponent’s King, which is never gonna happen here. This is a game a human player find the way to save, and «the machine» would have lost.
When the machine gets is super right:
Ok, so the “machine” can get it wrong a tiny percentage of the times, very unusual times, what about when it gets it super right, but it is almost impossible for a human player to emulate or to imitate its “reasoning”.
White to play. At this point g4 had just been played, and Kortschnoj faced the threat of the collapse of the king side pawns barrier, especially h3 is threatened. So he, most humanly, played fxg4. Seems very reasonable and close to the only way to defend the king side, but it surrenders the battle entirely, black pieces find their way in all the same, and there’s no way to stop it.
So, what’s Stockfish’s solution to this problem? Not to defend h3 at all!
Looks surreal to give up, kind of, the defense of the king side, very few players would even consider this, Kortschnoj didn’t. Easy for Stockfish to «see» it, not for a human player. The justification for this is in move 25.a7!, you’ll see.
The most human reply. Results in a completely lost position for black. Bxa6 (not a good idea), g3 (better), and Qg7 (actual good fighting chance) were other possibilities, but lets not get into that.
King’s Indian players know that losing the c8-bishop could very well mean losing all chances to attack the king side, and in this defense, it all comes down to attacking the king. From a human point of view, to sacrifice material in exchange for that bishop makes perfect sense for white pieces, although it’s hard to considerate it from 23.a6. For the machine, it «makes sense» simply because it’s anticipating all possible outcomes, and very few humans, if any, can actually do that
The king gets ready to run to the queen side, will be safer there. Bxf1 and Qxf1 would also work, but I think running with the king is more human and simplier and the simplest answer is ussually the right one.
No way to stop white’s threats, no counterplay, no defense, no nothing.
Complicated, messy, tactic positions, that can be solved with pure calculation, that’s when the engines do their best work. The «machine», unlike us humans, doesn’t sweat, has no expectations, no knowledge bias, and simply anticipates almost everything.
How to use Stockfish then? Some tips:
Chess games aren’t perfect, not even Carlsen’s, that’s not the goal, we all make mistakes.
When you play a chess game, you’re playing with your own mind, your own ideas, not Stockfish’s. So build your own chess philosophy, study general concepts, get interested about the functioning of it all, as in what idea supports what move (rooks go in open files because they can attack/penetrate enemy territory from there, for example).
Don’t panic, chess knowledge is extensive, but each idea/concept you learn will make you improve, and that’s when Stockfish can become your biggest ally.
Use Stockfish as an advisor, don’t take the moves it is showing just because, go a few moves beyond and try to find out why it “thinks” that’s the best move.
Stockfish can be an extremely powerful weapon if you use it to understand chess better.
A puzzle for fun at the study! Do you dare to try and solve it? Good luck!
Can you find the move that Stockfish can’t «see»? White to play, and force DRAW.
I hope you found this entertaining and useful, if you liked it, please click on the heart, thank you! I wish you the best of lucks!
Dissecting Stockfish Part 1: In-Depth Look at a Chess Engine
Stockfish, one of the best modern chess engines, is orders of magnitude stronger than DeepBlue.
M ost chess engines have the same blueprint: abstracting a chess position, finding all candidates moves, iterating through the tree of candidates until a given depth and assessing the relevance of those moves to find the best one. Their quality, however, is subject to the following criterias :
This post will carefully examine the inner workings of the open-source chess engine Stockfish 12 and explain the key to its success. The first part of this series will focus on how Stockfish is abstracting the positions and generating the candidates moves.
Bitboards
A chess board is made of 64 squares, which means that one can store the positions of a given piece for a single player in a 64-bits variable. Every bit corresponds to a square, and if it is set to 1 then a piece is present on that square. For instance, the following bitboard represents the pawns of the white player at the beginning of a game.
In Stockfish, bitboards are starting from the a1 square, progress rank-wise and the positions are stored in a little-endian encoding, as depicted above. This way, manipulations on the board can be translated as bitwise operations:
As an example, here is the Stockfish code to get the squares attacked by a bitboard of pawns (bitboard.h):
With Bitboard shift (Bitboard b) a templated function that moves the bitboard b in a given direction D using bit-shift operations.
Finding candidates
Now that we have a representation of the board given any position, the chess engine must find all of the candidate moves for a player in order to build the tree of all possible moves.
Pattern pieces
The candidate moves of the pieces moving in patterns (pawns, knights and king) are in a set of fixed cardinality. For instance, a white knight on D4 will always have the following candidates :
Bitshift operations on the bitboard containing all the knights are used to compute those candidate moves:
The possible moves are the OR-concatenation of all of those shifts. However, if the knight is on a side rank or file (Ax, Hx, x1, x8), it is not allowed to move outside of the board. Hence, masking the bitboard with the side rank or file will ensure that if the knight is in such a position, no candidates will be generated.
Stockfish is actually performing the checks after generating the candidates, and uses a Bitboard safe_destination(Square s, int step) (bitboard.cpp) method to ensure that the moves are not off the board. Finally, there are some more additional verifications, as of blocking pieces or discovered checks. For this purpose, Stockfish has a bool Position::legal(Move m) method (position.cpp) which tests whether a pseudo-legal move is indeed legal.
Sliding pieces
Rooks, bishops and the queen can move an indefinite number of squares along a direction until they reach the edge of the board or until another piece obstructs their displacement. Calculating their candidate moves on the fly is feasible using pre-calculated rays. An attacking ray of the piece is AND-ed with the bitboard of all the occupied squares, and a processor-level instruction called bitscan is used to find the first non-trivial bit of the computed result. However, the operation must be repeated for every attacking ray of every piece, which leads to a computationally intensive method for using in real time.
Hence, Stockfish uses a method which is computationally more efficient by doing a lookup in an array containing the candidate moves for the sliding pieces. In order to generate an index to look-up in this array, finding all of the blockers for a sliding piece is still needed:
Then, Stockfish will use the blockers board as an index in the array containing the precalculated bitboards of candidate moves:
With this method, a practical problem is raised. Since the blockers board is a 64-bits variable, the array containing the candidate moves will have 2⁶⁴ elements, which is about one Exabyte in size. As it is not possible to create such a large array in-memory, Stockfish will instead use a hashmap to store the candidate moves. As there exist around 20,000 unique blocker boards, the hashmap size will be only a few hundred kilobytes in size. The crucial part is then to find a hashing function that will be fast to compute with no collisions in our space of the blockers boards.
For this purpose, Stockfish implemented a method called the magic bitboards. The goal is to find a number λ(p,s) associated to a specific piece p (rook or bishop) and to a specific square s, such as:
The hash key will have less bits ( bits gained) than the original blockers_board: it can be used to index our array using a reasonable amount of memory. Given our previous example of the blockers board of a rook on the C7 square, a hash key generation would be:
Here is another hash key generation of the same piece on the same square but for a different blocker board:
Now, how to find those magic numbers λ(p,s) that concatenates the attacking squares for a specific position by a simple multiplication? With a bruteforce method (iterating through random magic numbers and checking the results for all of the blocker boards), it takes only a few seconds to find decent magic numbers. Hence, Stockfish precomputes all the magic numbers at launch with a seeded random number generator to pick the correct magics in the shortest time (bitboard.cpp).
This article presented how Stockfish was able to abstract a chess board and how it generated candidate moves to create new positions. Stockfish approach on choosing the right move to play has not been presented yet.
The next part of this series will focus on the methods and criteria of Stockfish for evaluating the quality of a position. This evaluation method will help to select the best of the candidate moves we learnt to generate.
Stockfish how to use
Copy raw contents
Copy raw contents
Stockfish is a free, powerful UCI chess engine derived from Glaurung 2.1. Stockfish is not a complete chess program and requires a UCI-compatible graphical user interface (GUI) (e.g. XBoard with PolyGlot, Scid, Cute Chess, eboard, Arena, Sigma Chess, Shredder, Chess Partner or Fritz) in order to be used comfortably. Read the documentation for your GUI of choice for information about how to use Stockfish with it.
The Stockfish engine features two evaluation functions for chess. The efficiently updatable neural network (NNUE) based evaluation is the default and by far the strongest. The classical evaluation based on handcrafted terms remains available. The strongest network is integrated in the binary and downloaded automatically during the build process. The NNUE evaluation benefits from the vector intrinsics available on most CPUs (sse2, avx2, neon, or similar).
This distribution of Stockfish consists of the following files:
README.md, the file you are currently reading.
Copying.txt, a text file containing the GNU General Public License version 3.
AUTHORS, a text file with the list of authors for the project
src, a subdirectory containing the full source code, including a Makefile that can be used to compile Stockfish on Unix-like systems.
The UCI protocol and available options
The Universal Chess Interface (UCI) is a standard protocol used to communicate with a chess engine, and is the recommended way to do so for typical graphical user interfaces (GUI) or chess tools. Stockfish implements the majority of its options as described in the UCI protocol.
The number of CPU threads used for searching a position. For best performance, set this equal to the number of CPU cores available.
The size of the hash table in MB. It is recommended to set Hash after setting Threads.
Clear the hash table.
Let Stockfish ponder its next move while the opponent is thinking.
Output the N best lines (principal variations, PVs) when searching. Leave at 1 for best performance.
Toggle between the NNUE and classical evaluation functions. If set to «true», the network parameters must be available to load from file (see also EvalFile), if they are not embedded in the binary.
The name of the file of the NNUE evaluation parameters. Depending on the GUI the filename might have to include the full path to the folder/directory that contains the file. Other locations, such as the directory that contains the binary and the working directory, are also searched.
An option handled by your GUI.
An option handled by your GUI. If true, Stockfish will play Chess960.
If enabled, show approximate WDL statistics as part of the engine output. These WDL numbers model expected game outcomes for a given evaluation and game ply for engine self-play at fishtest LTC conditions (60+0.6s per game).
Enable weaker play aiming for an Elo rating as set by UCI_Elo. This option overrides Skill Level.
If enabled by UCI_LimitStrength, aim for an engine strength of the given Elo. This Elo rating has been calibrated at a time control of 60s+0.6s and anchored to CCRL 40/4.
Lower the Skill Level in order to make Stockfish play weaker (see also UCI_LimitStrength). Internally, MultiPV is enabled, and with a certain probability depending on the Skill Level a weaker move will be played.
Path to the folders/directories storing the Syzygy tablebase files. Multiple directories are to be separated by «;» on Windows and by «:» on Unix-based operating systems. Do not use spaces around the «;» or «:».
Minimum remaining search depth for which a position is probed. Set this option to a higher value to probe less aggressively if you experience too much slowdown (in terms of nps) due to tablebase probing.
Disable to let fifty-move rule draws detected by Syzygy tablebase probes count as wins or losses. This is useful for ICCF correspondence games.
Limit Syzygy tablebase probing to positions with at most this many pieces left (including kings and pawns).
Assume a time delay of x ms due to network and GUI overheads. This is useful to avoid losses on time in those cases.
Lower values will make Stockfish take less time in games, higher values will make it think longer.
Tells the engine to use nodes searched instead of wall time to account for elapsed time. Useful for engine testing.
Write all communication to and from the engine into a text file.
For developers the following non-standard commands might be of interest, mainly useful for debugging:
bench ttSize threads limit fenFile limitType evalType
Give information about the compiler and environment used for building a binary.
Display the current position, with ascii art and fen.
Return the evaluation of the current position.
Exports the currently loaded network to a file. If the currently loaded network is the embedded network and the filename is not specified then the network is saved to the file matching the name of the embedded network, as defined in evaluate.h. If the currently loaded network is not the embedded network (some net set through the UCI setoption) then the filename parameter is required and the network is saved into that file.
Flips the side to move.
A note on classical evaluation versus NNUE evaluation
Both approaches assign a value to a position that is used in alpha-beta (PVS) search to find the best move. The classical evaluation computes this value as a function of various chess concepts, handcrafted by experts, tested and tuned using fishtest. The NNUE evaluation computes this value with a neural network based on basic inputs (e.g. piece positions only). The network is optimized and trained on the evaluations of millions of positions at moderate search depth.
The NNUE evaluation was first introduced in shogi, and ported to Stockfish afterward. It can be evaluated efficiently on CPUs, and exploits the fact that only parts of the neural network need to be updated after a typical chess move. The nodchip repository provided the first version of the needed tools to train and develop the NNUE networks. Today, more advanced training tools are available in the nnue-pytorch repository, while data generation tools are available in a dedicated branch.
On CPUs supporting modern vector instructions (avx2 and similar), the NNUE evaluation results in much stronger playing strength, even if the nodes per second computed by the engine is somewhat lower (roughly 80% of nps is typical).
the NNUE evaluation depends on the Stockfish binary and the network parameter file (see the EvalFile UCI option). Not every parameter file is compatible with a given Stockfish binary, but the default value of the EvalFile UCI option is the name of a network that is guaranteed to be compatible with that binary.
to use the NNUE evaluation, the additional data file with neural network parameters needs to be available. Normally, this file is already embedded in the binary or it can be downloaded. The filename for the default (recommended) net can be found as the default value of the EvalFile UCI option, with the format nn-[SHA256 first 12 digits].nnue (for instance, nn-c157e0a5755b.nnue ). This file can be downloaded from
replacing [filename] as needed.
What to expect from the Syzygy tablebases?
If the engine is searching a position that is not in the tablebases (e.g. a position with 8 pieces), it will access the tablebases during the search. If the engine reports a very large score (typically 153.xx), this means it has found a winning line into a tablebase position.
If the engine is given a position to search that is in the tablebases, it will use the tablebases at the beginning of the search to preselect all good moves, i.e. all moves that preserve the win or preserve the draw while taking into account the 50-move rule. It will then perform a search only on those moves. The engine will not move immediately, unless there is only a single good move. The engine likely will not report a mate score, even if the position is known to be won.
It is therefore clear that this behaviour is not identical to what one might be used to with Nalimov tablebases. There are technical reasons for this difference, the main technical reason being that Nalimov tablebases use the DTM metric (distance-to-mate), while the Syzygy tablebases use a variation of the DTZ metric (distance-to-zero, zero meaning any move that resets the 50-move counter). This special metric is one of the reasons that the Syzygy tablebases are more compact than Nalimov tablebases, while still storing all information needed for optimal play and in addition being able to take into account the 50-move rule.
Stockfish supports large pages on Linux and Windows. Large pages make the hash access more efficient, improving the engine speed, especially on large hash sizes. Typical increases are 5..10% in terms of nodes per second, but speed increases up to 30% have been measured. The support is automatic. Stockfish attempts to use large pages when available and will fall back to regular memory allocation when this is not the case.
Support on Linux
Large page support on Linux is obtained by the Linux kernel transparent huge pages functionality. Typically, transparent huge pages are already enabled, and no configuration is needed.
Support on Windows
The use of large pages requires «Lock Pages in Memory» privilege. See Enable the Lock Pages in Memory Option (Windows) on how to enable this privilege, then run RAMMap to double-check that large pages are used. We suggest that you reboot your computer after you have enabled large pages, because long Windows sessions suffer from memory fragmentation, which may prevent Stockfish from getting large pages: a fresh session is better in this regard.
Compiling Stockfish yourself from the sources
Stockfish has support for 32 or 64-bit CPUs, certain hardware instructions, big-endian machines such as Power PC, and other platforms.
When not using the Makefile to compile (for instance, with Microsoft MSVC) you need to manually set/unset some switches in the compiler command line; see file types.h for a quick reference.
When reporting an issue or a bug, please tell us which Stockfish version and which compiler you used to create your executable. This information can be found by typing the following command in a console:
Understanding the code base and participating in the project
Stockfish’s improvement over the last decade has been a great community effort. There are a few ways to help contribute to its growth.
Improving Stockfish requires a massive amount of testing. You can donate your hardware resources by installing the Fishtest Worker and view the current tests on Fishtest.
Improving the code
If you want to help improve the code, there are several valuable resources:
In this wiki, many techniques used in Stockfish are explained with a lot of background information.
The section on Stockfish describes many features and techniques used by Stockfish. However, it is generic rather than being focused on Stockfish’s precise implementation. Nevertheless, a helpful resource.
The latest source can always be found on GitHub. Discussions about Stockfish take place these days mainly in the FishCooking group and on the Stockfish Discord channel. The engine testing is done on Fishtest. If you want to help improve Stockfish, please read this guideline first, where the basics of Stockfish development are explained.
Stockfish is free, and distributed under the GNU General Public License version 3 (GPL v3). Essentially, this means you are free to do almost exactly what you want with the program, including distributing it among your friends, making it available for download from your website, selling it (either by itself or as part of some bigger software package), or using it as the starting point for a software project of your own.
The only real limitation is that whenever you distribute Stockfish in some way, you MUST always include the license and the full source code (or a pointer to where the source code can be found) to generate the exact binary you are distributing. If you make any changes to the source code, these changes must also be made available under the GPL v3.
ChessCom/stockfish
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Readme.md
Stockfish is a free, powerful UCI chess engine derived from Glaurung 2.1. It is not a complete chess program and requires a UCI-compatible GUI (e.g. XBoard with PolyGlot, Scid, Cute Chess, eboard, Arena, Sigma Chess, Shredder, Chess Partner or Fritz) in order to be used comfortably. Read the documentation for your GUI of choice for information about how to use Stockfish with it.
This distribution of Stockfish consists of the following files:
Readme.md, the file you are currently reading.
Copying.txt, a text file containing the GNU General Public License version 3.
src, a subdirectory containing the full source code, including a Makefile that can be used to compile Stockfish on Unix-like systems.
Currently, Stockfish has the following UCI options:
Write all communication to and from the engine into a text file.
A positive value for contempt favors middle game positions and avoids draws.
By default, contempt is set to prefer the side to move. Set this option to «White» or «Black» to analyse with contempt for that side, or «Off» to disable contempt.
The number of CPU threads used for searching a position. For best performance, set this equal to the number of CPU cores available.
The size of the hash table in MB.
Clear the hash table.
Let Stockfish ponder its next move while the opponent is thinking.
Output the N best lines (principal variations, PVs) when searching. Leave at 1 for best performance.
Lower the Skill Level in order to make Stockfish play weaker (see also UCI_LimitStrength). Internally, MultiPV is enabled, and with a certain probability depending on the Skill Level a weaker move will be played.
Enable weaker play aiming for an Elo rating as set by UCI_Elo. This option overrides Skill Level.
If enabled by UCI_LimitStrength, aim for an engine strength of the given Elo. This Elo rating has been calibrated at a time control of 60s+0.6s and anchored to CCRL 40/4.
Assume a time delay of x ms due to network and GUI overheads. This is useful to avoid losses on time in those cases.
Minimum Thinking Time
Search for at least x ms per move.
Lower values will make Stockfish take less time in games, higher values will make it think longer.
Tells the engine to use nodes searched instead of wall time to account for elapsed time. Useful for engine testing.
An option handled by your GUI. If true, Stockfish will play Chess960.
An option handled by your GUI.
Path to the folders/directories storing the Syzygy tablebase files. Multiple directories are to be separated by «;» on Windows and by «:» on Unix-based operating systems. Do not use spaces around the «;» or «:».
Minimum remaining search depth for which a position is probed. Set this option to a higher value to probe less agressively if you experience too much slowdown (in terms of nps) due to TB probing.
Disable to let fifty-move rule draws detected by Syzygy tablebase probes count as wins or losses. This is useful for ICCF correspondence games.
Limit Syzygy tablebase probing to positions with at most this many pieces left (including kings and pawns).
What to expect from Syzygybases?
If the engine is searching a position that is not in the tablebases (e.g. a position with 8 pieces), it will access the tablebases during the search. If the engine reports a very large score (typically 153.xx), this means that it has found a winning line into a tablebase position.
If the engine is given a position to search that is in the tablebases, it will use the tablebases at the beginning of the search to preselect all good moves, i.e. all moves that preserve the win or preserve the draw while taking into account the 50-move rule. It will then perform a search only on those moves. The engine will not move immediately, unless there is only a single good move. The engine likely will not report a mate score even if the position is known to be won.
It is therefore clear that this behaviour is not identical to what one might be used to with Nalimov tablebases. There are technical reasons for this difference, the main technical reason being that Nalimov tablebases use the DTM metric (distance-to-mate), while Syzygybases use a variation of the DTZ metric (distance-to-zero, zero meaning any move that resets the 50-move counter). This special metric is one of the reasons that Syzygybases are more compact than Nalimov tablebases, while still storing all information needed for optimal play and in addition being able to take into account the 50-move rule.
Compiling Stockfish yourself from the sources
On Unix-like systems, it should be possible to compile Stockfish directly from the source code with the included Makefile.
Stockfish has support for 32 or 64-bit CPUs, the hardware POPCNT instruction, big-endian machines such as Power PC, and other platforms.
In general it is recommended to run make help to see a list of make targets with corresponding descriptions. When not using the Makefile to compile (for instance with Microsoft MSVC) you need to manually set/unset some switches in the compiler command line; see file types.h for a quick reference.
When reporting an issue or a bug, please tell us which version and compiler you used to create your executable. These informations can be found by typing the following commands in a console:
Understanding the code base and participating in the project
Stockfish’s improvement over the last couple of years has been a great community effort. There are a few ways to help contribute to its growth.
Improving Stockfish requires a massive amount of testing. You can donate your hardware resources by installing the Fishtest Worker and view the current tests on Fishtest.
Improving the code
If you want to help improve the code, there are several valuable resources:
In this wiki, many techniques used in Stockfish are explained with a lot of background information.
The section on Stockfish describes many features and techniques used by Stockfish. However, it is generic rather than being focused on Stockfish’s precise implementation. Nevertheless, a helpful resource.
The latest source can always be found on GitHub. Discussions about Stockfish take place in the FishCooking group and engine testing is done on Fishtest. If you want to help improve Stockfish, please read this guideline first, where the basics of Stockfish development are explained.
Stockfish is free, and distributed under the GNU General Public License version 3 (GPL v3). Essentially, this means that you are free to do almost exactly what you want with the program, including distributing it among your friends, making it available for download from your web site, selling it (either by itself or as part of some bigger software package), or using it as the starting point for a software project of your own.
The only real limitation is that whenever you distribute Stockfish in some way, you must always include the full source code, or a pointer to where the source code can be found. If you make any changes to the source code, these changes must also be made available under the GPL.
Шахматный движок stockfish: краткий обзор программы
Автор: Дядя Валера
День добрый, дорогой друг!
Сегодня разберем еще одного программного «монстра»- шахматный движок stockfish. В дословном переводе — вяленая рыба. Откуда такое название, не берусь судить. Знаю только, что в некоторых интеллектуальных играх фишОм (рыбой) называют слабого игрока.
Что это за программа?
Stockfish – шахматный движок с открытым исходным кодом. Историю своего развития ведет с 2008 года.
Движок поддерживает 32-битный и 64-битный режимы,
В последние лет 6-7 борьба за первенство в основном проходит под знаком соперничества движков Komodo и Stockfish, Борьба проходит с переменным успехом.
В 2014 году (Сезон 6) чемпионский титул завоевал Stockfish обыгравший Komodo 35.5 :28.5
В конце этого же года (Сезон 7) Комодо реваншировался.
В сезоне 8 (ноябре 15 года) очередной матч и снова впереди Komodo.
В 9 сезоне (декабрь16 года) Стокфиш в финале обыгрывает Гудини (Houdini) – 17 побед, 8 поражений, 75 ничьих.
2016 год стал прорывным в истории развития движка. Сегодня по многим параметрам Stockfish опережает своих извечных соперников в последние годы Komodo и Houdini.
Успехи Стокфиша во многом связаны с политикой распространения. Найдя и протестировав усиление, разрабтчики выкладывают новую версию для открытого тестирования.
Отмечают чистоту кода движка. Серьезных глюков практически не осталось.
В рейтинге по версии CCRL Стокфиш занимает 2 строчку.
Где скачать?
Сайт разработчика: https://stockfishchess.org/
Также имеются версии для Mac, Android, Linux.
Подключиться тестированию и тем самым участвовать в совершенствовании движка может любой желающий. Число людей, участвующих в тестировании в сентябре 17 года, уже подходит к 1000.
Обновление тестовых версий здесь http://abrok.eu/stockfish/
Как можно использовать движок?
На практике, чтобы использовать движок в практических целях нужна оболочка, интерфейс. Большинство движков и стокфиш не исключение, таковой не имеют и встраиваются в специальные пользовательские программы.
Из известных мне топовых движков собственный интерфейс имеет только Шреддер.
Важно : оболочка, интерфейс, — должны поддерживать UCI протокол.
Подключить движок можно в несколько кликов. Как это сделать – показано в этом видео:
Многие шахматисты поступают следующим образом, цитирую:
Скачиваю движок, не важно от кого и проверяю его в конкретных позициях из своих партий. Какой двиг быстрее находит решение, тем и пользуюсь. Скорость какую он пишет для меня совсем не важно.
Что у меня лучше играет, то и использую.
По моему заочнику так и нужно поступать, проверять движки конкретно по своим позициям и на своём компе и на основании этого делать выбор.
Особенности стиля и сила игры
Stockfish имеет двадцать уровней сложности.
Поскольку движок имеет огромную практическую силу, значительно превосходящую любого человека, включая чемпионов мира всех времен, оценивать его стиль имеет смысл только в сравнении с другими ТОПовыми движками.
Например, считается, что в сравнении с Комодо, сильной стороной которого является позиционная игра, Стокфиш делает больший упор на тактику.
Можно ли использовать движок в практических партиях?
В заочной игре, по переписке, использовать движки вполне допустимо и даже целесообразно. Так и делают многие шахматисты.
Тем не менее, такие попытки предпринимались еще со времен появления первых движков.
Иногда успешно, но чаще всего, — все эти манипуляции заканчивались для игрока печально. А именно дисквалификацией и не только на текущий турнир, но и пожизненно.
Вообще тема шахматного читерства одна из самых актуальных в современном шахматном сообществе и заслуживает отдельного обсуждения.
Кроме того, на серьезных порталах установлены античитерские программы. В случае подозрений на читерство вас могут забанить без особых церемоний.
А самое главное: зачем это вам нужно? Это все равно, что сесть «на иглу». Мы с вами знаем, что последствия зависимостей разного рода всегда не самые приятные.
Благодарю за интерес к статье.
Если вы нашли ее полезной, сделайте следующее:
Отправить ссылку на статью друзьям
Получай свежие статьи блога на e-mail
Вам также может быть интересно
Задача №62 — Мат в 2 хода
Задача №30 — Мат в 1 ход
Задача №21 — Мат в 4 хода
По поводу «повторить увиденное» вы не правы. В большинстве современных движков присутствует вариативность, в одинаковых ситауциях в разных партиях программа реагирует по-разному. А потому перепробовать всё, найти успешную комбинацию и каждый раз её повторять — не выйдет. Хотя в старых шахматных играх (как 3D Chess от e-games) вариативности небыло, и у меня этот фокус прокатывал.
По-поводу того что нет ничего невозможного — на помощь приходит статистика, нужно смотреть конкретно по разрыву в рейтинге Elo.
Если разница в ваших силах к примеру 100 очков — то треть партий вы выиграете. Если разница больше 600 — то даже не тратьте время. Хоть неделю над каждым ходом думайте — все-равно проиграете. Это все-равно что человеку мериться силами с бульдозером.
Stockfish в переводе означает «треска», которая, кстати, и нарисована на логотипе. Для норвежцев, например, эта рыба очень символична — даже композитор Эдвард Григ говорил, что его музыка просто пропитана вкусом трески.
Я любитель (никогда не изучал теорию, дебюты и пр.) но обыгрываю последний Cтокфиш на 10-ом уровне сложности. Из 15 возможных. *Интересно, какой у меня тогда примерно уровень в шахматах?
На сайте, где я играю ( xchess.ru ) написано, что 6 уровень Стокфиш — это примерно КМС. Но это весьма примерное соотношение.
Более точной информации я нигде не нашел, хотя долго искал в сети.
Очень интересно, насколько я хорош в шахматах, согласно общей классификации?
/Играю почти всю жизнь, с 8-летнего возраста. Уже более 30лет. /
Да и ещё вот какое замечание хотелось бы оставить:
По моему программа Stockfish — это настоящий Уничтожитель человеческого достоинства. Играть против Неё, на любом уровне сложности, настоящее испытание для психики. Я никогда даже не думал, что давление противника в шахматах может быть настолько тотальным, пока не сел играть против Стокфиш впервые полгода назад. Но и побеждать у неё — это такое не с чем не сравнимое удовольствие! Чувствуешь себя прямо Королём, когда ставишь мат.
Боюсь вас разочароваить, но настоящий Стокфиш 10 уровня не может проигрывать любителю) Определить свой реальный уровень игры можно только зная, с кем играешь. Сыграйте в турнире (можно даже онлайн) и все поймете.
Дядя Валера, я вас спросил, «какой тогда у меня уровень?»
А вы мне ответили, что наверное «я играл против фейкового движка». Это смешно.
ВЫ не знаете просто ответ наверное на этот вопрос? Потому что ответить было просто в два слова — обозначив уровень.
Я играю на xchess.ru/chessonline.html
Просто спросите у авторов настоящий ли там Стокфиш, или сыграйте самостоятельно! Даже на 1-ом уровне его очень сложно обыграть.
В своем сообщении я нигде не писал что я профан. Я обыгрываю на «Яндекс-шахматах-онлайн»(популярнейшая сейчас площадка для Игры), играя против игроков со всего мира, практически всех. Очень редко когда я могу встретить противника, которому не могу противопоставить конкуренцию, а профи там сразу видно. /играю в блиц-шахматы там (5 минут на ходы-10минут общее время партии)/ Профи ходят не думая, видят всю доску и т.п.
*Я не изучал теорию и науку о шахматах, просто потому что мне просто нравится играть и доходить до всего самому. А изучать теорию — я считаю читерством. Все равно как изучать технику сложения кубик-рубика и собирать его затем за 8 минут. В чем тогда интерес??
Вы действительно меня разочаровали своим ответом.
/Еще: вы мне предложили сыграть в турнире. А какой смысл? Если есть Стокфиш, который лучше любого игрока в мире!
А потребность играть против живого игрока я и так удовлетворяю в Мастер шахмат: Мультиплеер на Яндексе. И как уже говорил, практически всегда побеждаю.
Да и вот ещё что.
Я выиграл у Стокфиша на уровне 10 всего два раза Первый раз партия длилась 5 часов. Второй раз 3 часа. Это не легкий забег был, знаете ли. Разумеется игра ведется с перехаживанием и бесконечным временем на партию. Иначе выиграть у компьютера было бы вообще невозможно.
Сейчас перешел на 11 уровень. На то чтобы обыграть 9 уровень у меня ушел месяц. На 10-й = 5 недель непрерывной игры без единой победы.
Послушайте, я отдаю доджное вашему упорству, но как я могу оценить ваш уровень, если не знаю вас и не видел ваши партии. Вы бы хоть имя свое назвали. Покажите партию-другую, — будет видно. По той информации, что вы обыгрываете стокфиш 10, — наверное вы гроссмейстер) Вам это скажет любой эксперт. Но настоящий это движок или нет, мне не известно.
Настоящий. Я с ними вчера связался. Версия 13. С 15 уровнями сложности. (бывают версии с 8 и 10 уровнями, в этом исполнении их 15).
Неужели Мастер спорта или КМС не сможет на таком уровне обыграть stockfish?? С переигрываниями позиции и бесконечным временем на партию? Не за что не поверю.
Без перехаживания я согласен, наверное. Если в рамках чемпионата. Наверное только гроссмейстер и сможет.
Но так, дома, спокойно изучая позицию, разве это так уж сложно для профи? Это ж совершенно разные ситуации. Иметь возможность переходить — и не иметь.
(Лично я субъективно думаю, что я где-то примерно кмс, из того что вижу.) Ну ладно, в любом случае, спасибо.