Page 1 of 2

Zeta plays chess on a gpu

Posted: Thu Jun 23, 2011 1:22 pm
by smatovic
Juhu,

finally i got the negamax scores runnning and now my little engine plays chess on a gpu :)

http://zeta-chess.blogspot.com/

Still a lot of work to do...therefore i am looking for sponsors, hardware, money, what ever.

--
Srdja

Re: Zeta plays chess on a gpu

Posted: Thu Jun 23, 2011 1:28 pm
by rbarreira
Nice! Two questions:

How many nodes per second do you get with 128 threads?

Did you calculate the speedup between 1 and 128 threads?

Re: Zeta plays chess on a gpu

Posted: Thu Jun 23, 2011 1:43 pm
by smatovic
How many nodes per second do you get with 128 threads?
With its current "SPPS" search, which is comparable to a Negamax wo AlphaBeta pruning Zeta achieves with 128 Threads ~ 500.000 nodes per second.

No Quiscence Search, no Castling/En Passant moves. Very simple Eval.
Did you calculate the speedup between 1 and 128 threads?
Thats not possible in that way, because the spps-search assumes a min amount of 128 threads.

--
Srdja

Re: Zeta plays chess on a gpu

Posted: Thu Jun 23, 2011 6:06 pm
by muxecoid
Did you submit your engine to AMD OpenCL coding competition innovation challenge: http://community.topcoder.com/amdapp/am ... etition-2/ ?

Re: Zeta plays chess on a gpu

Posted: Thu Jun 23, 2011 6:43 pm
by smatovic
Did you submit your engine to AMD OpenCL coding competition innovation challenge: http://community.topcoder.com/amdapp/am ... etition-2/ ?
Not yet.
Thank you for the hint :-)

--
Srdja

Re: Zeta plays chess on a gpu

Posted: Fri Jun 24, 2011 9:05 am
by vb4
Hi Srdja,

I would like to know a little more about your engine. Some time ago I corresonded to a company who was very interested in gpu's and chess and at that time was willing to allow the use of some high end equipment all using gpus. Back then their interest was to generate 7 piece egtb's. If I understand more of what you are doing I can always touch base with them and see if their position is still available.

BTW do you or are you interested in coding for an egtb generator? Just curious.

Les

Re: Zeta plays chess on a gpu

Posted: Fri Jun 24, 2011 10:14 am
by Sven
Hi Srdja,

very nice to read that you have managed to create a chess playing engine on a GPU! :-)
smatovic wrote:With its current "SPPS" search, which is comparable to a Negamax wo AlphaBeta pruning Zeta achieves with 128 Threads ~ 500.000 nodes per second.

No Quiscence Search, no Castling/En Passant moves. Very simple Eval.
In your blog you wrote:
As i thought the SPPS-Search with 128 parallel Threads has problems when the engine enters the Q-Search. In Q-Search are only Capture-Moves considered and as fewer the moves size is the more power i am loosing with spps :(
What is the reason for this? Could you explain how your "SPPS" scheme is related to Q-Search? Since you do not want to split a QS node over different threads there must be some other reason which I do not understand yet.

Sven

Re: Zeta plays chess on a gpu

Posted: Fri Jun 24, 2011 12:12 pm
by georgerifkin
Does it work with any video card? Or just with nVidias? (perhaps you use CUDA?)

Re: Zeta plays chess on a gpu

Posted: Fri Jun 24, 2011 12:23 pm
by smatovic
very nice to read that you have managed to create a chess playing engine on a GPU!
:-)
What is the reason for this? Could you explain how your "SPPS" scheme is related to Q-Search? Since you do not want to split a QS node over different threads there must be some other reason which I do not understand yet.
With spps- a simple parallel processing scheme - i use 128 Threads in parallel to process one board position with an max amount of 128 childs (my personal assumption). So the next iteration has 128*128 childs. Because every of this 128 threads generates max 128 childs. This means my average occupancy of the 128 threads depends on the max amount of childs from one position....i.e. if we got an average of 32 childs per node during a chess game then i will "loose" with spps 128-32=96 idle Threads, but i win a SIMD friendly process with no communication overhead.

Naturaly Q-Search has fewer moves (childs) so i got more idle nodes...

...i am going to implement AlphaBeta Pruning with move ordering next, maybe this will boost enough to handle Q-Search.

--
Srdja

Re: Zeta plays chess on a gpu

Posted: Fri Jun 24, 2011 12:30 pm
by smatovic
Does it work with any video card? Or just with nVidias? (perhaps you use CUDA?)
I use OpenCL, so It works on GPUs. CPUs, APUs... :-) every Device with an "OpenCL" Implementation, sufficient RAM and able to process min 128 threads.

AMD for example has excellent OpenCL Implementation for CPUs.

--
Srdja