GPU Search Methods

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

jhaglund
Posts: 173
Joined: Sun May 11, 2008 7:43 am

GPU Search Methods

Post by jhaglund »

Has anyone considered trying to convert chess positions/nodes to virtual pixels? A GPU graphical search...

Example:

Code: Select all

nps = ((resolution) / (pixels)) * frame_rate;
8x8 pixel array

screen resolution: HD 1920x1080, single video card, single gpu

Code: Select all

nps = ((1920x1080) / (8x8)) * frame_rate; // max_frames achieved

Code: Select all

   2,073,600 nps @   1 FPS
  62,208,000 nps @  30 FPS
 124,416,000 nps @  60 FPS
 207,360,000 nps @ 100 FPS
 414,720,000 nps @ 200 FPS 
QSXGA display

Code: Select all

nps = ((2560 x 2048) / (8x8)) * frame_rate;

Code: Select all

    5,242,880 nps @   1 FPS      
  157,286,400 nps @  30 FPS
  314,572,800 nps @  60 FPS
  524,288,000 nps @ 100 FPS
1,048,576,000 nps @ 200 FPS 
Actual drawing or a sort of logging/hashing should not be done with pixels, obviously, because of speed.

Given today's GPUs can process over 15 Giga Pixels/sec, the GPU should be utilized based on it's display power (FPS, pixel fillrate), not the threads/cores themselves... at the present moment.

Using QSXGA resolution:
320x256 = 81920 chessboards at once... a graphical search.

Picture it like having 81920 "Atomic size" Winboards on the screen ;)

Keep up the great work if you are currently in this area of work. Like I said before, there needs to be new search methods (hardware & software) explored for chess.
:D
Joshua D. Haglund
Edsel Apostol
Posts: 803
Joined: Mon Jul 17, 2006 5:53 am
Full name: Edsel Apostol

Re: GPU Search Methods

Post by Edsel Apostol »

Very interesting!

8x8 is too small to contain all chess info though.

maybe we could use something similar to bitboards, lets say:

-all pawns (8x8) pixels
-all knights (8x8) pixels
-all bishops (8x8) pixels
-all rooks (8x8) pixels
-all queens (8x8) pixels
-all kings (8x8) pixels
-all white (8x8) pixels
-all black (8x8) pixels
-castling rights (4 pixels)
-side to move (1 pixel)
-en passant square (7 pixels)
-fifty move (8 pixels)

532 pixels in total
jhaglund
Posts: 173
Joined: Sun May 11, 2008 7:43 am

Re: GPU Search Methods

Post by jhaglund »

Edsel Apostol wrote:Very interesting!

8x8 is too small to contain all chess info though.

maybe we could use something similar to bitboards, lets say:

-all pawns (8x8) pixels
-all knights (8x8) pixels
-all bishops (8x8) pixels
-all rooks (8x8) pixels
-all queens (8x8) pixels
-all kings (8x8) pixels
-all white (8x8) pixels
-all black (8x8) pixels
-castling rights (4 pixels)
-side to move (1 pixel)
-en passant square (7 pixels)
-fifty move (8 pixels)

532 pixels in total
8x8 would be enough because there is 32-bit colors to use for all the situations.

However you'd identify/understand your pc[sq] during "scanning" would determine performance. The fewer amount of pixels used or virtually displayed the better.

Other ideas include storing chess knowledge as pixels in your GPU memory.

Storing FENs and other formats could be done as well.
Each pixel would mean something whether it has a specific condition or just an empty square.

This would, with hope, put a stride toward making you & your engine understand the chess move it chooses better... not just crunch numbers.

Joshua D. Haglund