New engine: Rengar

Questions and comments related to CCRL testing study
Post Reply
Thomas Swayze
Posts: 9
Joined: Sat Aug 12, 2023 5:13 am
Sign-up code: 10159

New engine: Rengar

Post by Thomas Swayze »

Hi,

As a project to learn C++, I wrote a chess engine from scratch. I would love for it to have an official rating!

Source code and release binary for mac: https://github.com/teswayze/rengar/

Based on results from lichess bot games agains CCRL rated engines, I'd expect a rating in the ballpark of 2500
Ray
Posts: 22606
Joined: Sun Dec 18, 2005 6:33 pm
Sign-up code: 10159
Location: NZ

Re: New engine: Rengar

Post by Ray »

None of us have Macs. Chess is dominated by Windows and Linux machines, but potentially one of us may be able to compile for Windows (which is what all of us happen to use)
Thomas Swayze
Posts: 9
Joined: Sat Aug 12, 2023 5:13 am
Sign-up code: 10159

Re: New engine: Rengar

Post by Thomas Swayze »

Gotcha - I’m working on a Windows compatible version now
Guenther
Posts: 27
Joined: Wed Nov 25, 2020 10:55 am
Sign-up code: 10159

Re: New engine: Rengar

Post by Guenther »

Ray wrote: Sat Aug 12, 2023 10:52 pm None of us have Macs. Chess is dominated by Windows and Linux machines, but potentially one of us may be able to compile for Windows (which is what all of us happen to use)
I had no problems to compile a static default release binary (which is bmi2).
If you, or anyone from CCRL want to try it, I have uploaded it here for a while:

https://rwbc-chess.de/Downloads/Engines ... ar_bmi2.7z

I cannot try it myself as long as I have not updated my hardware (may be this fall).

@Thomas Swayze
It would be nice, if you would add an alternative (slower way) for bitmasking except using 'pext',
which would allow to compile it for older hardware too.

Guenther (RWBC)
Thomas Swayze
Posts: 9
Joined: Sat Aug 12, 2023 5:13 am
Sign-up code: 10159

Re: New engine: Rengar

Post by Thomas Swayze »

Guenther wrote: Wed Aug 16, 2023 8:38 am It would be nice, if you would add an alternative (slower way) for bitmasking except using 'pext',
which would allow to compile it for older hardware too.
Done: https://github.com/teswayze/rengar/pull/4

You can compile with

Code: Select all

make no-BMI2=1
or

Code: Select all

make no-BMI=1
Time to depth was up 50% when I benchmarked it.
Thomas Swayze
Posts: 9
Joined: Sat Aug 12, 2023 5:13 am
Sign-up code: 10159

Re: New engine: Rengar

Post by Thomas Swayze »

I released v1.0.1. Same as the original, but with windows binaries and compilable without BMI2 instructions.

https://github.com/teswayze/rengar/releases/tag/v1.0.1
User avatar
Graham Banks
Posts: 26916
Joined: Sun Dec 18, 2005 5:47 pm
Sign-up code: 0
Location: Auckland, NZ

Re: New engine: Rengar

Post by Graham Banks »

Thomas Swayze wrote: Sat Aug 19, 2023 3:50 am I released v1.0.1. Same as the original, but with windows binaries and compilable without BMI2 instructions.

https://github.com/teswayze/rengar/releases/tag/v1.0.1
Roughly how strong do you estimate Rengar 1.0.1 64-bit to be?
Thomas Swayze
Posts: 9
Joined: Sat Aug 12, 2023 5:13 am
Sign-up code: 10159

Re: New engine: Rengar

Post by Thomas Swayze »

Graham Banks wrote: Sat Aug 19, 2023 3:51 am Roughly how strong do you estimate Rengar 1.0.1 64-bit to be?
At blitz time controls, I'd guess around 2500. This is based off of some lichess bot games agains CCRL rated engines. Rengar is 1/6 against Odonata, 0/5 against Cheng, 4/4 against Eubos, 2.5/4 against Fatalii, 1.5/2 against Fornax, 0/2 against Phalanx. Of course the hardware comparison is probably apples-to-oranges so there's a pretty wide margin for error here - I wouldn't be surprised if this was off by 300 points in either direction.

I haven't tested Rengar at slower time controls. I'd expect it to be worse there as the simple eval with fast search shouldn't scale as well.
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Rengar

Post by Gabor Szots »

Thomas Swayze wrote: Sat Aug 19, 2023 3:50 am I released v1.0.1. Same as the original, but with windows binaries and compilable without BMI2 instructions.

https://github.com/teswayze/rengar/releases/tag/v1.0.1
The BMI2 exe you provide does not run on my PC, it complains of several missing DLL's.

I tried the makefile but it issued uncountable error messages (1 MB file!). This is how it starts:
lto-wrapper.exe: warning: using serial compilation of 6 LTRANS jobs
lto-wrapper.exe: note: see the '-flto' option documentation for more information
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\szots\AppData\Local\Temp\ccJwMTP5.ltrans0.ltrans.o:<artificial>:(.text+0x38eb): undefined reference to `doctest::String::String(char const*)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\szots\AppData\Local\Temp\ccJwMTP5.ltrans0.ltrans.o:<artificial>:(.text+0x3914): undefined reference to `doctest::detail::ResultBuilder::ResultBuilder(doctest::assertType::Enum, char const*, int, char const*, char const*, doctest::String const&)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\szots\AppData\Local\Temp\ccJwMTP5.ltrans0.ltrans.o:<artificial>:(.text+0x3921): undefined reference to `doctest::String::~String()'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\szots\AppData\Local\Temp\ccJwMTP5.ltrans0.ltrans.o:<artificial>:(.text+0x394e): undefined reference to `doctest::detail::ExpressionDecomposer::ExpressionDecomposer(doctest::assertType::Enum)'
So at the moment I am unable to test your engine.
Thomas Swayze
Posts: 9
Joined: Sat Aug 12, 2023 5:13 am
Sign-up code: 10159

Re: New engine: Rengar

Post by Thomas Swayze »

Thanks for your efforts and patience with this.
Gabor Szots wrote: Sat Aug 19, 2023 5:34 pm The BMI2 exe you provide does not run on my PC, it complains of several missing DLL's.
My mistake - TIL about static linking. This should be fixed now in v1.0.2: https://github.com/teswayze/rengar/releases/tag/v1.0.2
Gabor Szots wrote: Sat Aug 19, 2023 5:34 pm I tried the makefile but it issued uncountable error messages (1 MB file!).
All the errors I see there have to do with doctest, which shouldn't be included with the release build at all. I haven't been able to get the test build to work either in CI on github or on my windows VM. Because I'm not going to iterating on the engine on a windows platform fixing this is a low priority for me right now.

But the release build ("make release" or just "make") should work fine on windows, as confirmed by CI on github as well as on my VM. Just to add an extra layer of protection I factored out the tests into separate files so they won't even be touched by the release build.
Thomas Swayze
Posts: 9
Joined: Sat Aug 12, 2023 5:13 am
Sign-up code: 10159

Re: New engine: Rengar

Post by Thomas Swayze »

Have you had a chance to test this yet? Version 1.0.2 works for me on a fresh install of Windows 10 now
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Rengar

Post by Gabor Szots »

Thomas Swayze wrote: Wed Aug 23, 2023 4:39 am Have you had a chance to test this yet? Version 1.0.2 works for me on a fresh install of Windows 10 now
I was about to post that I have just started a gauntlet with it.
Thomas Swayze
Posts: 9
Joined: Sat Aug 12, 2023 5:13 am
Sign-up code: 10159

Re: New engine: Rengar

Post by Thomas Swayze »

Fantastic! :mrgreen: Thanks so much!
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Rengar

Post by Gabor Szots »

On the list now. Further testing in progress to make the error margins narrower.
User avatar
Graham Banks
Posts: 26916
Joined: Sun Dec 18, 2005 5:47 pm
Sign-up code: 0
Location: Auckland, NZ

Re: New engine: Rengar

Post by Graham Banks »

Could you please allow Rengar to use 256mb hash, which is what we usually assign to 1CPU engines?
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Rengar

Post by Gabor Szots »

Graham Banks wrote: Sun Sep 17, 2023 11:48 am Could you please allow Rengar to use 256mb hash, which is what we usually assign to 1CPU engines?
The defult hashbits=24 seem to result in a 256 MB hash table but selecting 25 you can double that value.
Thomas Swayze
Posts: 9
Joined: Sat Aug 12, 2023 5:13 am
Sign-up code: 10159

Re: New engine: Rengar

Post by Thomas Swayze »

Correct. Each hash entry is 16 bytes, so setting hashbits=24 means you use 2^28 bytes or 256MB. I made an issue to have a “hash” option similar to how other engines do it.
User avatar
Graham Banks
Posts: 26916
Joined: Sun Dec 18, 2005 5:47 pm
Sign-up code: 0
Location: Auckland, NZ

Re: New engine: Rengar

Post by Graham Banks »

Thomas Swayze wrote: Sun Sep 17, 2023 12:32 pm Correct. Each hash entry is 16 bytes, so setting hashbits=24 means you use 2^28 bytes or 256MB. I made an issue to have a “hash” option similar to how other engines do it.
:thumbup:
Post Reply