Raspberry Pi / Stockfish dedicated chess computer/board

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

Moderators: hgm, Rebel, chrisw

j_romang
Posts: 79
Joined: Mon May 16, 2011 2:52 am

Raspberry Pi / Stockfish dedicated chess computer/board

Post by j_romang »

I would like introduce the 'PiChess' (http://www.pichess.org) project. The goal the this project is to create a dedicated chess computer based on the Raspberry Pi (http://www.raspberrypi.org/), the Stockfish chess engine, the DGT eboard en DGT XL Clock (http://www.dgtprojects.com/), and the dgtnix driver (http://dgtnix.sourceforge.net/).

Image

Status

You can see a video here : http://www.dailymotion.com/video/xt2eul_pichess_tech

The inital proof of concept is working on a standard Linux PC, but there is a nasty bug in the Raspberry Pi USB firmware causing the device to hang (http://www.raspberrypi.org/phpBB3/viewt ... 0&p=158380). I hope this will be solved in few weeks :-)

Done so far :

-Added DGT XL clock message display to dgtnix driver
-Added DGT board/clock support to Stockfish

Playing strength

This will be one of the strongest dedicated chess computer on the world :-) My initial testing on Rasperry Pi hardware versus a 4 core Intel i7 shows we have grandmaster strength :) (http://lefounumerique.xooit.com/t1202-S ... rry-Pi.htm)

Engine Score St
1: Stockfish on Pi 40,0/100 ····················
2: Komodo3-64-sse 20,0/20 11111111111111111111
3: Pharaon 14,0/20 =1=1=101=110==110111
4: AnMon 5.75 11,0/20 ==1=1110=010==011001
5: SOS 5.1 for Arena 10,5/20 10001=10100111=001=1
6: Gaia64 4,5/20 00100100010=00000100

100 games played / Tournament is finished - Level: Blitz 2/1 - Hardware: Intel(R) Core(TM) i5-2405S CPU @ 2.50GHz with 8,0 GB Memory

TODO

Add opening books, and allow opening book selection
Save games to PGN on the SD Card
Add more time controls, and display remaining time on the clock
Allow to takeback moves
Analysis mode

Help needed : SD card packaging

I would like to provide a Raspbian based sd card image that loads stockfish at boot time.

Help needed : logo / documentation

If you have some graphic/english skills, I would like to provide a simple PDF sheet that explains how to use the board and the config modes.
ZirconiumX
Posts: 1334
Joined: Sun Jul 17, 2011 11:14 am

Re: Raspberry Pi / Stockfish dedicated chess computer/board

Post by ZirconiumX »

I'd like to help.

I have a RPi and will be getting another one soon.

Perhaps I could document how to get SF running on two Pi's?

Matthew:out
Some believe in the almighty dollar.

I believe in the almighty printf statement.
j_romang
Posts: 79
Joined: Mon May 16, 2011 2:52 am

Re: Raspberry Pi / Stockfish dedicated chess computer/board

Post by j_romang »

Hello Matthew,
I did my PC vs Raspberry Pi tournament with Arena, using this method : http://www.playwitharena.com/?Tips_%2B_ ... and_Arena.
You should be able to setup Pi vs Pi matches like this using the Arena GUI. :roll:

But I can't see how you would like to use two Raspberry Pi with just one DGT board ?
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Raspberry Pi / Stockfish dedicated chess computer/board

Post by mcostalba »

I have seen you have recently forked SF:

https://github.com/jromang/Stockfish/tree/dgt

This is one of the reasons I uploaded dev branch on github: I really like and support this (new) way of developing.

Have fun and good luck with your amazing project :-)
j_romang
Posts: 79
Joined: Mon May 16, 2011 2:52 am

Re: Raspberry Pi / Stockfish dedicated chess computer/board

Post by j_romang »

Thank you :) I'm really impressed by Stockfish's strength on this little piece of hardware !
I also discovered GIT two weeks ago thanks to tour repository :) I really like the way forked projects can be easily updated to follow the upstream project latest version.
Werewolf
Posts: 1795
Joined: Thu Sep 18, 2008 10:24 pm

Re: Raspberry Pi / Stockfish dedicated chess computer/board

Post by Werewolf »

This looks really great.

What would be fantastic is if someone developed something like a Chess Machine Card which could slot into a PCI port and be run as a USB engine alngside other programs.

It would be like upgrading your P.C!
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Raspberry Pi / Stockfish dedicated chess computer/board

Post by mcostalba »

j_romang wrote:Thank you :) I'm really impressed by Stockfish's strength on this little piece of hardware !
I also discovered GIT two weeks ago thanks to tour repository :) I really like the way forked projects can be easily updated to follow the upstream project latest version.
My 2 cents here :-)

Code: Select all


Instead of:

    string positionFEN = pos.to_fen();
    positionFEN = positionFEN.substr(0, positionFEN.find(' '));
    //cout << "Compare " << positionFEN << " with "<<fen << endl;
    if&#40;!positionFEN.compare&#40;fen&#41;) return ml.move&#40;);


perhaps you can write


    if &#40;pos.to_fen&#40;).find&#40;fen&#41; != string&#58;&#58;npos&#41;
        return ml.move&#40;);
j_romang
Posts: 79
Joined: Mon May 16, 2011 2:52 am

Re: Raspberry Pi / Stockfish dedicated chess computer/board

Post by j_romang »

Yes, that's much better than my code :D
Thanks for the tip !
https://github.com/jromang/Stockfish/co ... 4a1c8a1ba0
IanO
Posts: 496
Joined: Wed Mar 08, 2006 9:45 pm
Location: Portland, OR

Re: Raspberry Pi / Stockfish dedicated chess computer/board

Post by IanO »

j_romang wrote:...but there is a nasty bug in the Raspberry Pi USB firmware causing the device to hang (http://www.raspberrypi.org/phpBB3/viewt ... 0&p=158380). I hope this will be solved in few weeks :-)
You could also consider using a different USB-serial converter. FTDI is primarily a Windows company and their Linux/Mac drivers and support are horrible.
j_romang
Posts: 79
Joined: Mon May 16, 2011 2:52 am

Re: Raspberry Pi / Stockfish dedicated chess computer/board

Post by j_romang »

Unfortunately, I can't change the FTDI controller in the DGT board with my soldering skills :) And this controller works well with an x86 PC and Linux...so the problem really comes from the Raspberry Pi.
If the firmware/hardware issue isn't solved, I will port this project to a 802MK II USB microPC (http://laptoptabletpc.co.uk/rikomagic-8 ... b-micropc/).