New answers tagged

3

I agree the spec is ambiguous. This antlr grammar uses your option b game termination markers should not be considered symbol tokens, but rather a distinct type of token which is separate from symbol tokens, and the author failed to indicate this In the grammar I find SYMBOL : [a-zA-Z0-9] [a-zA-Z0-9_+#=:-]* ; separate from termination ...


4

You are right, the text as written there isn't exactly correct. It also says that the marker is a symbol and lists * as one of the options, even though * is a token on its own and also cannot occur in a symbol. That said, the meaning is clear enough, 1/2-1/2 is a valid termination marker. How you solve this in your code is up to you. As it's hard to add 1/...


1

I have seen two softwares that does what you wish. Chess Position Trainer is one of them. The other is bookup. Those softwares reads games in pgn and files containing epd positions with its evaluations in centipawns. This files contains the leaf nodes positions, generated by Chess Position Trainer for instance. You later analyze the epd file. I use "...


2

https://forum.armbian.com/topic/9862-info-how-to-compile-the-actual-64bit-version-of-stockfish-chess-engine/ Seems to show that you have to hack it to get it to compile at all.


3

In alpha/beta pruning, you only prune when further search cannot affect the outcome. In particular this means there will be no loss of information when you transition from MinMax to alpha/beta. There is only upside to alpha/beta (in contrast to other, more aggressive pruning methods). The fundamental idea of alpha/beta pruning is that once you discover a ...


1

Did you set she compiler / linker flags correctly? (/DEBUG in the linker, /Od and /Zi in the compiler - which flags did you set?) Is the pdb-file located in the same directory as the executable? You can also manually load the pdb after breaking in your code and see, if symbols appear. If not, look at the flags. To avoid the "attach to process", you can also ...


6

You'd have some data structure, such as a 2-D 8x8 array, storing the current piece in each square of the board. Everytime you read a new move, update the array appropriately. Then, when you see a capture like "exf5", check what piece is stored in the "f5" square of the array. You'll have to be careful with en passant captures. For example, in the case of 1....


3

This answer expounds on Inertial Ignorance’s #2. The idea is that you make pseudo-legal moves (moves according to piece movement, not accounting for legality) then check for legality. The way we’ll do this is by making the move, then looking at the square of the king. Loop through all squares to the right of the king (starting from the closest square) and ...


4

There are two approaches: 1) For the piece in question you're considering to move, look at the vector going through it to the king. For example, if they king and the piece are separated horizontally/vertically, look at the line going through it to the king. Is there an enemy rook/queen on this line, such that your piece is currently between it and your king?...


1

As you've seen, the Lichess API only allows bots to use the API functions that make moves in an ongoing game. As far as I can tell, this is intentional; the API requires that anything that can generate moves in a game by some means other than human interaction on the Lichess site must be flagged as a bot. Which means (again, as far as I can tell...), the ...


1

Here is some Pascal Source code from Borland 1985 that uses an AttackTab to determine whether a figure is attacked or not. Since you are interested in the algorithm this code might give you some insight. Unfortunately I don'get the syntax highlighting to work. MoveGenerator MODULE MoveGenerator; {$speed} {$include: 'types.inc'} VAR [EXTERN] {$include: '...


2

https://lichess.org/team/lichess-bots has the documentation you are looking for. If you just want the gui you can embed it like in the project used by http://lichess.bitplan.com. If you want to do moves it depends on the programming language you are using. For python e.g. there are ready to use libraries: https://github.com/rhgrant10/berserk https://github....


Top 50 recent answers are included