Search found 19591 matches

by hgm
Sun Apr 18, 2021 4:53 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 128
Views: 11079

Re: The mailbox trials

Check evasions The attack map makes it very easy to detect whether the stm is in check: just mask the attackers set of King with the present opponent pieces. If that isn't zero, the King is attacked. Rather than just setting an inCheck flag, we use the entire set of valid attacks as such: undo.inCh...
by hgm
Sat Apr 17, 2021 9:57 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 128
Views: 11079

Re: The mailbox trials

Color-Independent Code So far I had assumed it was unavoidable to have color-dependent code, as the merging of white and black attackers sets need shifing in opposit directions for interleaving their bits. The white attackers are in the even bits, and the black attackers are in the odd bits. So aft...
by hgm
Sat Apr 17, 2021 3:07 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: PST-only Evaluation for MinimalChess 0.4
Replies: 21
Views: 597

Re: PST-only Evaluation for MinimalChess 0.4

HCE usually stands for hand-crafted evaluation. But I don' think that excludes Texel tuning, as long as the terms you tune were picked by hand. So it is used mainly in contrast with neural networks.
by hgm
Sat Apr 17, 2021 12:36 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 128
Views: 11079

Re: The mailbox trials

I hink the ultimate code for a branchless overkill detection would be this: // zero a register 1 xor gap = u->alpha - u->pstEval - MARGIN; // calculate futility gap 1 load, 1 lea new = u->newThreats; // new victims of the current move 1 load set = u->oppoPresence; // kludge: start assuming nothing i...
by hgm
Sat Apr 17, 2021 9:10 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Missing input in ponder
Replies: 9
Views: 208

Re: Missing input in ponder

On more thinking I realized that this problem could also have been solved by actually using the number of waiting input characters that PeekNamedPipe() reports. You could put that in a variable 'buffered', which you ecrement each time you read a character from the input. As long as it is non-zero, y...
by hgm
Sat Apr 17, 2021 8:31 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 128
Views: 11079

Re: The mailbox trials

Move Sorting In a previous posting I 'went through hoops' to re-pack the captures into the desired order in the 64-bit capture set they were originally extracted from. This was pointless and stupid. It would only serve a purpose if we were using a separate extraction loop for each capture set, to m...
by hgm
Fri Apr 16, 2021 7:25 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 128
Views: 11079

Re: The mailbox trials

Well, details of he evaluation are outside the scope of this project. Except that the basic info on which an evaluation could be based should be available cheaply. That in particular applies to mobility, normally an expensive term to calculate. I did not get to that yet. But what I had in mind was t...
by hgm
Fri Apr 16, 2021 9:05 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 128
Views: 11079

Re: The mailbox trials

Piece Pair encoding II To make optimal use of 64-bit architecturs, it is better to change the piece numbering, from the natural N, N, B, B, R, R, Q, K to (N, B), (N, B), (Q, R), (K, R). Where the parentheses indicate pairs whose attackers sets can be loaded together as a 64-bit int. Intel architect...
by hgm
Thu Apr 15, 2021 5:25 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 128
Views: 11079

Re: The mailbox trials

So much for my great ideas... :( When I write x *= 0x200000001ull; the compiler optimizes the multiplier away, for a shift and an add! :shock: I suppose the problem is that there is no load immediate for 64-bit operands in x64 architecture. So you would have to load the multiplier from a memory vari...
by hgm
Thu Apr 15, 2021 4:51 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: PST-only Evaluation for MinimalChess 0.4
Replies: 21
Views: 597

Re: PST-only Evaluation for MinimalChess 0.4

Well, that is PeSTO itself, of course. And it has no Pawn evaluator. Just PST, as the name suggests.