Search found 94 matches

by fabianVDW
Sat Mar 28, 2020 10:12 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Where to enter/read position into hash table in perft?
Replies: 25
Views: 844

Re: Where to enter/read position into hash table in perft?

That really sounds like a make move error to me, zobrist collision with that amount of nodes is unlikely to occur that often edit: For debugging purposes, you can try to make zobrist keys static, or start from a fixed seed. This makes it easier to find the error, just perft_div until you found the i...
by fabianVDW
Sat Mar 28, 2020 7:14 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Where to enter/read position into hash table in perft?
Replies: 25
Views: 844

Re: Where to enter/read position into hash table in perft?

Am I correct that I should be trying to read just before board.gen_all_moves(mlp.get_list_mut(index)); Then, if I find anything, just return the stored number of leaf nodes and if I don't find anything, do the normal perft routine, and store the position just before passing back the number of leaf ...
by fabianVDW
Sat Mar 28, 2020 7:11 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Where to enter/read position into hash table in perft?
Replies: 25
Views: 844

Re: Where to enter/read position into hash table in perft?

Trying to recreate my post from earlier: You will want to have O(1) when reading from the hashtable, instead of a linear search for each key. So in Rust, I would do: let mut hash_table = vec![HashEntry::default(); HASH_SIZE]; pub fn insert_entry(hash_table: &mut Vec<HashEntry>, entry: HashEntry){ le...
by fabianVDW
Sat Mar 28, 2020 4:39 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Where to enter/read position into hash table in perft?
Replies: 25
Views: 844

Re: Where to enter/read position into hash table in perft?

Posting lost due to moderator stupidity.

Sorry about that, HGM
. :oops:
by fabianVDW
Wed Mar 25, 2020 10:26 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft function too slow because of vcruntime140.dll
Replies: 25
Views: 899

Re: Perft function too slow because of vcruntime140.dll

edit: this evening I wrote a function to execute all the perft tests in "perftsuite.epd" as posted here (many other engines and authors include it, by the way): https://github.com/TerjeKir/Chess-test-suites/blob/master/EPDs/perftsuite.epd It verified all 127 positions without errors. Many things in...
by fabianVDW
Wed Mar 25, 2020 7:36 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft function too slow because of vcruntime140.dll
Replies: 25
Views: 899

Re: Perft function too slow because of vcruntime140.dll

Why should that be necessary? Because the hashtable won't work with that many threads and exclusive access. The engine would spend all of its time waiting for the access right to be passed around. Splitting the hashtable into exclusive per-thread chunks won't work either because the hashtable is wh...
by fabianVDW
Wed Mar 25, 2020 5:43 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft function too slow because of vcruntime140.dll
Replies: 25
Views: 899

Re: Perft function too slow because of vcruntime140.dll

Personally, I think using unsafe code to intentionally do something which the core language specifically prohibits, is uglier than writing a "workaround" like a move list pool. Using pools, be it for threads, applications, or stuff like printers, is a known way to share resources. I for myself can ...
by fabianVDW
Wed Mar 25, 2020 10:28 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft function too slow because of vcruntime140.dll
Replies: 25
Views: 899

Re: Perft function too slow because of vcruntime140.dll

I think the difference to C is that stack variables are not zero initialised in C. Of course it's going to be slow if you have some zeroing loop going on for 256 elements even if it turns out that you only have 20 moves, like in the initial position itself. So the question would be how to get unini...
by fabianVDW
Sun Mar 22, 2020 8:12 pm
Forum: Computer Chess Club: General Topics
Topic: New chess engine: Rustic
Replies: 18
Views: 2069

Re: New chess engine: Rustic

You should read in a file of perft test positions and run more tests, you will wonder about all the rules in chess you missed. There are pretty exhaustive lists out on talkchess. There even were some things I missed and only fixed some months after the engines was already listed on rating lists, wit...