Progress on Rustic

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
lithander
Posts: 915
Joined: Sun Dec 27, 2020 2:40 am
Location: Bremen, Germany
Full name: Thomas Jahn

Re: Progress on Rustic

Post by lithander »

Carbec wrote: Mon Jun 05, 2023 9:07 am I plan to buy a new pc in the following months, based on a AMD 7950X.
Could you give me some details about your configuration ? (case, motherboard, graphic card ...)
Is it necessary to have a watercooling system ?
I am also looking for a silent system, how noisy is the 7950X ?
My budget is about 2000-2500 euros, I think it is enough to build something good.
I've built my own PCs since I was a kid in the 90s and always on a budget. When you go for a high-end CPU like the 7950X, which makes sense if you do chess programming, it's easy to think that all other parts also should be in the "premium" segment but I don't think that's necessary. You can limit it's max power draw to something less ridiculous than the stock 230 Watt PPT (use 100-150 Watt instead) and than also lower the voltage curves. You keep 100% of the single-thread performance but lose a bit of all-core load performance but now you can save several hundred € on the electricity bill and the other components because suddenly a 100€ mainboard, a 30-50€ air cooler and a 80€ PSU is sufficient. I'd go for 64GB of ram (DDR4-3200 or DDR4-3600) for ~150€ and a large SSD and spent the rest on a current gen GPU from Nvidia and that would give you a nice, quiet, power-efficient computer for 2000€! Also great for gaming, if you care about that ;)
Minimal Chess (simple, open source, C#) - Youtube & Github
Leorik (competitive, in active development, C#) - Github & Lichess
User avatar
Ras
Posts: 2694
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Progress on Rustic

Post by Ras »

lithander wrote: Mon Jun 05, 2023 1:36 pmI'd go for 64GB of ram (DDR4-3200 or DDR4-3600) for ~150€
Ryzen 7000 is DDR5 only. DDR5-6000 is said to be the sweet spot even in AMD's own marketing. Funnily enough, AMD refuses to guarantee that this even works - with two RAM sticks, Ryzen 7000 only guarantees up to DDR5-5200, and with four RAM sticks only DDR5-3600. So, DDR5-6000 is in the realm of "should probably work with two RAM slots, but rather not with four RAM slots occupied."
Rasmus Althoff
https://www.ct800.net
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: Progress on Rustic

Post by mvanthoor »

Hi :)

Long time no see. I hope you've had a good Christmas and will have an even better 2024.

Even though there hasn't been a new version of Rustic for the last 3 years, that doesn't mean I've forgotten the engine. I'm still updating Alpha 1, 2 and 3 to keep up with the latest changes in Rust and to be compatible with the latest versions of the (very few) libraries it uses. Today I've released Alpha 3.0.4, 2.3, and 1.4. These are just maintenance updates with regard to the Rust language and libraries. Their playing strength should not have changed.

New versions

I've also updated the 4.0-beta branch to the latest-everything. The two things that (still) need to be done are:
- Implement "time" and "otim" for the XBoard-protocol. AFAIIK, this will finish Rustic's XBoard implementation.
- Write a (simple) Texel-tuner, to replace the values I got from Lithander (MinimalChess/Leorik) a long time ago.

I do hope to finish this in the somewhat near future, so I can (finally) release Rustic 4.0.0 (*), which should have a massive jump in playing strength over version Alpha 3. I hope I will have more personal time than I had in the last 3 years, which were very busy. (The corona pandemic and a massive change in government regulations caused a huge amount of change in the software at work. I worked long hours in those years and I really didn't feel like adding some more programming at home.)

(*) Rustic 4 would drop the "Alpha" moniker. Having both the UCI and XBoard protocol, a magic number generator and a tapered and tuned evaluation (and its own built-in tuner), I see this one as the first 'complete' version for didactic purposes. I also target this version to complete the book at Rustic's documentation site.

Thanks for your interest :)
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: Progress on Rustic

Post by mvanthoor »

It actually looks like as if Rustic is making headway again after I dove into some topics in the Christmas vacation. Half of the Texel Tuner is now implemented:

- Read an EPD file
- Create datapoints from the lines in the EPD
- (And keep only valid ones)
- Convert the EvalParams struct to a list

To Do:
- Convert the list to an EvalParams struct to be used as a parameter for the eval
- Write a function to dump the parameters to the disk
- Write the actual tuning function

Also, much code has been refactored (again).

Also, one long standing potential undefined behavior has been resolved. To gain speed, I used an unitialized move list as if it was initialized. The compiler _could_ potentially break this. Previously Rust's linter gave a warning, but current versions give an error, which you have to specifically suppress.

Now, the movelist is now created as an (unsafe) memory block. This block is passed into the move generator. It writes the moves into that memory block, and after that it's transmuted to the actual MoveListArray inside the MoveList struct. So now, when I use the raw movelist / memory during move generation, the compiler knows that (part of) the list isn't yet fully initialized, so it doesn't do any compiler-optimization trickery with it. After the move generator has run, the list is "transmuted" (as Rust calls it) into the initialized version of its type.

The transmutation does cost a fraction of speed. Time to Depth when searching are fractions of seconds slower. This version of Rustic lost about 5-10 Elo (margin +/- 5 Elo) compared to the version that didn't have this fix. I'm going to accept it because I don't want the engine to potentially break in a future Rust version. I'll also backport this fix to versions Alpha 1, 2 and 3.

Oh. And I updated some pages in the documentation/book. Everything up to and including the introduction to the board representation is now done. I can now start with the actual implementation description.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL