Search found 236 matches

by mvanthoor
Fri Jun 19, 2020 6:52 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: NADYA2.0 engine progress
Replies: 7
Views: 313

Re: NADYA2.0 engine progress

This is beautiful :) I love seeing engines being written in any language that isn't C or C++. Not that I dislike those languages; I've used C extensively in the past, and if Rust hadn't existed, there would have been a great chance of me using C for my engine. It's just... plain old, same old, engin...
by mvanthoor
Fri Jun 19, 2020 10:22 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft speed and depth questions
Replies: 43
Views: 1709

Re: Perft speed and depth questions

Well, its a basic implementation of hash tables and no buckets as of yet. Also, I am a little surprised at how much slower everything is running now I have included incremental hashing of posiitons. Obviously, doing incremental updates slows down make_move and unmake_move. However, recalculating ev...
by mvanthoor
Thu Jun 18, 2020 8:19 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft speed and depth questions
Replies: 43
Views: 1709

Re: Perft speed and depth questions

Keep checking that zobrist key anytime you change anything in that function. It's very finicky. If you found my earlier topic about hashing, look into the following: - buckets (multiple spots at the same hash index) - the amount of data that can be retrieved with one memory read (64 bytes, if I reme...
by mvanthoor
Thu Jun 18, 2020 9:59 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft speed and depth questions
Replies: 43
Views: 1709

Re: Perft speed and depth questions

PS: This is perftsuite.epd (converted to a Rust array), with some additions I found around these forums. I have a function that runs perft through this array, position by position, and it quits as soon as a number doesn't match. // This is the table with all the tests from perftsuite.epd. pub const ...
by mvanthoor
Thu Jun 18, 2020 9:54 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft speed and depth questions
Replies: 43
Views: 1709

Re: Perft speed and depth questions

As already pointed out, the first thing is ensure a correct implementation. Optimization and anything else comes after it. What will you implements is related to your final goal. I love it when people write chess engines in another language that isn't C or C++. Ada was one of the languages I consid...
by mvanthoor
Wed Jun 17, 2020 12:52 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Removing bugs from bug free functions
Replies: 20
Views: 882

Re: Removing bugs from bug free functions

So I guess I'm going back to the faster way of fixing this with the code: if (4 == 5) PrintGeneralText(" 4 == 5 "); This is strange. "if (4 == 5) doSomething()" is the same as "if (false) doSomething()". You have an unreachable branch. In Rust, the compiler will warn you about that, and proceed to ...
by mvanthoor
Wed Jun 17, 2020 12:43 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Profile with gprof and code::blocks
Replies: 5
Views: 358

Re: Profile with gprof and code::blocks

Ick. If I have to disable optimizations, then the profiler cannot tell me what I want to know (which is when compiled for optimization, what are the bottlenecks in the code) The problem is that, when you leave optimizations enabled, the compiler inlines lots of functions. In the case of perft (whic...
by mvanthoor
Wed Jun 17, 2020 7:33 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft speed and depth questions
Replies: 43
Views: 1709

Re: Perft speed and depth questions

Crafty does both. I usually use "perf" rather than perft: White(1): perft 6 total moves=119060324 time=3.09 White(1): perf 6 generated 80000000 moves, time=0.40 seconds generated 200103552 moves per second generated/made/unmade 80000000 moves, time=1.59 seconds generated/made/unmade 50367936 moves ...
by mvanthoor
Tue Jun 16, 2020 2:47 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft speed and depth questions
Replies: 43
Views: 1709

Re: Perft speed and depth questions

I went for a fully legal generate move function and when I profile my Make and Unmake move functions they ustilise approx 45%-50% of the CPU time (Not Bulk counting). I have implemented Zobrist hashing and this has caused a fair amount of overhead but this also seems to work fine. The Key at the en...
by mvanthoor
Mon Jun 15, 2020 8:48 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Perft speed and depth questions
Replies: 43
Views: 1709

Re: Perft speed and depth questions

This is very helpful, thankyou! I like your approach of bencmarking the Perft based on what is useful for the final engine and not just trying to minimise the time. Was your final time of 78 seconds based on compiling for a 32 bit or 64 bit platform? I am compiling for 32 bit. If i compile for 64 b...