Search found 2332 matches

by Michael Sherwin
Fri Apr 17, 2020 5:55 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Rewriting RomiChess from scratch for SMP
Replies: 17
Views: 2107

Re: Rewriting RomiChess from scratch for SMP

I think that the GenAllMovesQ function is in its final form. It has been completely rewritten. I know some think it is not so great but I've wanted to try it for a long time. Actually a long time ago I modified TSCP1.81 to do something very similar. TSCP searched on average 2 ply deeper using that i...
by Michael Sherwin
Fri Apr 17, 2020 12:29 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: My castling code
Replies: 25
Views: 2595

Re: My castling code

I have explained this a few times before. I was born with a learning disability. My short term memory is almost non existent. I have a hard time keeping certain things in memory, like computer code, long enough. That is why I'm asking for someone to take a look at this code. Also studying others peo...
by Michael Sherwin
Thu Apr 16, 2020 11:47 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: My castling code
Replies: 25
Views: 2595

My castling code

This was first posted umteen years ago on either the Winboard forum or this forum, don't exactly remember. However, it was never implemented. It is now implemented in my new engine although not tested yet. The basic idea behind it is that it is self contained, i.e., needing no flags or action in mak...
by Michael Sherwin
Wed Apr 15, 2020 5:17 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: EBF
Replies: 9
Views: 843

Re: EBF

During my function MakeMove I increment "Nodes" or 'QNodes" depending on which function called makemove. After each ply of search in my Iterative Deepening search I store the nodes in an array index by ply. :TotalNodes[Ply] := Nodes + Qnodes. At the end of the search I calc for each ply EBF[Ply] :=...
by Michael Sherwin
Wed Apr 15, 2020 1:19 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Compiler Optimization Question
Replies: 27
Views: 2030

Re: Compiler Optimization Question

One more note for profiling. Profile the code you are going to run... the complete chess engine. Don't take a snippet, rewrite it in a way you think might be faster, then just profile the two snippets with a simple driver program. That can be highly misleading since you are not executing all the ot...
by Michael Sherwin
Tue Apr 14, 2020 10:36 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Compiler Optimization Question
Replies: 27
Views: 2030

Re: Compiler Optimization Question

I'd advise using clang-cl toolchain for Vistual studio. Especially for heavy numerical work. https://godbolt.org/z/id9Ujf Breaking the function into smaller ones may harm performance if they don't get inlined, especially because you use global variables which would have to be reloaded after every c...
by Michael Sherwin
Tue Apr 14, 2020 10:02 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Compiler Optimization Question
Replies: 27
Views: 2030

Re: Compiler Optimization Question

What sort of move generator is this based on? This is SISSY bitboards. https://www.chessprogramming.org/SISSY_Bitboards Right now I am just using the queen code for all sliders because it is debugged and working properly. I'll write separate code for the bishop and rook once the engine is up and ru...
by Michael Sherwin
Tue Apr 14, 2020 5:32 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Lazy promotions
Replies: 24
Views: 1658

Re: Lazy promotions

I was considering calling it "Quantum Chess", but that's already taken: https://chess24.com/en/read/news/quantum-chess During promotion we normally split the search in four Rarely will that ever happen. Once the four moves are placed in the move list the moves have to be sorted. So even if the quee...
by Michael Sherwin
Mon Apr 13, 2020 5:57 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Compiler Optimization Question
Replies: 27
Views: 2030

Re: Compiler Optimization Question

And yet another question. Since I'm using simple arrays instead instead of an array of structures the move stack is: frsq[t][10000] tosq[t][10000] trgt[t][10000] type[t][10000] scor[t][10000] And this is done: if (score != -INFINITY && (score > alpha || depth > 0)) { frsq[t][eye] = fs; // had to us...
by Michael Sherwin
Mon Apr 13, 2020 4:58 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: A Neat Trick
Replies: 13
Views: 1209

Re: A Neat Trick

@hgm, Benchmarks of shift instructions comparing Intel vs AMD reveals that even ten year old AMD chips run circles around even the latest Intel chips. So my question about your solution is wouldn't it be better to use a shift instruction rather than a multiply. sq = ts ^ ((u64)(epbitboard == one<<t...