Search found 19414 matches

by hgm
Sun Mar 07, 2021 9:49 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Reinforcement learning project
Replies: 24
Views: 2261

Re: Reinforcement learning project

I finally seem to have the tuning process working correctly. There were lots of stupid errors, and because the whole process happened 'under the hood', I had a hard time identifying them. It also revealed a bad bug in the engine: the evaluation forgot to add the piece value of the Pawns. This could ...
by hgm
Sun Mar 07, 2021 1:55 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Are Bitboards More Intoxicating Than They Are Good?
Replies: 60
Views: 2196

Re: Are Bitboards More Intoxicating Than They Are Good?

Indeed, mailbox boards hold piece types or piece numbers. The reason you want a board that holds types is exactly the same as the reason why a design that uses a piece list wants to keep a mailbox board with piece numbers (rather than types): otherwise, when you see a move captures a piece, you woul...
by hgm
Sun Mar 07, 2021 1:37 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Move ordering searches more nodes
Replies: 8
Views: 123

Re: Move ordering searches more nodes

The best way is to use SEE only on captures that might be bad (HxL). You can then downgrade the primary sort key (the victim value) to the SEE value. SEE can still be positive even for H x protected L. E.g. when two Rooks attack a Bishop protected by a Knight you can get B+N for R, which makes a SEE...
by hgm
Sun Mar 07, 2021 12:46 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Are Bitboards More Intoxicating Than They Are Good?
Replies: 60
Views: 2196

Re: Are Bitboards More Intoxicating Than They Are Good?

Because the game state is already uniquely defined by the bitboard representation. I did nort mean to say that it would be useless to have a mailbox next to the bitboard. The same could be said from a piece list in a mailbox engine; it is redundant as far as defining the game state is concerned, but...
by hgm
Sun Mar 07, 2021 12:29 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Move ordering searches more nodes
Replies: 8
Views: 123

Re: Move ordering searches more nodes

You overlook that the victim could be unprotected. QxR gains you more than PxB, if the Rook is unprotected. This is what SEE will figure out for you. If the Rook is unprotected, the QxR will have SEE = 5. If it is protected, it will have SEE = -4. All captures with SEE < 0 are bad.
by hgm
Sun Mar 07, 2021 9:58 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Delimiter development diary
Replies: 73
Views: 14194

Re: Delimiter development diary

Unlike UCI, CECP ('XBoard') is usually suitable as CLI. It originally was the CLI of GNU Chess. Of course you can add some extra commands, like "perft", or loading of some predefined positions. Or debug commands, to print the board, piecelist or evaluation details.
by hgm
Sat Mar 06, 2021 9:17 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Are Bitboards More Intoxicating Than They Are Good?
Replies: 60
Views: 2196

Re: Are Bitboards More Intoxicating Than They Are Good?

That is true, and it is exactly what the thread about the 'mailbox trials' that I started is about: trying to find new algorithms that do equivalent tasks faster. Adapting the data structures to fit the algorithm best.
by hgm
Sat Mar 06, 2021 8:27 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 34
Views: 1436

Re: The mailbox trials

I am starting to like this design more and more. It has a nice symmetry. The basis is formed by 'piece sets', 16 bits representing pieces of one player evenly spread out in a 64-bit word (0x1111111111111111 pattern). When the set represents attackers, the bits are assigned in LVA order, when they re...
by hgm
Sat Mar 06, 2021 6:57 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Are Bitboards More Intoxicating Than They Are Good?
Replies: 60
Views: 2196

Re: Are Bitboards More Intoxicating Than They Are Good?

Indeed, bitscan methods can be much faster than loops over all bits. What I don't understand is why you would want to do this with any significant frequency. (I can imagine you would do it in the FEN reader for setting up a new position.) Even the twice faster codes loops over 2 x 64 squares to set ...
by hgm
Sat Mar 06, 2021 2:00 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 34
Views: 1436

Re: The mailbox trials

The Targets Map Perhaps it is a good idea to also keep the existing captures per attacker, next to the attackers[] array that stores them per victim. Basically the attack map is a 32x32 array of bits. The attackers[] array stores this by row. A copy stored by column would put the targets of a given...