Search found 19597 matches
- Wed Apr 21, 2021 9:19 pm
- Forum: Computer Chess Club: Programming and Technical Discussions
- Topic: Thread overhead in C++
- Replies: 4
- Views: 97
Re: Thread overhead in C++
Why would you need a mutex for checking time? Or even, why have an extra thread for his? I can see why it solves some problems when you have one for reading input. But reading the clock is not something that can block you. If you don't want to poll you could set an alarm signal at the time you want ...
- Wed Apr 21, 2021 8:53 pm
- Forum: Computer Chess Club: Programming and Technical Discussions
- Topic: The mailbox trials
- Replies: 132
- Views: 13743
Re: The mailbox trials
Redesign As I was away from home a few days without an opporunity to program, I had a good opportunity to rethink everything. Which is good, because in any case I will have to rewrite a lot of what I have so far, in a way that cannot be done with incremental changes of exising code. I came to the f...
- Tue Apr 20, 2021 6:52 am
- Forum: Computer Chess Club: Programming and Technical Discussions
- Topic: I did some magic bitboard "science" and mostly learned not to worry about it
- Replies: 7
- Views: 389
Re: I did some magic bitboard "science" and mostly learned not to worry about it
It would be interesting if these efforts could be somehow combined, by incorporating the various bitboard generation methods into the 'toy search' on the KiwiPete position that I use to gauge the speed of the various mailbox methods. This would only require replacement of the MoveGen() and MakeMove(...
- Mon Apr 19, 2021 9:36 pm
- Forum: Computer Chess Club: Programming and Technical Discussions
- Topic: The mailbox trials
- Replies: 132
- Views: 13743
Re: The mailbox trials
The code I presented earlier for detecting the MVV was close to optimal for a test on a per-move basis. But could it still be impoved by sharing work between the moves from the same node? The problem is that the exact test that is needed is dependent on the move we want to play. This is already acco...
- Mon Apr 19, 2021 11:28 am
- Forum: Computer Chess Club: Programming and Technical Discussions
- Topic: The mailbox trials
- Replies: 132
- Views: 13743
Re: The mailbox trials
This concern about in-check nodes is sparked by he wish to improve the speed of SearchCaptures() by eliminating branches. We can classify branches into 3 groups: 'big decisions', which prune entire search trees. No way to avoid taking these. Then there are trivial things that sometimes must be skipp...
- Sun Apr 18, 2021 9:10 pm
- Forum: Computer Chess Club: Programming and Technical Discussions
- Topic: The mailbox trials
- Replies: 132
- Views: 13743
Re: The mailbox trials
Something even better: the normal (not-in-check) way of building the capture stack is a very inefficient way to just get the captures by a King. We go through the whole rigmarole of sorting the captures on the larger value groups in LVA order, while the only attacker under consideration is a King. S...
- Sun Apr 18, 2021 4:53 pm
- Forum: Computer Chess Club: Programming and Technical Discussions
- Topic: The mailbox trials
- Replies: 132
- Views: 13743
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...
- Sat Apr 17, 2021 9:57 pm
- Forum: Computer Chess Club: Programming and Technical Discussions
- Topic: The mailbox trials
- Replies: 132
- Views: 13743
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...
- Sat Apr 17, 2021 3:07 pm
- Forum: Computer Chess Club: Programming and Technical Discussions
- Topic: PST-only Evaluation for MinimalChess 0.4
- Replies: 30
- Views: 1410
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.
- Sat Apr 17, 2021 12:36 pm
- Forum: Computer Chess Club: Programming and Technical Discussions
- Topic: The mailbox trials
- Replies: 132
- Views: 13743
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...