I rewrote all the sliders to be like this:tcusr wrote: ↑Fri Apr 01, 2022 4:10 pmi see a lot of "ifs" in move gen for sliders, i don't know if this optimization will work but why not make rays an array of 66 elements and use another pointer that points at "rays + 1" to resolve the otherwise illegal indexes (64 and 63 - 64) returned by std::countr_zero()?Mike Sherwin wrote: ↑Fri Apr 01, 2022 7:04 amhttps://www.mediafire.com/file/72e3ovs3 ... ie.7z/fileJjaw wrote: ↑Fri Apr 01, 2022 12:12 am Hi Mike , Can you please share a Windows complie ? " So next I'll just have to write an actual Perft() and then I guess I'll post the source and exe on MediaFire. That is unless someone wants to swap in a different move generator sooner than that. If so just ask and I'll upload the source and exe right away."
It was not quite ready because I needed to do a couple of things first. Oh well.
It understands two commands.
1)setboard somefen
2)speedt // speedt is hardwired for 6 ply. I had trouble inputting a parameter for speedt.
It is currently set up not to make and unmake the leaf node. The conversion though is just to divide by three to get the ~rate for making and unmaking all moves. The exe is in the x64/release folder. I tested the download link and it worked fine.
For those that want to compile the code use MSVC 2022. And the only file needed to compile is Rommie.ccp as all the other files are includes in Rommie.cpp.
Code: Select all
case WB:
sq = std::countr_zero(ray[fs].rayNW & occ);
rayNW = (sq != 64) * ray[sq].rayNW;
sq = std::countr_zero(ray[fs].rayNE & occ);
rayNE = (sq != 64) * ray[sq].rayNE;
sq = std::countl_zero(ray[fs].raySE & occ);
raySE = (sq != 64) * ray[63 - sq].raySE;
sq = std::countl_zero(ray[fs].raySW & occ);
raySW = (sq != 64) * ray[63 - sq].raySW;
genbb[ply][fs] = rayNW | rayNE | raySE | raySW;
genbb[ply][fs] ^= bob[fs]; // bishop on board [fs]
atkbb[ply] |= genbb[ply][fs];
genbb[ply][fs] &= notMe;
break;
From 167 million nps to 184 million nps

Thanks!