Search found 641 matches

by smatovic
Mon Jun 21, 2010 6:13 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: move structure
Replies: 14
Views: 2218

Re: move structure

...ran some tests...packing and unpacking lowers performance significantly.
by smatovic
Sun Jun 20, 2010 3:53 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Vector problem - square addition
Replies: 12
Views: 1242

Re: Vector problem - square addition

hmm, maybe you should init the result array

Code: Select all

int result[] = {0,0,0,0,0,0,0,0};
by smatovic
Sun Jun 20, 2010 11:31 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Vector problem - square addition
Replies: 12
Views: 1242

Re: Vector problem - square addition

What is result[] doing ? Assumed the score for an position is stored in sq[] then you got the total score of a file in result[]. Where result[0] is file a and result[7] is file h. for (i =0; i<64; i++) { result[i-(i&56)]+=sq[i]; } for (i =0; i<8; i++) { cout << result...
by smatovic
Sat Jun 19, 2010 5:37 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: move structure
Replies: 14
Views: 2218

Re: move structure

Ok, i got a clue how this works....will think about that.
by smatovic
Sat Jun 19, 2010 4:08 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: move structure
Replies: 14
Views: 2218

Re: move structure

would be a reasonably efficient way to generate moves.
I dont get it. What is the content of nextMoveTable ?
by smatovic
Sat Jun 19, 2010 2:50 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Vector problem - square addition
Replies: 12
Views: 1242

Re: Vector problem - square addition

not sure if this is what you look for:

Code: Select all

result&#91;8&#93; /* 0-7 => a-h */

for &#40;i =0; i<64; i++)
    result&#91;i-&#40;i&56&#41;&#93;+=sq&#91;i&#93;
by smatovic
Sat Jun 19, 2010 10:12 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: move structure
Replies: 14
Views: 2218

Re: move structure

Micro-Max uses the same system. Then i understood after all your documention. (This caused a bug in early uMax versions, because the capture to the old from-square of the King is a capture to an empty square, so that Pawns refused to make it, and you were allowed to casle out of a Pawn check. So I ...
by smatovic
Sat Jun 19, 2010 9:48 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: move structure
Replies: 14
Views: 2218

Re: move structure

don't quite get you. If you create whole new boards, then why keep the undo information at all? All it would take is sq_from, sq_to, promotion_piece (, score). The boards i create resist currently in global memory (RAM), which is slow. What I want is to keep an actual working-board in private/local...
by smatovic
Fri Jun 18, 2010 11:17 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: move structure
Replies: 14
Views: 2218

Re: move structure

But why would you want to make that compact? This just causes extra work unpacking it. Putting data that is used separately in places where it can also be accessed separately (e.g. in a separate byte) seems much more efficient, even if it takes some extra memory. (Unless you are programming an embe...
by smatovic
Fri Jun 18, 2010 9:23 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: move structure
Replies: 14
Views: 2218

Re: move structure

The search i use is not recursive, its based on a while loop with a move stack. Until now i created hole boards instead of domove/undomove. If i put more information from the move generator into the move structure i keep the domove function slim, otherwise i have to handle en passant and castling in...