Hot answers tagged

53

The answer is that they either played it on some very handicapped mode, they took back A LOT of moves, or they are probably lying. Stockfish 11 is currently rated about 3607, and that is in standard chess. Computer programs are typically even HARDER to beat for humans at even faster controls. There is a reason elite humans have not played matches against ...


38

It's absolutely beatable, but not by an unassisted human. Anyone who claims to have done so is either lying or stacked the deck super heavily in their favor (e.g., by having Stockfish search only to depth 2). "Slow computer" isn't good enough - Stockfish 11 running on 1999 hardware would still have handily beaten Kasparov. You will need help from another ...


8

Seconds, and the players themselves, absolutely use engines to help them find moves, but you cannot just let an engine run and think that it will spit out useful things. There would be too much information, and most of it useless. First, nowadays, more and more, elite players are resorting to using Leela and Fat Fritz (neural network type programs) since ...


7

People who say they beat stockfish did it at a low level, with a fast time control so stockfish could not do its best, and perhaps also on slower computers. Can stockfish be beat at high level on fast computer with long time control? Of course, but it would likely take another computer program to do it. Remember that Stockfish was rated at 3388 as of ...


6

Move generators in modern engines do this with lookup tables, which are indexed by the square of the slider and a bitboard representing occupied (impassable) squares that might block the movement of the piece. There are two main ways of compressing the huge set of possible occupancy bitboards into a reasonable size. Magic Bitboards are often used, which ...


5

Sure, examples exist. E.g. Game 6 of Carlsen-Caruana, World Chess Championship 2018: [FEN "5k2/8/5pK1/3B1P1P/3n4/8/3b4/8 w - - 6 67"] Kg6? loses, but no human would have found the refutation. As for games where the exact losing move cannot be found even by the best current engines - I spoke to a correspondence chess expert recently, and I'm confident they ...


5

The real speed in bitboards is created by precomputing the bitboards for every instance. This means that you already have the attacked squares for a rook on d4 and every other piece on every square. Even faster is to use magic bitboards, but that is too complicated for a forum. Although both are written in c, I suggest Crafty to understand bitboards ...


4

In the beginning, they thought that using a right shift (or a left shift), but they found that, as with other systems, bit would fall off the board. To correct this, they computed every move from each square for each piece. This takes a performance hit only when the page loads. The other alternative they tried was to just load precomputed bitboards which ...


3

As described here the min-max algorithm is used in order to get the best strategy from any position in games, and therefore in chess. It uses tree ordering of the moves and each layer in the tree describes another player's move. The leaves at the bottom of the tree are the "values" gained from reaching this position with the sequence of moves from going down ...


3

As far as I can see Leelenstein is mostly derivative of Leela. It uses a fraction of the games produced by Leela's self-play to get to a similar playing strength. Given that most of these games have also been used to train Leela, there is little reason to expect Leelenstein to be better. Basically Leela produces customized trainingsdata via self-play, ...


3

The position with the longest known sequence away from checkmate haa a mate in 553 moves. It is a computer verified extension of the famous 549 mover (as mentioned in @Phishmaster's answer) found by Lutz Neweklowsky. By "verified," I mean Stockfish agrees with the moves that occur until a 7-piece position occurs, and then we know 100% it is correct from ...


3

The problem, and it really comes down to feel and analysis, is primarily that your king position can be compromised indefinitely. In addition, virtually all of your pieces are not "harmoniously" placed, meaning they do not help each other out at all. In every line, they just get in each other's way, and nothing defends each other. In chess, we sometimes ...


3

Sorry, I don't have C# code. Can we do it in C++? https://github.com/Warpten/Fruit-2.1/blob/master/src/book.cpp Polyglot book is defined like: struct entry_t { uint64 key; uint16 move; uint16 count; uint16 n; uint16 sum; }; You may want to wrap the C++ code inside your C#. How to do that is out of scope here.


3

I would say it is practically unbeatable by a human player when running according to the TCEC hardware, but theoretically, it could be since chess has so many possibilities that we only completely understand it when only 7 pieces are on the board(Endgame Tablebases). Another fact is that these tablebases were created by supercomputers. I am certainly sure ...


2

Python utilities for experimenting with Leela Chess Zero a neural network based chess engine: https://github.com/glinscott/leela-chess/ Here: https://github.com/so-much-meta/lczero_tools This allows you to run the network in Python on specific board positions via python-chess, and get policy/value outputs. (Works with pytorch, and is also able to run the ...


2

This should get you started, up to you to add extra features based on your objective (such as saving the games and moves, etc.) import chess import chess.engine import os import sys arguments = sys.argv pondertime = float(arguments[1]) #first argument: ponder time in sec maxmoves = int(arguments[2]) #2nd argument: max number of desired moves gamecount = ...


2

First, engine.options["NeverClearHash"] is wrong on two counts. It is engine.option, not engine.options and that command queries the value rather than sets it. To set the value you have to do something like: engine.configure({"NeverClearHash": 1}) or perhaps: engine.configure({"NeverClearHash": true}) Good programmers are never too proud to read the ...


2

I would like to keep the information saved in the hash memory. Is there a way to do that? Yes, there is. Stockfish is open source. So you can examine the code, modify it, recompile and rebuild. What you need to do is: Find where Stockfish creates and uses the cache Modify the code to save the cache to disk when the game finishes Modify the code to ...


2

The question you mention is here: In ChessBase 12, when viewing an Opening Tree, why do all the games always stop near move 26? Personally, I think it is just a general English statement he used to describe the middle, and most heated analytically, part of the game based on the context. I doubt anyone else would repeat it. Frankly, if I downvoted a lot, I ...


2

It looks like your engine is using very simple for loop and arrays. Your code simply loop over again and again, possibly repeat each search iteration. That’s obviously not good. Chess engine can’t run fast if it has to loop like that. If the position had no check surely all CPU time wasted? My recommendation is change your data structure to a bitboard. ...


2

There’s no reason for you to scale down your engine doors if it’s fast. Why would you do that? I am sure Talkchess used to have a post about how chess engines report searched nodes differently. I can’t find it now it was a few years ago. Read it before... their search function is not good. If you are interested in the difference you will need to read the ...


2

The questions are difficult to understand, and I assume that you are looking for: 1) A way to loop through moves during the AB search (when in bitboard format). and 2) How to eval the board in the bitboard format. The simple answer is to look at the code for Crafty Chess. This is a good and heavily commented source code.


2

First, as great as Kasparov is, compared to AlphaZero, even he is a patzer; so for him to say that he sees weaknesses, he may be correct, but it could also be, simply, that AlphaZero is playing at a level beyond even his great understanding, and with positional/tactical minutia we, humans, have yet to realize are important, or cannot see at all. In this ...


2

I could find nothing that would support that statement beyond that it taught itself in a day. This is speculation, but I believe it explains that line in the article. After researching the author, I found that he is a technology writer, who got a Bachelor of Science from the University of Kent, and later a degree in journalism from University of the Arts ...


1

Other algorithms for solving chess problems are min-max algorithm. What it does it tries to maximize your position and to minimize opponent's moves. More detailed info: https://www.geeksforgeeks.org/minimax-algorithm-in-game-theory-set-1-introduction/


1

Even one minor error could cost the game against a perfect opponent, so 95% losing rate is generous. However, I don't understand how the "best move" engine could lose any games in the second trail. The ABSearch could be modified, but it's easier to perform this at the RootSearch function. Since the arrays for the current moves and their respective scores ...


1

There're two separate questions in the OP. Addressing both of them: So is it possible to expect different results from computer vs same computer on the same machine? Yes, because chess engines aren't completely deterministic. See this question. The answers to that question deal with traditional engines. The newer neural-network based engines are less ...


Only top voted, non community-wiki answers of a minimum length are eligible