New engine: Lambergar

Questions and comments related to CCRL testing study
jabolcni
Posts: 14
Joined: Wed Nov 15, 2023 11:34 am
Sign-up code: 10159

New engine: Lambergar

Post by jabolcni »

Hello all,

I would like to propose a new chess engine called Lambergar for testing on CCRL board. I have been developing it now for a few months. Lambergar is written in zig programming language. Current version is 0.3.1 and is a first public release.
Homepage and source is on Github: https://github.com/jabolcni/Lambergar
Binaries are available also on Github: https://github.com/jabolcni/Lambergar/r ... tag/v0.3.1

All versions are compiled on windows, I have tested linux version on Ubuntu and it works. On Linux you need to do a “chmod +x lambergar-v0.3.1-x86_64-linux” so that the engine file becomes executable. I have also compiled version for MacOs, but I have no way of testing it.
I have compiled and extensively tested compilation for various CPU architectures for windows version, but I do not see any differences between them. I think version “lambergar-v0.3.1-x86_64-windows.exe” should work everywhere.

I have tested my engine against several engines (Lynx 0.19, Mida 1.2.1, Hopper 1.8, Anka 0.6.0. Bumblebee 1.0.36898e1) in range of 2350 to 2450 on CCRL Blitz board and it seems comparable to engines around 2400.

Best regards,
Janez
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Lambergar

Post by Gabor Szots »

Hi Janez,

I have put your engine in my testing queue. No promises but I hope to test it before long.

Judging by the story of Lambergar, you are from Slovenia, are you? And, would you like to remain anonym?
jabolcni
Posts: 14
Joined: Wed Nov 15, 2023 11:34 am
Sign-up code: 10159

Re: New engine: Lambergar

Post by jabolcni »

Hi Gabor,

indeed I am from Slovenia, my name is Janez Podobnik and there is no need to remain anonymous.

Thank you for adding my engine on the list for testing.

Regards,
Janez
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Lambergar

Post by Gabor Szots »

Thanks.

Now, I have started a tournament but may I have some questions.

When I start the engine from the command line, nothing is displayed. When I type uci, again nothing. I type isready, no reply. Why is that?

Also, can hash size be set? The memory usage Arena displays (534 MB) is quite large, is hash size fixed to some value by default?
jabolcni
Posts: 14
Joined: Wed Nov 15, 2023 11:34 am
Sign-up code: 10159

Re: New engine: Lambergar

Post by jabolcni »

Try to put "space" behind each command, that may help. Default value for hash table is set to 128 mb, 534 mb seems strange. Hash entry is 128 bits in size, so if I would miss the calculation of hash size it would be way of. I installed arena and in my arena gui it says that the usage is 182 mb, which is still more than 128 mb.
jabolcni
Posts: 14
Joined: Wed Nov 15, 2023 11:34 am
Sign-up code: 10159

Re: New engine: Lambergar

Post by jabolcni »

The computer where I compiled the engine is quite new, so it might be compiled for new arhitecture. I compiled engine for hashwell arhitecture and uploaded it on github as lambergar-v0.3.1-x86_64-windows-general.exe. This one might be more "general".
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Lambergar

Post by Gabor Szots »

I put a space after each command and this is how it looks:
uci
isready
quit
id name Lambergar v0.3
id author Janez Podobnik
option name Hash type spin default 128 min 1 max 4096
uciok
It is strange that the outputted lines appear only after 'quit'.
Anyway, the requirement to add a space after each typed line is a bit odd, don't you think?
And the displayed version number is not quite correct.

BTW, your estimate of 2400 Elos seems way off the mark. Against 2400 Elo engines it has 80 % out of 26 games.
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Lambergar

Post by Gabor Szots »

jabolcni wrote: Tue Nov 21, 2023 8:59 am The computer where I compiled the engine is quite new, so it might be compiled for new arhitecture. I compiled engine for hashwell arhitecture and uploaded it on github as lambergar-v0.3.1-x86_64-windows-general.exe. This one might be more "general".
Hashwell has BMI2, is that general? Some users still use 32-bit engines.
Ray
Posts: 22606
Joined: Sun Dec 18, 2005 6:33 pm
Sign-up code: 10159
Location: NZ

Re: New engine: Lambergar

Post by Ray »

I'd ignore 32-bit compiles. Those few users who run it need to upgrade.
jabolcni
Posts: 14
Joined: Wed Nov 15, 2023 11:34 am
Sign-up code: 10159

Re: New engine: Lambergar

Post by jabolcni »

Gabor Szots wrote: Tue Nov 21, 2023 9:04 am I put a space after each command and this is how it looks:
uci
isready
quit
id name Lambergar v0.3
id author Janez Podobnik
option name Hash type spin default 128 min 1 max 4096
uciok
It is strange that the outputted lines appear only after 'quit'.
Anyway, the requirement to add a space after each typed line is a bit odd, don't you think?
And the displayed version number is not quite correct.
I tested the engine on older computer and I noticed the same error in output. I guess compilation on my computer, which is quite new, is not appropriate for older computers. I will compile engine on a computer which is not as recent as mine. That might solve the issue.

Regarding the space behind the command: this is not required on linux, it is required only on windows. I am also annoyed by that, I will put this on top of my list. I forgot to update the displayed version on 0.3.1 from previous version.
BTW, your estimate of 2400 Elos seems way off the mark. Against 2400 Elo engines it has 80 % out of 26 games.
I guess this is good if it means 80% win rate.

I will try to solve the issues with versions and uci command as soon as possible.
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Lambergar

Post by Gabor Szots »

jabolcni wrote: Tue Nov 21, 2023 12:53 pmRegarding the space behind the command: this is not required on linux, it is required only on windows.
It does not help even if I put that extra space after the line.
jabolcni
Posts: 14
Joined: Wed Nov 15, 2023 11:34 am
Sign-up code: 10159

Re: New engine: Lambergar

Post by jabolcni »

I fixed the issue with uci commands (I hope). I added two builds for Intel arhitectures. Latest builds are on https://github.com/jabolcni/Lambergar/r ... ag/v0.3.1b
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Lambergar

Post by Gabor Szots »

jabolcni wrote: Tue Nov 21, 2023 3:18 pm I fixed the issue with uci commands (I hope). I added two builds for Intel arhitectures. Latest builds are on https://github.com/jabolcni/Lambergar/r ... ag/v0.3.1b
You indeed did. But how about this:
uci
id name Lambergar v0.3.1
id author Janez Podobnik
option name Hash type spin default 128 min 1 max 4096
uciok
isready
readyok
position startpos
go depth 10
Ůľ╚].zt»Y▀á21S÷ËKçd1e6UŠÄ┤23╣Śd┘6764119 Ä
zç30údš▓LÂę[┌g0Ťýšag1f3
Ůľ╚].zt»Y▀á15S÷ËKçd2e6UŠÄ┤65╣Śd┘61497695 Ä
zç30údš▓LÂę[┌g0Ťýšag1f3g8f6
Ůľ╚].zt»Y▀á20S÷ËKçd3e6UŠÄ┤364╣Śd┘63702950 Ä
zç30údš▓LÂę[┌g0Ťýšag1f3g8f6d2d4
Ůľ╚].zt»Y▀á15S÷ËKçd4e6UŠÄ┤692╣Śd┘64253226 Ä
zç30údš▓LÂę[┌g0Ťýšag1f3g8f6d2d4d7d5
Ůľ╚].zt»Y▀á18S÷ËKçd5e6UŠÄ┤1264╣Śd┘64130718 Ä
zç30údš▓LÂę[┌g0Ťýšag1f3g8f6d2d4d7d5b1c3
Ůľ╚].zt»Y▀á15S÷ËKçd6e6UŠÄ┤4685╣Śd┘64734714 Ä
zç30údš▓LÂę[┌g0Ťýšag1f3g8f6d2d4d7d5b1c3b8c6
Ůľ╚].zt»Y▀á13S÷ËKçd7e6UŠÄ┤11832╣Śd┘64920568 Ä
zç32údš▓LÂę[┌g0Ťýšag1f3g8f6d2d4d7d5b1c3b8c6c1e3
Ůľ╚].zt»Y▀á15S÷ËKçd8e6UŠÄ┤13370╣Śd┘65031801 Ä
zç32údš▓LÂę[┌g1Ťýšag1f3g8f6d2d4d7d5b1c3b8c6c1e3c8e6
Ůľ╚].zt»Y▀á21S÷ËKçd9e6UŠÄ┤95546╣Śd┘64737786 Ä
zç320údš▓LÂę[┌g2Ťýšae2e4b8c6b1c3g8f6g1f3d7d5e4d5f6d5c3d5d8d5
Ůľ╚].zt»Y▀á15S÷ËKçd10e6UŠÄ┤166217╣Śd┘64584411 Ä
zç336údš▓LÂę[┌g6Ťýšae2e4e7e5b1c3g8f6g1f3b8c6f1d3f8d6e1g1e8g8
bestmove e2e4
jabolcni
Posts: 14
Joined: Wed Nov 15, 2023 11:34 am
Sign-up code: 10159

Re: New engine: Lambergar

Post by jabolcni »

I had to study a little bit for what kind of x86-64 arhitectures I need to release the engine. This latest release should solve the problem.

Release x86-64-v3 should work on most moder PCs, I tested it on skylake, which is not the latest and greatest. Release x86-64-v4 does not work on skylake, but it works on raptorlake which is greatest and latest. I guess v3 should now work as a general release for 64bit PCs.

Latest release: https://github.com/jabolcni/Lambergar/r ... ag/v0.3.1c
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Lambergar

Post by Gabor Szots »

jabolcni wrote: Tue Nov 21, 2023 9:24 pm I had to study a little bit for what kind of x86-64 arhitectures I need to release the engine. This latest release should solve the problem.

Release x86-64-v3 should work on most moder PCs, I tested it on skylake, which is not the latest and greatest. Release x86-64-v4 does not work on skylake, but it works on raptorlake which is greatest and latest. I guess v3 should now work as a general release for 64bit PCs.

Latest release: https://github.com/jabolcni/Lambergar/r ... ag/v0.3.1c
I started a new tournament, this time using 0.3.1c-v3. It scored only 5,5 points out of the first 25 games. Then I reverted to the original 0.3.1 and since then it scored 7,5/19. I know, too few games for statistics but maybe it's an indication of something you might like to check.
jabolcni
Posts: 14
Joined: Wed Nov 15, 2023 11:34 am
Sign-up code: 10159

Re: New engine: Lambergar

Post by jabolcni »

Thanks for letting me know that. I am already developing a new stronger version with improved time controls and history statistic. While I certainly plan to release this improved version, it won't be in the immediate future, I don’t think I will manage it this year. I will obviously need to look into this matter with different versions.
Could you please provide details about the computer you use for testing and your testing methodology? I will then try to setup similar testing conditions to see what is going on. It's possible that the issue lies in the Zig compiler versions, or there might be a bug in my engine causing erratic and inconsistent gameplay.
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Lambergar

Post by Gabor Szots »

In the meantime 75 games were played with the old version with the result of 30 points. So the tendency remained.

My computer is an Intel i7-12700K CPU and 32 GB RAM, OS is Windows 11. TC is 85s base time + 1s increment.
jabolcni
Posts: 14
Joined: Wed Nov 15, 2023 11:34 am
Sign-up code: 10159

Re: New engine: Lambergar

Post by jabolcni »

I am announcing a new version of Lambergar. Latest version is now v0.4.0, release files for windows and linux are on https://github.com/jabolcni/Lambergar/r ... tag/v0.4.0

New version should be around 2650 ELO Blitz rating.
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Lambergar

Post by Gabor Szots »

Hi Janez,

I have observed odd things.

1. Run from the command line memory usage is 243 MB with default settings. Issuing 'setoption name Hash value 256' the amount is 4 times of that, 1145 MB. Process Explorer says those are private bytes, while Working Set is 154 MB and 524 MB, respectively.

2. Run from the command line, when I issue 'go depth 20' and it finishes searching, I can't quit using the quit command.

3. Under Arena the same memory usage is observed. And when I start then stop analyzing, Process Explorer reports Lambergar is still using a core (5 %, I have 20 virtual cores).
jabolcni
Posts: 14
Joined: Wed Nov 15, 2023 11:34 am
Sign-up code: 10159

Re: New engine: Lambergar

Post by jabolcni »

Hi Gabor,

first thanx for testing the new version of engine.

1. I have found the same results. If I hardcode initial value for hash to 256 MB I get twice the size compared to setting the initial value to 128 MB, so it seems there is something wrong how the resized hash table reserves the memory.

I could not repeat the problem 2. I tested on 3 different windows computers and 1 linux computer.

Regarding problem 3. It seems that the engine does no register command stop and just analyses indefinitely. I thought this is easiest to solve, but I do not use any threads, so engine is just stuck in endless analysis in search function.

I will need some time to figure this things. For problem 2 I will need to find some testers to quickly test the engine, to replicate the error.
jabolcni
Posts: 14
Joined: Wed Nov 15, 2023 11:34 am
Sign-up code: 10159

Re: New engine: Lambergar

Post by jabolcni »

A new version of Lambergar engine was released, fixing bug 1 and 3 mentioned in previous posts.

New version is available on
https://github.com/jabolcni/Lambergar/r ... tag/v0.4.1
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Lambergar

Post by Gabor Szots »

jabolcni wrote: Fri Feb 02, 2024 9:21 am A new version of Lambergar engine was released, fixing bug 1 and 3 mentioned in previous posts.

New version is available on
https://github.com/jabolcni/Lambergar/r ... tag/v0.4.1
Just downloaded it. Its test will be delayed by a couple of days because of my limited resorces.

Will that extra thread occupy a core constantly? I would not like it because it slows my machine down.
jabolcni
Posts: 14
Joined: Wed Nov 15, 2023 11:34 am
Sign-up code: 10159

Re: New engine: Lambergar

Post by jabolcni »

Gabor Szots wrote: Fri Feb 02, 2024 9:28 am Will that extra thread occupy a core constantly? I would not like it because it slows my machine down.
Interface and search are running in separate threads, so two threads are used for running the engine. When running the search the usage of CPU goes to full use, but when the search stops, the usage goes virtually to zero. I am not sure if this answers your question. Interface runs in while loop, but does barely use any resources, however I could add some sleep into interface while loop so that the loop would run with lower frequency.
User avatar
Gabor Szots
Posts: 12849
Joined: Sat Dec 09, 2006 6:30 am
Sign-up code: 10159
Location: Szentendre, Hungary

Re: New engine: Lambergar

Post by Gabor Szots »

jabolcni wrote: Fri Feb 02, 2024 10:05 am
Gabor Szots wrote: Fri Feb 02, 2024 9:28 am Will that extra thread occupy a core constantly? I would not like it because it slows my machine down.
Interface and search are running in separate threads, so two threads are used for running the engine. When running the search the usage of CPU goes to full use, but when the search stops, the usage goes virtually to zero. I am not sure if this answers your question. Interface runs in while loop, but does barely use any resources, however I could add some sleep into interface while loop so that the loop would run with lower frequency.
Using Process Explorer I can see that it uses only one thread while searching. I could not stop searching by issuing 'stop', it must be done some other way I guess.
I will have to check its CPU usage while in a match against another engine but I think its CPU usage will be close to zero.

Originally I wanted to know if the second thread is always doing something, in other words, will the CPU usage be 10 % during search and 5 % while waiting for the opponent to move. But I can see that it uses 5 % while searching. Before I issued 'go infinite' it used 0.

All in all, it seems it's OK.
jabolcni
Posts: 14
Joined: Wed Nov 15, 2023 11:34 am
Sign-up code: 10159

Re: New engine: Lambergar

Post by jabolcni »

Gabor Szots wrote: Fri Feb 02, 2024 11:44 am Using Process Explorer I can see that it uses only one thread while searching. I could not stop searching by issuing 'stop', it must be done some other way I guess.
I’m slightly puzzled by this. When I run the engine from the command window on my PC, I can use ‘go depth 100’ or ‘go infinite’. When I type ‘stop’ and confirm with enter, the ‘stop’ command halts the search and returns the best move. Have you tried it from the command window or from a graphical GUI? Regardless, I don’t want to trouble you any further. I’ll test this on other computers.
Post Reply