Stockfish on github

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

UncombedCoconut
Posts: 319
Joined: Fri Dec 18, 2009 11:40 am
Location: Naperville, IL

Re: Stockfish on github

Post by UncombedCoconut »

Yes, I need to either remove -static or install the static versions of those libraries. (I removed -static. I didn't see the bug reported by the patch author; -flto without -static worked perfectly.)
I'm using Fedora 15 now; it doesn't install the static libs by default but offers a package for them. But as you can see the compiler/linker diagnostics don't make it very clear what the problem is. I guess that itself is a bug. :)
It sounds like there's no perfect solution to this problem. Probably the most future-proof solution is to remove -static, but I don't care that much.
tomtor

lto -static flag

Post by tomtor »

Removing the -static flag is probably better because it is just a workaround
for an issue which does not occur in most environments.
bturner

Re: Stockfish on github

Post by bturner »

Hi.

We're trying to get stockfish to work for an ARM chip for a dedicated chess computer. It looks like the code needs to be tweaked down a little for a non PC level chip.

1. Anyone know how feasible this is?
2. Anyone know if the opening book is needed separately?
3. Anyone know anyone who would be happy to tweak down the code for this smaller chip for some $$?

Regards
Baron: mail (at) chessbaron (dot) co (dot) uk
User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: Stockfish on github

Post by JuLieN »

bturner wrote:Hi.

We're trying to get stockfish to work for an ARM chip for a dedicated chess computer. It looks like the code needs to be tweaked down a little for a non PC level chip.

1. Anyone know how feasible this is?
2. Anyone know if the opening book is needed separately?
3. Anyone know anyone who would be happy to tweak down the code for this smaller chip for some $$?

Regards
Baron: mail (at) chessbaron (dot) co (dot) uk
The source code of Stockfish for iPhone and iPad (ARM-based devices) is downloadable on SF's website. And I don't think they needed to tweak down anything. :)

I'll send you my PayPal account for this tip ;)
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
bturner

Re: Stockfish on github

Post by bturner »

Thanks for your comments. Yes - I've looked at the code a few days ago.

I had this from a software guy who looked at the code:

"There may be an issue in that the program is written with PC resources in mind. It needs a lot of RAM and significant ROM - both these requirements are considerably outside that available from a very low cost ARM chip - i.e. a single chip microcontroller."

And also:

"Stockfish appears to need an opening book and it is a file of
16MB".

I think the comment about the opening book is incorrect - obviously it would have been included in the code. That's not a part of the interface is it? Maybe just hasn't seen the file.

Regards
Baron
User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: Stockfish on github

Post by JuLieN »

No, SF in itself can run on very modest hardware (at least for the CPU). I guess you problems are more:

- How much RAM would SF need for a decent use, with acceptable hash tables?
- How much flash storage would you need to store SF, its book, and a minimal Os to run it (I guess you'll be using a minimal stripped-down Linux?)

What hardware specs do you intend to have for your device, if that's not secret? Maybe it's still under discussion?

EDIT: btw, the Raspberry Pi has 128 MB of RAM, an ARM CPU with a powerful graphics, handle networks and many other thing, and is sold for $25...
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
bturner

Re: Stockfish on github

Post by bturner »

Well, the issue we're grappling with is what firmware/hardware we need. We're looking at a Novag Citrine type machine.

My understanding may be incomplete. It is:

SF is a chess engine that can be used with a UCI and GUI (xboard, winboard) to show to a computer screen, OR just compiled to a high-enough-level chip and electronics built for it to work on a dedicated chess computer.

Is my understanding way out?
User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: Stockfish on github

Post by JuLieN »

No, you understood well. If you run SF on a minimal Linux you would just need to write a proxy adapter for communications between the hardware and SF : this adapter would get the input from the board, translate this to uci instruction, feed them to SF and get back SF's output to whatever your hardware display.

But you probably know all this very well yet.
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
kinderchocolate
Posts: 454
Joined: Mon Nov 01, 2010 6:55 am
Full name: Ted Wong

Re: Stockfish on github

Post by kinderchocolate »

It depends on the hardware requirements for your system. Stockfish requires about 30MB RAM to run on iPhone. If you can afford 30MB or more, there should't be any issue.

Furthermore, you can reduce the RAM by reducing the default hash size. You can reduce it to around 10MB easily.

I think you just need to process piping the stockfish inputs and outputs, and you will be fine.

If you can't even give the chip even 10MB, consider MicroMax, shouldn't take more than a MB.
bturner

Re: Stockfish on github

Post by bturner »

Thanks enormously Julien and Tim for your comments - I really appreciate your help