## Search found 46 matches

Fri May 08, 2020 2:11 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Crafty 25.6 search stability
Replies: 39
Views: 7523

### Re: Crafty 25.6 search stability

Thank you Peter Osterlund! You are a true master and marvel. My hero. Thank you for understanding! I can verify the results (PV lines) are deterministic for each thread value versus the same thread value. Your results are interesting. I'm currently running some tests with Texel. I'm very pleased to ...
Thu May 07, 2020 11:27 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Generating all the moves on a board
Replies: 2
Views: 879

### Re: Generating all the moves on a board

You are on the correct track. I did this 10 years ago. That, was when I was talking about a move interpreter, instead of move generator. Where you don't do any of that move notation stuff. All the moves are already at hand. You just have conditions met as playable with a 1|0. King Queen Rook Bishop ...
Thu Apr 30, 2020 11:16 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Crafty 25.6 search stability
Replies: 39
Views: 7523

### Re: Crafty 25.6 search stability

Ras- if each thread gets its own separate hash table, then the threads won't exchange search data anymore, and the speedup from multithreading will be negligible. I forgot about that part. Each thread could have it's own search() and compared in the main. Picture a Multi-PV. How does it use the paw...
Thu Apr 30, 2020 8:01 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Crafty 25.6 search stability
Replies: 39
Views: 7523

### Re: Crafty 25.6 search stability

bob - Hash table is the problem. 1, 2 or more threads can store and read the same position. That's called a race condition. If you synchronize there it becomes a huge bottleneck. Let's focus on the hash table. Can you help me demonstrate this in Crafty? I want to experience this bottleneck. Ras - T...
Tue Apr 28, 2020 9:01 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Crafty 25.6 search stability
Replies: 39
Views: 7523

### Re: Crafty 25.6 search stability

Ras - <...> multi-threading with several threads writing to the hash table isn't deterministic, and it depends on when which thread writes and reads in relation to other worker threads. Because of multi threading it remains random behaviour how many reads will result in the same value before it cha...
Mon Apr 27, 2020 8:26 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Crafty 25.6 search stability
Replies: 39
Views: 7523

### Re: Crafty 25.6 search stability

About all you can do is allow each thread to search one move and then pause while the other threads do the same, one at a time. And in the same order. Which means no speedup at all, and would actually be slower than a normal alpha/beta search. If you try to let each thread search 2 moves at a time,...
Sun Apr 26, 2020 4:09 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Crafty 25.6 search stability
Replies: 39
Views: 7523

### Re: Crafty 25.6 search stability

The threads are not synchronized, if they were performance would be terrible. The problem lies in the underlying non-determinism of the operating system thread scheduling. When an interrupt comes in, which processor/thread gets the interrupt and handles it? While that is happening, that thread is n...
Sat Apr 25, 2020 8:37 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Crafty 25.6 search stability
Replies: 39
Views: 7523

### Re: Crafty 25.6 search stability

Crafty has always been this way as it doesn't clear the hash, ever. All it does, worst case, is to change the current "age" value so that at the start of any new search, it can still use old hash data, but it will overwrite old data before even thinking about overwriting new data... Okay. I figured...
Fri Apr 24, 2020 5:23 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Crafty 25.6 search stability
Replies: 39
Views: 7523

### Re: Crafty 25.6 search stability

I only wish it was deterministic as it would greatly simplify debugging the search. But it will never happen on any existing multi-threaded chess program. I came across a nice little read on phase-concurrent deterministic hash tables. https://people.csail.mit.edu/jshun/hash.pdf I have never seen th...
Thu Apr 23, 2020 11:54 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Crafty 25.6 search stability
Replies: 39
Views: 7523

### Re: Crafty 25.6 search stability

So it is possible that the hash/memory is being shared between all running Craftys? Something changes... Another good example would be the historical Crafty benchmark. Bob would have the official total nodes number. The only thing that would change is the total time elapsed and NPS. All of the rest...