Playstation 3/Cell and chess?

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

Moderator: Ras

mjlef
Posts: 1494
Joined: Thu Mar 30, 2006 2:08 pm

Playstation 3/Cell and chess?

Post by mjlef »

I see it looks pretty easy to put Linux on the Playstation 3:

http://www.popularmechanics.com/technol ... 63321.html

Has anyone done this and tried compiling a chess program (say Toga) for it? I was wondering how well the cell processors handled chess programs.

OK, to be honest, I am looking for an excuse to buy a cool game system, but if I can also program chess on it, why not!

Mark
User avatar
M ANSARI
Posts: 3734
Joined: Thu Mar 16, 2006 7:10 pm

Re: Playstation 3/Cell and chess?

Post by M ANSARI »

I bought one and am very happy with it. I mainly bought it because my Samsung Blu Ray player would not play many BD even with firmware updates. I must say I am really impressed by the quality of the PS3 as a Blu Ray player ... it much better than the standalone BD player from Samsung ... plus I can play games on it (although I can't figure out how to use the game pad). Now if it can also play Chess ... then all the better. For sure there is some tremendous processing power in there.
Guetti

Re: Playstation 3/Cell and chess?

Post by Guetti »

It probably isn't even worth the hassle to install Linux on the PS3.

The Cell processor consists of a Power Processing Element (PPE) and eight Synergistic Processing Elements (SPE). The SPEs consist of a vector processor with a private memory area (the size of this area on the PS3 is 256K), and thus is probably not usable for chess, even if the engine would be specifically written to use the SPEs.

Thus a chess engine can be run on the PPE in 64 bit (or 32 bit). The Integer performance of the PS3 PPE has ben benched with Linux and is slower than that of a dual 1.6 Ghz PowerPC G5 (see link below for benchmark). In other words the Cell processor performance of the PS3 is comparable to low-end PowerPC G5 performance (which in turn is comparable to high-end PowerPC G4 performance).

http://www.geekpatrol.ca/2006/11/playst ... rformance/

Since standard Toga is single threaded it would get around 200 - 300 kNPS on a PS3.
greenchile505

Re: Playstation 3/Cell and chess?

Post by greenchile505 »

Thank you for the information, Guetti, and the link.

For the record, although the PS3 is about as quick (or slow) as a G5 when running Linux, it is important to note that :

"Geekbench also isn’t able to exploit the eight vector processors on the Cell processor. Any program designed and optimized for the Cell processor should be a lot faster than one designed for a generic processor (like, say, Geekbench). So while the Geekbench results might seem disappointing, keep in mind that Geekbench can’t exercise the PlayStation 3 to its full potential."

Keeping with the original subject line of "Playstation 3/Cell and chess?", perhaps a developer will decide to take full advantage of the PS3 architecture and create a chess playing monster, using Sony's API, rather than "tweaking" a UCI engine running on a Linux distro, running on PS3.

Cheers.
chrisw

Re: Playstation 3/Cell and chess?

Post by chrisw »

mjlef wrote:I see it looks pretty easy to put Linux on the Playstation 3:

http://www.popularmechanics.com/technol ... 63321.html

Has anyone done this and tried compiling a chess program (say Toga) for it? I was wondering how well the cell processors handled chess programs.

OK, to be honest, I am looking for an excuse to buy a cool game system, but if I can also program chess on it, why not!

Mark
I don't know about the PlayStation3 but when I was still in the commercial computer chess development world we worked on both PS1 and PS2 (I'm pretty sure the PS2 as well, but I didn't do the work, but it might have just been the PS1, can't remember - pretty sure it was PS2 as well). Two programs were ported onto those, Michael Rice's Go program and Jeff Rollason's Shogi for release in Japan. If I remember correct Sony provided a complete development environment so all work could be done in C using an emulator. On the PlayStations themselves, I forget exactly, but I think speed was not far off that of a PC of the time. Much of the Sony hardware was (and presumably still is) about whizzing graphics around at very high speeds - not necessarily what you want for an AI engine.

Did Sony eventually provide a programming environment for endusers? I guess that would have been a logical step.
Guetti

Re: Playstation 3/Cell and chess?

Post by Guetti »

greenchile505 wrote:Thank you for the information, Guetti, and the link.

For the record, although the PS3 is about as quick (or slow) as a G5 when running Linux, it is important to note that :

"Geekbench also isn’t able to exploit the eight vector processors on the Cell processor. Any program designed and optimized for the Cell processor should be a lot faster than one designed for a generic processor (like, say, Geekbench). So while the Geekbench results might seem disappointing, keep in mind that Geekbench can’t exercise the PlayStation 3 to its full potential."

Keeping with the original subject line of "Playstation 3/Cell and chess?", perhaps a developer will decide to take full advantage of the PS3 architecture and create a chess playing monster, using Sony's API, rather than "tweaking" a UCI engine running on a Linux distro, running on PS3.

Cheers.
Well, the problem as far as I understood it is the distribution of the work to the vector processing units. Classical methods that currently have been developed for multi-threaded engines like DTS will probably not work, since the units don't have direct access to the main memory which would hold the transposition table.
I assume you would have to split the search tree in another manner than it is currently done, and this is probably not so easy.
Guetti

Re: Playstation 3/Cell and chess?

Post by Guetti »

By the way, here is a really nice resource on how to install Linux and use gcc to access the PPE and the SPE wit gcc and spu-gcc:

http://www-128.ibm.com/developerworks/l ... ml?ca=drs-
mjlef
Posts: 1494
Joined: Thu Mar 30, 2006 2:08 pm

Re: Playstation 3/Cell and chess?

Post by mjlef »

My hope was the evaluation could be done in parallel across all those processors. A board description in shred memeory could be attaked all at once, for example with mobility of mutliple pieces computed simultaneously. Move generation could also be done simultaneosly, with each processor handling a different piece, giving some sizable speedup.

256k is more than enough for a chess program, although you need more for useful hash tables.

Mark