New answers tagged

3

Build a cache. You're exposing yourself to endless transposition. Please don't shuffle your moves. I don't have the numbers but I doubt randomly shuffle all your lists can be quick. It's O(n). I fail to see how it can address your repetition anyway. Double check your generator. Source code is not here, so I have no idea I don't know what exactly your table ...


3

One important point to consider is that BFS has a hugely higher space complexity than DFS. Notation: b = branching factor = number of moves per step, about 31 in chess d = minimum depth of tree till optimal solution (e.g. 10 if checkmate in 10 turns is possible) m = maximum depth of tree (e.g. 150 moves till draw) Space complexity of BFS: O(b^d) Space ...


2

In addition to the great accepted answer, I'll point out that engines do differ in the amount of breadth/depth they analyze, even though all of them do use depth first search because of alpha beta search (something you should research if you want to learn more, as all traditional engines use it) being much better optimized for it. For example, Stockfish is ...


4

Strength in chess engines depends on speed and speed depends on how strongly you can prune the tree. That is, how many nodes you can discard without degrading the accuracy of your search result. In principle you might be able to visit the same nodes using either BFS or DFS, so a priori it is not clear which would be better prunable i.e. faster. In chess, ...


3

There is no need for research. Breadth-first, by definition needs to traverse all nodes at a level before going to the next. It just doesn't work for chess, where the number of positions is too many and most of the positions are just stupid (e.g. dropping a queen). Chess engines always use deep-first.


0

If we assume chess is drawn (and all evidence points to that) then the answer is no. The "best" move would be the one that gives the best practical chance of winning and there is no way to objectively determine the best practical move. That would be like asking if rock is objectively a better move than paper or scissors. If chess is solved, computers ...


0

If there are 20 moves in a given position that means the engine is spending 95% of its time evaluating moves that are not the move that will be played. Switching from 5% of its analysis to 100% allows it to see much deeper much more quickly. This is especially true if the line chosen is a forcing line because the engine will be able to eliminate so many ...


4

After 11.bxc3, Qxc3 12.Qd2, Qxa1, there is no easy way to get the queen out. Black is going to have to give something back at some point. If black tries to get the queen out immediately : 13. g3, (the fianchetto is threatening both to trap the queen and indirectly attacking the rook on a8) Qb1 14.Bg2. From here black only has four queen moves that don't ...


1

Computing magics at statup is fine because it's done only once and not very slow. https://github.com/official-stockfish/Stockfish/blob/master/src/bitboard.cpp // init_magics() computes all rook and bishop attacks at startup. Magic // bitboards are used to look up attacks of sliding pieces. As a reference see // www.chessprogramming.org/Magic_Bitboards. ...


4

No. Your assumption is based on searching everything up to depth D, but no modern chess engine would do that. It's complicated to explain, but fair to assume only some subtrees up to depth D are explored. The other trees got "cut" off for various reasons, most likely they are not good. Chess programming is all about skipping the search tree accurately. The ...


0

I don't know of a mac native .cbh file reader. ChessX seems to use pgn as it's database which can be slow. Using the opening tree and a pgn of 100,000 games it took 30 seconds to show the full tree after each move. This is too slow to be usable for me. I understand that ScidvsMac is more of a true database application and is fast for large databases by ...


6

What about? The eval command will do what you want. However, it's not useful for chess learning. They are just static evaluations. What you're after is more like extracting features from the analysis. Stockfish doesn't have it.


2

If you go to this page and enter a position, you can click the links on the left (or the "table" and "graph" tabs on the top) to see the sub-scores for Stockfish. Note that this is a static evaluation that does not look ahead. If you want to use it, you should look at the line Stockfish gives you, and enter the position at the end of that line.


1

In addition to the reasons why you are not doing great after g5, it seems to me that there is no urgency to trap the bishop immediately. If you start with Bg4, how can white keep their bishop safe from a future g5? There is nowhere for it to go, and if they try to create an escape route with e4 then dxe4 wins the knight instead. So g5 is still a possibility ...


2

If after making a move the engine’s score for the position is virtually unchanged - it’s good move!


4

Is there any way to find good moves that I made, rather than just non-mistakes? Actually, in most cases, it's doing this already. The reason your moves aren't showing up is probably that they're not actually good moves! the evaluation shows I made a suboptimal move even though against this particular opponent it resulted in me winning a piece The ...


7

Yes, of course it's possible. I've done it a lot professionally. However, there is no tool that just takes a PGN chess game and convert it into images. You will need to do some programming, not very hard. Here is a link on how one can generate machine learning data set on chess. You should be able to reuse the code. I highlighted the part that will relate ...


0

I don't think calling it a "simple task" in order for someone to give you the code for free is very polite imo. On top of that, is surely doable, but its not a simple task. It requires implementing a class to handle the graphic representation, and another class to do the "translation". Also there are quite a couple of factors to take into consideration. If ...


1

Run Stockfish in multi-PV mode. This makes Stockfish suggest multiple moves. If the move you chose is preferred by Stockfish to others, then it's a "good move".


3

Stockfish is a free project, people don't work for financial returns. Unfortunately, that would mean your request might never be honoured. As a programmer with technical skills, you are expected to compile the code yourself. Sorry, this is how a free open source project work. They give you the code for free, so you just have to do some works.


8

Sorry, computer engines are not designed to think like a human. It's a machine, it's written to play strong chess. There is no intelligence in there to think like that. The "good moves" you mentioned were actually bad moves at Stockfish's level.


Top 50 recent answers are included