Zahak, a GoLang based chess engine

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Zahak, a GoLang based chess engine

Post by amanjpro »

Hey good folks,

I am new here, this is my first post, but hopefully won't be the last one.

Lately, I have been working on a simple chess engine, written in GoLang.
Strength-wise it is at the same level as Vice (~2100 Elo ratings?). While I have
watched the Vice videos, I only knew about them after the engine was already
almost completely built. So there are many differences, and obviously many
similarities (I changed somethings for better based on the video series).

Based on this (very old) post https://chess.stackexchange.com/questio ... ess-engine
to obtain an "official" rating for the engine, I have to announce it here for engine testers? is this still the case?
how can I obtain an official rating nowadays?

I started working on the engine, to better understand chess programming terminology, so I better
enjoy TCEC SuFi matches, but ended up building a fully functional one :D

The source code of Zahak is on GitHub: https://github.com/amanjpro/zahak
and there are a bunch of releases already, you can pick an executable for your own platform: https://github.com/amanjpro/zahak/releases/tag/0.2.0
Currently Zahak is playing as a bot on LiChess: https://lichess.org/@/zahak_engine
Gabor Szots
Posts: 1362
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: Zahak, a GoLang based chess engine

Post by Gabor Szots »

Hi Amanj,

Welcome and thank you for sharing your engine with us.

There is no such thing as official rating, there are testing groups and individuals who maintain ranking lists, some of them has a long-standing history.

I guess it is perfect to announce your engine here, someone will surely show interest in testing it. In fact Günther has already announced it and put it on his invaluable engine chronology.
Gabor Szots
CCRL testing group
Gabor Szots
Posts: 1362
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: Zahak, a GoLang based chess engine

Post by Gabor Szots »

Some problems:
1. Running from the command line and issuing the command uci it does not display any parameters but says it does not understand 'uci'.
2. Running under Arena the memory it uses is over 1 GB although I have set 256 MB for hash. In cutechess GUI I can see that default value for hash is 10, what does that number mean?
Gabor Szots
CCRL testing group
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: Zahak, a GoLang based chess engine

Post by amanjpro »

Oh, that is fantastic. I don't know the URL to Günther's list, can you please share.

As for the problems, it is a bit surprising for me, because they don't happen with me (I have tested it under Linux and Mac), can you please tell me what OS do you run Zahak on?

Code: Select all

Amanjs-MacBook-Pro:zahak amanj$ bin/zahak
uci
id name Zahak

id author Amanj

option name Ponder type check default false

option name Hash type spin default 10 min 1 max 8000

option name Book type check default false

uciok
And the 10 is supposed to be MB, and it only considers the Hash size, not the program size. For example under my Mac when the Hash size is 10, the overall program size in memory is ~40MB (Golang runtime overhead and other allocations maybe).

The link below shows two instances of Zahak running (named them differently for clarity, but they are the same binary). One runs with 1000MB (1G Hash), and the overall program size becomes 1.4G, the other is 10MB Hash (the overall program size is 40. mmm... but that is not proportional, probably I am not computing the hash size correctly. Will review it. Thanks for the feedback

https://drive.google.com/drive/u/0/fold ... orB1zrB7Uh
Gabor Szots
Posts: 1362
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: Zahak, a GoLang based chess engine

Post by Gabor Szots »

amanjpro wrote: Sun Mar 14, 2021 2:18 pm Oh, that is fantastic. I don't know the URL to Günther's list, can you please share.
Gabor Szots
CCRL testing group
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: Zahak, a GoLang based chess engine

Post by amanjpro »

Fixed the link above, sorry for that: https://drive.google.com/file/d/1IV_oIY ... sp=sharing
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: Zahak, a GoLang based chess engine

Post by amanjpro »

Gabor Szots wrote: Sun Mar 14, 2021 2:59 pm
amanjpro wrote: Sun Mar 14, 2021 2:18 pm Oh, that is fantastic. I don't know the URL to Günther's list, can you please share.
Thank you a lot! that is so cool
Gabor Szots
Posts: 1362
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: Zahak, a GoLang based chess engine

Post by Gabor Szots »

amanjpro wrote: Sun Mar 14, 2021 2:18 pm As for the problems, it is a bit surprising for me, because they don't happen with me (I have tested it under Linux and Mac), can you please tell me what OS do you run Zahak on?
This is 64-bit Windows 10 (home edition).
Gabor Szots
CCRL testing group
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: Zahak, a GoLang based chess engine

Post by amanjpro »

Gabor Szots wrote: Sun Mar 14, 2021 4:01 pm
amanjpro wrote: Sun Mar 14, 2021 2:18 pm As for the problems, it is a bit surprising for me, because they don't happen with me (I have tested it under Linux and Mac), can you please tell me what OS do you run Zahak on?
This is 64-bit Windows 10 (home edition).
Huh! I might be not correctly handling new-line from Windows, will try to find a windows box and test it
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: Zahak, a GoLang based chess engine

Post by amanjpro »

So, I fixed the UCI issue on Windows, this hotfix version should have it working:
https://github.com/amanjpro/zahak/releases/tag/0.2.1

Thank you a lot for trying it out