Search found 19576 matches

by hgm
Tue Apr 13, 2021 12:13 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 115
Views: 8953

Re: The mailbox trials

Keeping Track of Attacked Pieces Because things were getting more complex than is healthy, the following thought occurred to me: what if we just try to keep an incrementally updated summary of attacked pieces? In the format of a 'victim set', i.e. one bit per piece to indicate if that piece is atta...
by hgm
Mon Apr 12, 2021 7:01 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 115
Views: 8953

Re: The mailbox trials

So the next routine to scrutinize is SearchCapture(), which is the combined make-search-unmake-minimax for captures, to which the Search() it calls furthermore outsources the determination of the MVV. (So that overkill pruning can be applied before making the move if it turns out no suitable MVV is ...
by hgm
Mon Apr 12, 2021 2:23 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 115
Views: 8953

Re: The mailbox trials

I also have a Linux VM on my laptop, and managed to move the program there, so I could profile it. The gcc I have there apparently is a 64-bit one. This makes the program run significantly faster, even though it hardly uses 64-bit data types. The version with the differentiated move-step lists now t...
by hgm
Mon Apr 12, 2021 11:04 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 115
Views: 8953

Re: The mailbox trials

I now tried a similar 'trick' with the slider part of the MovePiece() routine (and did away with the dedicated routines for each piece type, as this did not seem to help, and thus woul just cause unneeded pressure on the L1 instruction cache when the program gets more complicated). That is, I no lon...
by hgm
Mon Apr 12, 2021 9:46 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 115
Views: 8953

Re: The mailbox trials

Ineresting. The critical loop in AddMoves() for leapers was int dir = firstCapt[u->piece-16]; int v = steps[dir]; do { int sqr = u->from + v; // target square int victim = board[sqr]; // occupant of that square if(victim + 16 & 32) { // rejects empty squares and edge guards attackers[victim] -= bit;...
by hgm
Sun Apr 11, 2021 9:26 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 115
Views: 8953

Re: The mailbox trials

The puzzling thing is that (on my laptop, this time) using the same, complete list of moves for the leapers on every square, rather than a per-square adapted list that only contains moves that stay on board. I saw the same thing on my PC with one of the earlier versions, when I first implemented the...
by hgm
Sun Apr 11, 2021 2:31 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 115
Views: 8953

Re: The mailbox trials

Magic Move Step Leapers in Chess can only have King steps or Knight leaps, and of each there are only eight. So in principle 4 bits would be enough to encode what move is meant. But using a lookup table for decoding these would defeat the purpose of eliminating load instructions. I was hoping that ...
by hgm
Sun Apr 11, 2021 9:31 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 115
Views: 8953

Re: The mailbox trials

Well, the fact that my PC went dead yesterday (graphics card?) will not be very beneficial for the progress of this project. But let me dwell on some theoretical aspects. We see that a significant fraction of the time (20%, in some compiles this even went up to 24%, without any clear reason) is spen...
by hgm
Sat Apr 10, 2021 3:27 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 115
Views: 8953

Re: The mailbox trials

I made the map update for non-captures now also incremental. For that I had to add a new routine for collecting the attacks on a hitherto unoccupied square, and then blocking all slider attacks that it catches. (I.e. remove those from the attackers sets of the downstream pieces they were originally ...
by hgm
Sat Apr 10, 2021 1:01 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The mailbox trials
Replies: 115
Views: 8953

Re: The mailbox trials

I moved the stuff to Linux, so I could do profiling to see where the time goes. (Un Cygwin profiling never worked for me: it always lists all functions as using 0% of the time!) This gave the following list: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls ...