"It just isn't conceivable that you can design a program strong enough to beat players like me."

May 3, 2015

Stockfish Android under Windows!

Last time i'd attempted to emulate Android in Windows, it was almost one year ago. I'd thought it could be an alternative way to increase the number of devices in Rapidroid experiment, therefore to increase the games played per hour.

Another fantasy was to repeat what comes true with C64 emulation on a PC. If it could run ten times faster than the original, it could open door to simultaneous tourneys, many divisions playing at the same time.

Though it wasn't a stupid idea, it had totally failed with that old version of Bluestacks emulator, mainly due to:
* No multi core cpu emulation
* Very low nodes per second
* Low RAM forcing lower hash

Yesterday i've made another test with a "MODDED" new version of Bluestacks running a rooted Kitkat 4.4 with possibility to set RAM size. It looked yummy at first, as always.
After downloading a 260MB msi file from this page, the installation took around 10 minutes. Thanks to a bundled utility it was a piece of cake to transfer some apk's and chess engine binaries into that Windowroid.
The desktop with CfA and Droidfish both ready to go

But, i quickly bumped to "engine exits" error under CfA using the official Stockfish binary. I've soon realized the whole thing is emulating an Android x86 device only and it's impossible to run an Arm app, none of the arm5 or 7 chess engine binaries either!

When i've installed Droidfish and verified that it runs well with its own Stockfish engine, i've checked the engine file and discovered it was the x86_nopie version. Theory confirmed...

I've gone back to CfA and installed the x86_nopie version of Stockfish. As expected, it worked without problem the same way it works on an x86 tablet with an Intel cpu. What shocked me most was 677 kNps performance, not slow at all, given that my three quad core devices CodeGen RK3188, Asus Z3745 and Galaxy Note II run consecutively at 645, 750 and 810 kNps.
Stockfish 6 x86 nopie running on Bluestacks

Shortly said, there is no cpu instruction translation anymore in Bluestack. The developers (or modders?) must have prefered performance over compatibility. Indeed, it's a perfectly emulated x86 tablet on PC but we must forget everything specifically written for ARM.

My opinion is that somebody is slowly taking away Android from ARM domination.

Regarding 3D games on Bluestacks, i know nothing and i can't say anything. All i know is chess.


Jim Ablett said...

Hi Gurcan.

I don't get it. I have Bluestacks installed on my Win Xp 32 bit machine and I can't run all my arm 5 compiles and arm 7 ones as well with CFA & Droidfish.

Jim Ablett said...

Sorry replace 'can't' with 'CAN' :-)

Gurcan Uckardes said...

Well. There may be something related to the kernel to which the Bluestacks version is based. Mine shows clearly an x86 kernel.
I'm sure that in case of an Arm kernel, it would be unavoidable to waste performance for translations.
Now, I need to know more about your case:
* What kernel do you see via Settings/About in Bluestacks?
* What knps do you see with Stockfish arm7 original?
One year ago, i used to see 80k with Stockfish arm. Because of transations...

Jim Ablett said...

1. Have no Settings/About in my Bluestacks.

2. I was wrong about running Arm 7.
I can only run Arm 5 builds.

Here is the Bluestacks program I have installed for download > http://tinyurl.com/kcmn85k