Search found 3387 matches

by Sven
Sun Dec 06, 2020 10:02 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Draw and check mate detection
Replies: 5
Views: 691

Re: Draw and check mate detection

3. The main issue is during evaluation when I have to check for checkmate or draw. To do this I have to calculate all legal moves in the position, do the king check thing again, and see if there are any legal moves left after king moves are removed. If in check and no legal moves -> checkmate, if n...
by Sven
Sat Nov 07, 2020 4:14 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Simplifying code
Replies: 137
Views: 59645

Re: Simplifying code

Why do you bother with a user interface for your chess engine? There are enough GUIs around so you only need to provide a working UCI or WB protocol support so that you can focus on the chess engine itself ...
by Sven
Sun Oct 25, 2020 5:33 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Different performance of equal executables
Replies: 11
Views: 1458

Re: Different performance of equal executables

"diff" would say "binary files differ" if they were different. But you don't need something like md5sum which requires to type several commands ... To determine whether two arbritrary files A and B are different at all, just type: cmp -s A B || echo "A and B are different" If that produces empty out...
by Sven
Fri Oct 16, 2020 4:20 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Simple test positions
Replies: 6
Views: 1127

Re: Simple test positions

Should be easy with a good TT
by Sven
Fri Oct 16, 2020 4:16 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Simplifying code
Replies: 137
Views: 59645

Re: Simplifying code

Henk wrote:
Fri Oct 16, 2020 8:08 am
Can't even use iterators in critical code for that means allocating memory.

So enjoy ugly code.
Iterators, as we know them from C++ STL for instance, have an intrinsic ugliness 😉

So you might want to write your own, nice, efficient, non-allocating iterators ...
by Sven
Fri Oct 16, 2020 4:07 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: int vs Board: Move generator
Replies: 5
Views: 1027

Re: int vs Board: Move generator

What exactly is "Board (just make)"? I get the impression that, despite your description, the difference is not just how a move is stored (in 16 bit vs. in a struct of three or more integers) but also what the strategy for unmake is (restore board from stack vs. explicit unmake). If that is the case...
by Sven
Sat Oct 10, 2020 4:00 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft speed optimization (renamed)
Replies: 107
Views: 15470

Re: Perft speed optimization (renamed)

Why would "getting make(), unmake() and associated functions to be as fast as possible" not include the move generation functions? And why would you not want to use a simple solution that costs very little programming effort and results in a huge gain of speed, for both perft and search? I'm using ...
by Sven
Sat Oct 10, 2020 2:29 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft speed optimization (renamed)
Replies: 107
Views: 15470

Re: Perft speed optimization (renamed)

I was speaking about a perft function without any tricks and without any special move generator optimizations (The entire thread is basically about getting make(), unmake() and associated functions to be as fast as possible, so no tricks or advanced move generation... yet :) ). In that case, you -w...
by Sven
Sun Sep 20, 2020 5:01 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: PLEASE HELP with MATING scores adjustments in TT
Replies: 9
Views: 2381

Re: PLEASE HELP with MATING scores adjustments in TT

In your search, the mate distance is relative to the root position. If you store it like that in the hash tables, and you have a hit in the next move turn, the mate score is wrong. Example. You are at move 20 and see a mate in 8 plies. You store that position. Next move turn, so you are at move 21,...
by Sven
Mon Sep 14, 2020 9:13 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: A very quick clarification question on sorting PV moves
Replies: 5
Views: 1105

Re: A very quick clarification question on sorting PV moves

[...] assuming that what you call parent node is what I called previous ply's move (it's literally the same right? say: e2e4 e7e5 - here if we are at e7e5 then e2e4 would be parent root node or how I call it previous ply's move) IS actually "leading to the current node" or how I call it - is the mo...