New answers tagged

0

I was looking around for something similar and came across Joe's Chess API: http://chess-api.herokuapp.com/


3

This depends quite a bit on your level of understanding, as well as your knowledge of relevant programming languages. David Levy wrote a number of books that deal fairly closely with this topic. "Chess and Computers" (1976) is more for the beginner, while his "Computer Chess Compendium" is more 'medium' and above. See his biography/...


3

FM Bill Jordan has written several, including: How to Write a Chess Engine The Joy of Chess Programming: How Chess Engines Work How to Write a Bitboard Chess Engine: How Chess Engines Work The first is basically a printout of his engine's code, with an explanation of each code segment.


0

Easy as pie. I would just add a function to the engine that would induce errors by cutting evaluation to an arbitrary low depth, or removing certain evaluation rules at a desired frequency. For example, you can program it to reduce the depth all the way down to 1, let's say, every 5 moves, or take king safety out of evaluation every 7 moves.


0

By programming it using human concepts and thinking instead of just pure raw brute-force calculation (like a computer). There was an old engine [Wchess], used in the Power Chess 98 and Majestic Chess games on PC, which applies concepts like tropism (e.g. king safety for the AI is described as how many pieces are surrounding it). So some logical human-like ...


6

KID is a notorious difficult opening for a chess engine to evaluate. Forget all those opening lines, just look at the standard positions based on standard positional terms. White has an advanced pawn on d5 in many lines. This gives space advantage. Even if White doesn't a pawn on d5, White's centre control is apparently stronger. Open d-file for the queen, ...


1

In theory, chess is a Markovian game -- the current state says it all, how you reach the current state, ie all the previous moves, doesn't matter. This is how computers play chess. For humans, previous moves matter a lot. On one hand, people think in plans, so could easily forgo better moves if it is not consistent with their plan. On the other hand, human ...


5

Very related: Traxler Counterattack The answer is effectively the same: White has roughly a +0.5 advantage in the starting position, and a shift of a few centipawns one way or another is acceptable, but if that advantage has grown to +1.5 there's a problem. Do note that the starting position of the KID, 1. d4 Nf6 2. c4 g6 3. Nc3 Bg7 4. e4 d6 is evaluated at ...


2

Can someone either point me to an existing engine which plays like a human based on your level or recommend me some guidelines as how we can make it using AI ? There is simply no such thing. AlphaZero, Stockfish, LC0, Komodo, everything else don't play like a human. In my experience, chess engines are either very strong, very weak or artificially tuned down ...


4

To my knowledge there is no book on chess engine programming because there is no market. People study the source code simply by reading it. If you have any question, please join Stockfish/LC0 discord. It worked well for me, I just ask online anything I don't understand. I would suggest the following on learning. Many more I may have missed. https://www....


14

Start with whatever and tune it. That's how chess engine programming works - you start with some number, and then tune it. For example you start with -5, then create another version with -10. You get the two engines to play against each other, and the one that wins more often is the "correct" version that you keep. Of course as pointed out by other ...


5

Doubled pawns aren't necessarily bad. They typically mean an open file and often can improve control of the center. There's really no way to answer unless I know how you value the mobility of the pieces. Are the piece values you give fixed or baseline numbers that can be modified based on the position?


1

it depends they may be worth more if they open a file for a rook in a somewhat closed position


6

There's no real rule for how much do doubled pawns (or any other kind of weakness on the pawn structure) worse your position. There's not even a rule for piece value, specially if you'll add bonuses for things like centralized knights or the bishop pair. In general, doubled pawns in a minority or balanced side tend to be less important than in a majority (as ...


0

this would be tough to win OTB with many ways to end up drawn a computer might do it but I doubt it would be quick and easy


1

I am unsure what version of Stockfish you were using so I ran analysis 12 times; 4 seperate engines for each version of Stockfish. Stockfish 10 vs ( Ethereal , Komodo, LC0 , Stockfish 12 ) Stockfish 11 vs ( Ethereal , Komodo, LC0 , Stockfish 12 ) Stockfish 12 vs ( Ethereal , Komodo, LC0 , Stockfish 12 ) Results were Stockfish (white) at the end of 20+ ...


1

You put too much faith in engines and too little respect for how actual people really play. b6 is more than playable. I would not venture it against a GM but for any tournament I could seriously compete in it would work --IF it were compatible with my style which it is not. When they play b6 I generally win. That has more to say about me and my ...


10

It's completely playable below master level, probably playable to IM level and probably useful occasionally as a surprise weapon at GM level. Combined with the English defense it gives black a very solid opening repertoire with very little theory to learn. The only caveat would be to just be careful castling kingside into a strong attack. 22 ply is 11 moves. ...


6

Stockfish's @.3484814232843 shouldn't concern Black as much as Morphy's simple plan for White. 1.e4 b6 2. d4 Bb7 3. Bd3 e6 4. Nh3 Stockfish might be complaining because White gets free rein in the center, but Morphy said 'two pawns is enough', then as long as White continues developing, he's guaranteed at least equal development, and because it was the ...


3

As far as I know, every chess playing program combines a depth-limited search of the game tree with a heuristic algorithm to estimate the favorability of each position. There's a tradeoff between using a cheaper heuristic allowing more positions to be evaluated and using a sophisticated heuristic on fewer positions. Humans play in more or less the same way, ...


0

Some of them make random errors to simulate a human. Others limit the number of moves they look ahead to do it. None of them play like a human, but that is the state of the art as of now for faking it. The best approach would be to train the AI program by playing against actual humans of the given strength level being simulated, but that would be impractical ...


-6

I say: Take a normal, strong AI, and have it play P-R3 at random. Bad players play P-R3 whenever they can't think of anything to do. They think if an enemy unit lands on N5, then P-R3 is a great attacking move. Or maybe they play P-R3 to prevent an enemy piece from coming to N5. Either way, win! And it's such a small positional concession, what harm could P-...


6

In Lichess, you have 2 separate features: computer analysis and endgame tablebases. Scores are always shown using the computer analysis feature, but at the endgame you can also see the tablebases features, available for 6-men endings I think. If you open this component, you will see each winning/drawing/losing move together with their DTZ (distance to ...


10

Unless you explicitly hard-code these endgames, or provide the computer with endgame tablebases, they will apply what they've always done throughout the game: search lines and return the static eval (which is basically the evaluation function of the engine, evaluated on the final position). The static eval isn't smart enough to realize that this game is a ...


5

As for "both positions seem fine for White": well, Black has a significant material advantage after 5...gxf3, so White has to find some compensation. If you don't have a concrete continuation which demonstrates that compensation, I don't think there's any reason to think the engine evaluation is confused. In both positions, a sensible continuation ...


3

One of Black's biggest problems in the diagram position is that White will get in Qxf3, Qxf4, followed by Qxf7+. With the f7-pawn on g7, Black can shut this plan down with ...g5. It's true putting the f7-pawn on g7 exposes Black's king to Qh5+, but it's not a big deal: Black can meet Qxf3 with ...Qf6, then Qh5+ with ...Kd8 or simply ...g6, and White has no ...


1

In the Muzio proper, White doesn't have a threat other than 6. Qxf4 (which doesn't mean so much, because that's what the c1-bishop wants). Shift the f7-pawn to g7, now White's threatening Qf3-h5+, and that's hard to deal with.


-1

here how I win against gnu chess version 6.2.2 as black: Nf3 d5 d4 Nf6 c4 e6 Nc3 c6 e3 Nbd7 Bd3 dxc4 Bxc4 b5 Bd3 a6 O-O Bb7 e4 Qc7 dxe6 fxe6 Bc2 c4 Ng5 Nc5 Qf3 Bd6 Qh3 O-O-O Re1 Kb8 Nf3 e5 Bg5 Nd3 Bxd3 Rxd3 Qh4 bxa4 Nxa4 Bb4 Bxf6 Bxe1 Rxe1 gxf6 Qxf6 Re8 Nc3 Rd6 Qg5 Rg6 Qe3 Rd8 Nd5 Bxd5 exd5 Rb6 d6 Rbxd6 Nxe5 Rd5 h3 Qc5 Qc3 Qd4 ...


1

Contempt is implemented. But your understanding is not correct. Evaluation is already counting all possible factors which engine considers. But it does not understand the idea of risk. So "Contempt" switch is like "should I insist on evading of 3-rep/50-move rules when my eval says to repeat the move?" and it is typically on/off. With ...


3

I'm not sure if you understanding of contempt is right, but in any case; I just compiled SF12 and it seems you don't have two versions of SF (the standard and the NNUE) but you can set your SF12 to behave standard or NNUE. In the configuration screen for SF12 you can enable NNUE, and also the contempt value. So the short answer to your question is yes, SF12-...


-1

Upd. Considering this question I did exercise of mating maxed out Chess.Com engine. During analysis it turned out that most like they are using some version of Stockfish or Komodo. It required a one restart of whole process, tries of different positions, sacrifices and total destruction on strategical level. It only understood that it has problems only when ...


Top 50 recent answers are included