Zeta v099a, gpu chess update

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

Moderators: hgm, Rebel, chrisw

smatovic
Posts: 2657
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Zeta v099a, gpu chess update

Post by smatovic »

i finished my current run on Zeta, my experimental gpu chess engine.

https://github.com/smatovic/Zeta

Zeta v099a is a port of Zeta Dva v0305 (est. 2000 Elo on CCRL) to OpenCL,
the engine uses 64 threads per worker for move gen, move pick an eval on the
same node, so it is able to utilize a gpu with hundreds of workers via an
parallel alphabeta search (lazy smp derivat).

The actual conclusion of the current iteration is, that an simple engine, with
standard chess programming techniques, can be ported to OpenCL to run on a gpu,
but it would take more effort to make the engine competitive in terms of nps,
heuristics, and parallel scaling.

--
Srdja
Werewolf
Posts: 1796
Joined: Thu Sep 18, 2008 10:24 pm

Re: Zeta v099a, gpu chess update

Post by Werewolf »

Very exciting.

Is it a UCI engine and if not do you have plans to make it UCI?
smatovic
Posts: 2657
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Zeta v099a, gpu chess update

Post by smatovic »

No, not UCI, but xboard/winboard CECPv2,

if the enigne reaches ever 3000+ Elo i will consider a UCI version ;-)

Code: Select all

Not supported Xboard commands:
analyze        // enter analyze mode
?              // move now
draw           // handle draw offers
hard/easy      // turn on/off pondering
hint           // give user a hint move
bk // book lines
--
Srdja
smatovic
Posts: 2657
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Zeta v099a, gpu chess update...scaling with 1024 workers

Post by smatovic »

maybe of interest....

scaling on starting position, depth 12, on Nv Titan X...

http://talkchess.com/forum/viewtopic.ph ... 59&t=63517

--
Srdja
tttony
Posts: 268
Joined: Sun Apr 24, 2011 12:33 am

Re: Zeta v099a, gpu chess update

Post by tttony »

Excelent!

I have an AMD 6950 (800,1250) the nps is around ~300k

Tested vs Skiull (CCRL 1500)
[pgn]
[Event "Computer chess game"]
[Site "HIGH-PC"]
[Date "2017.04.11"]
[Round "?"]
[White "Zeta 099a"]
[Black "Skiull 0.1 x64 popcnt"]
[Result "1/2-1/2"]
[BlackElo "1500"]
[ECO "A00"]
[Opening "Creepy Crawly (Basman) Opening"]
[Time "11:07:27"]
[Variation "Sicilian Variation, 2.Nf3 Nc6"]
[WhiteElo "2000"]
[TimeControl "60+1"]
[Termination "normal"]
[PlyCount "85"]
[WhiteType "program"]
[BlackType "program"]

1. Nc3 {(b1c3) +0.59/1 3} d5 {(d7-d5) 0.00/7 2} 2. Nf3 {(g1f3 b8c6 d2d3
g8f6 g2g3) +0.30/5 1} d4 {(d5-d4) 0.00/7 2} 3. Nb5 {(c3b5 b8c6 e2e3 e7e5
f1d3) +0.63/5 2} Nc6 {(Nb8-c6) +0.25/7 2} 4. e3 {(e2e3 d4e3 d2e3 g8f6)
+0.08/4 2} e5 {(e7-e5) +0.20/7 2} 5. exd4 {(e3d4 e5d4 f1d3) +0.64/3 1} exd4
{(e5xd4) +0.20/7 2} 6. c3 {(c2c3 d4d3 g2g3) +0.63/3 0} dxc3 {(d4xc3)
+0.15/7 2} 7. dxc3 {(d2c3 g8f6 c1e3 g7g6) +0.21/5 1} Nf6 {(Ng8-f6) -0.10/6
2} 8. Bd3 {(f1d3 d8e7 c1e3 f6d5) +0.28/4 2} Bg4 {(Bc8-g4) +0.15/6 2} 9. h3
{(h2h3 c6e5 b5c7 d8c7) +0.35/4 1} Bxf3 {(Bg4xf3) +0.30/7 2} 10. Qxf3 {(d1f3
c6e5 f3e3 d8e7 d3f5) +0.28/5 1} a6 {(a7-a6) +0.20/6 2} 11. Qe3+ {(f3e3 f8e7
b5d4 c6d4 e3d4) +0.21/5 1} Be7 {(Bf8-e7) +0.35/7 2} 12. Nd4 {(b5d4 c6d4
e3d4 d8d4 c3d4 f6d5) -0.01/6 1} Nxd4 {(Nc6xd4) +0.20/7 2} 13. Qxd4 {(e3d4
d8d4 c3d4 h7h6 c1f4 f6d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ke7 {(Ke6-e7)
+1.25/9 1} 41. Bd3 {(c4d3 e7f8 d3c4 f7f6 c6d5 a7b6 d5c6 b6d8 c4d3) -0.90/9
1} Ke6 {(Ke7-e6) +1.25/9 1} 42. Bc4+ {(d3c4 e6f6 c6d6 a7b6 d6d5 f6g6 c4d3
g6f6) -0.87/8 2} Ke7 {(Ke6-e7) +1.25/9 1} 43. Bd3 {(c4d3 f7f6 c6d5 a7b6
d3e4 e7d7 e4d3 d7c8 d5e4) -1.05/9 1 3-fold repetition} 1/2-1/2
[/pgn]
smatovic
Posts: 2657
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Zeta v099a, gpu chess update

Post by smatovic »

Excelent!
Thanks, still a lot of work to be done...
I have an AMD 6950 (800,1250) the nps is around ~300k
Tested vs Skiull (CCRL 1500)
Cool, nice to see it running,
i chose portability over speed,
so it should be able to run on the very first gpus
with OpenCL 1.x support (>=2008).

If you are interested, you can run an smp benchmark for your device,
start the engine in command line and enter following sequence

new
sd 12
st 2000
benchsmp

but it will take some minutes to finish,
and some gpu timeout may occure during run.

--
Srdja
jpqy
Posts: 550
Joined: Thu Apr 24, 2008 9:31 am
Location: Belgium

Re: Zeta v099a, gpu chess update

Post by jpqy »

When i dubble click zeta099aw64.exe

I get this:
[2017-04-13 14:48:46] Error: In clReleaseMemObject (GLOBAL_BOARD_Buffer)
[2017-04-13 14:48:46] status:-38

JP.
smatovic
Posts: 2657
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Zeta v099a, gpu chess update

Post by smatovic »

When i dubble click zeta099aw64.exe

I get this:
[2017-04-13 14:48:46] Error: In clReleaseMemObject (GLOBAL_BOARD_Buffer)
[2017-04-13 14:48:46] status:-38
it is still an alpha version, so it is not user friendly to get it to run,
did the guessconfig command process?
Usage:
First make sure you have an working OpenCL Runtime Environment,
start the zeta executable in command line with -dl option to list
all available OpenCL devices on host

Second check the OpenCL device and create a config.ini file for the engine,
zeta -p 0 -d 0 --guessconfigx
Where p is the selected platform id and d is the selected device id.

Third rename the created config file to config.ini and start the engine.

WARNING:
It is recommended to run the engine on an discrete GPU,
without display connected,
otherwise system and display can freeze or crash during computation.

Some GPU drivers have an timeout of 5 seconds if GPU is connected to display.
So make sure to use an discrete GPU or set proper time controls.

Windows OS have an internal gpu timeout, double click the .reg file
"SetWindowsGPUTimeoutTo20s.reg"
and reboot the OS to set the timeout to 20 seconds.
--
Srdja
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Zeta v099a, gpu chess update

Post by MikeB »

cool - keep it up... 8-)