Search found 2332 matches

by Michael Sherwin
Sat Apr 25, 2020 7:32 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Simplifying code
Replies: 52
Views: 6084

Re: Simplifying code

I'm "out of the know" about this no stack idea. I understand copy and forget and making an array of modified boards (which is a stack, btw). But what I do not "see" is how effective move ordering is done. Move ordering is the absolute most important factor in the efficiency of an alpha/beta search. ...
by Michael Sherwin
Sat Apr 25, 2020 5:58 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Rewriting RomiChess from scratch for SMP
Replies: 17
Views: 2108

Re: Rewriting RomiChess from scratch for SMP

Two weeks to write one 'complicated' function is like a new record for me. Everything has been reimagined and reworked several times. I even renamed the new engine. And I'm very happy with the result. This is all the code so far. // Paradigm.cpp #define data 1 #define defines 1 #include <intrin.h> #...
by Michael Sherwin
Sat Apr 25, 2020 2:49 am
Forum: Computer Chess Club: General Topics
Topic: New engine releases 2020
Replies: 275
Views: 56086

Re: New engine releases 2020

C was created to be one thing: a portable assember. That is, a language that is easier to read and write than assembler and makes programs run on multiple architecture without rewriting, but being just as fast. It succeeded. I love C, but I love Rust better because of it's awesome static code analy...
by Michael Sherwin
Sat Apr 25, 2020 1:33 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: My castling code
Replies: 25
Views: 2595

Re: My castling code

I think I have made progress in my understanding. Just considering the white king if the wcancast (white_can_castle) variable is less than the current ply then nothing else needs to be done as castling is disabled. Else wcancast is set to INFINITY if the WC (white_king_that_can_castle) is on E1 else...
by Michael Sherwin
Mon Apr 20, 2020 6:40 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: My castling code
Replies: 25
Views: 2595

Re: My castling code

It is really sad to have to unsubscribe from ones own topic because it has degenerated into a toral circle jerk!
by Michael Sherwin
Sun Apr 19, 2020 4:55 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: My castling code
Replies: 25
Views: 2595

Re: My castling code

Hi Michael :) Even though I can understand your disappointment with regard to not getting any comments, I have to say that I didn't comment because of the code you posted. I'd love to help with anything posted in the programming forum, but to be able to do so, I have to be able to understand the pr...
by Michael Sherwin
Sat Apr 18, 2020 11:11 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: My castling code
Replies: 25
Views: 2595

Re: My castling code

int bmg() { char *sbns,*sbnd; node *ti; int fs,ts; ti=tree+first[ply]; for(id=piece[17].nxt;id<40;id=piece[id].nxt) { fs=piece[id].ps; switch(piece[id].pt) { case BISHOP: sbns=bns+bol[fs]; sbnd=bnd+bol[fs]; ts=*(sbns+fs); while(ts<64) { switch(btrgt[brd[ts]]) { case VACANT: link(MOVE); ts=*(sbns+ts...
by Michael Sherwin
Sat Apr 18, 2020 11:10 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: My castling code
Replies: 25
Views: 2595

Re: My castling code

Here is my Carnivor engine. :) (two parts) #include <stdio.h> #include <string.h> #include <ctype.h> #include <conio.h> #include <time.h> #include <signal.h> #define TRUE 1 #define FALSE 0 #define WHITE 0 #define BLACK 1 #define BOTH 2 #define OFF 3 #define BISHOP 0 #define ROOK 1 #define QUEEN 2 #d...
by Michael Sherwin
Sat Apr 18, 2020 10:29 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: My castling code
Replies: 25
Views: 2595

Re: My castling code

I'm not sure I understand the idea, but what's wrong with flags? Isn't what you propose more complicated? You'd have to manage wcancas counters when you parse FEN as well. This way board state is coupled with game state (ply counters). You'll need two counters, one for long and one for short castli...
by Michael Sherwin
Sat Apr 18, 2020 7:43 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: My castling code
Replies: 25
Views: 2595

Re: My castling code

With further thought it looks like ply - 2 is a mistake. When the king or rook moves and is putback with TakeBack() castling becomes possible again. Therefore, ply - 1 is probably correct. if (wcancas[t] > ply[t]) { wcancas[t] = INFINITY; if (board[t][E1] == WK) { if (wcancask[t] > ply[t]) { wcancas...