Hiarcs on Pocket PC with UCI support

Get your specific HIARCS/Junior support questions answered here as well as up-to-the-minute news!

Moderators: Watchman, Mark Uniacke, mrudolf

pgeorges
Member
Posts: 42
Joined: Tue Jul 31, 2007 2:55 pm
Location: France
Contact:

Hiarcs on Pocket PC with UCI support

Post by pgeorges »

Hi,

For the planned Hiarcs on Pocket PC, it would be nice if Hiarcs' engine could be used without its user interface, as an UCI engine, like on a PC.
There are no stdin / stdout on a Pocket PC but engine communication can use native message queues for UCI protocol, which are easy to use on a Pocket PC (I can provide all necessary code).

This would give a flexible solution, where engines tournament could be played on Pockets. On the other hand, Hiarcs user interface could allow other engines, ported to PPC to be used from it, in the same manner.

For example I ported Glaurung (yesterday!) and Toga to Pocket PC with Scid interface, and to run an Arena-like tournament on such devices is really enjoyable.

Pascal
User avatar
Harvey Williamson
Site Admin
Posts: 6079
Joined: Sun Jul 29, 2007 6:57 am
Location: Media City, UK
Contact:

Post by Harvey Williamson »

Hi Pascal,

A nice idea - thanks for posting it!

Best Wishes,

Harvey
Cubeman
Member
Posts: 460
Joined: Tue Jul 31, 2007 10:50 pm

Post by Cubeman »

I like the idea of having engine matches for the PPC.At the moment it takes alot of manual work to play a PPC engine against another.This way you could know for sure what is the best PPC engine since you would have alot of games to support your rating list.
pgeorges
Member
Posts: 42
Joined: Tue Jul 31, 2007 2:55 pm
Location: France
Contact:

Post by pgeorges »

Cubeman wrote:I like the idea of having engine matches for the PPC.At the moment it takes alot of manual work to play a PPC engine against another.This way you could know for sure what is the best PPC engine since you would have alot of games to support your rating list.
Right now, with Scid Pocket (http://prolinux.free.fr/scid/PPC.html) it is possible to make tournaments between Toga and Glaurung (the only engines ported so far).

Pascal
User avatar
Alain
Moderator
Posts: 580
Joined: Tue Jul 31, 2007 12:51 pm
Location: Bellevue, WA
Contact:

Re: Hiarcs on Pocket PC with UCI support

Post by Alain »

Hi Pascal,
pgeorges wrote:Hi,

For the planned Hiarcs on Pocket PC, it would be nice if Hiarcs' engine could be used without its user interface, as an UCI engine, like on a PC.
There are no stdin / stdout on a Pocket PC but engine communication can use native message queues for UCI protocol, which are easy to use on a Pocket PC (I can provide all necessary code).

This would give a flexible solution, where engines tournament could be played on Pockets. On the other hand, Hiarcs user interface could allow other engines, ported to PPC to be used from it, in the same manner.

For example I ported Glaurung (yesterday!) and Toga to Pocket PC with Scid interface, and to run an Arena-like tournament on such devices is really enjoyable.

Pascal
yes, engine tournaments is a real occupation for some users, but I am not sure that it must be the main goal of a PLAYING program such as Hiarcs.
As of today, you have seen by yourself the important performance difference between Toga running under CEBoard and running under Squid (CEBoard around 30% faster).

We still don't know if it is linked to your compiler or the usage of separate executable but if I were an engine developer, I would not trade 30% of performance just to allow other engines to be easily loaded in my own interface.

In addition, don't forget that a Pocket PC is not (yet) like a PC with a dual core : I think that the best way to compare performance of two engines would rather be to use two pocket pcs linked with some protocol than running the two engines on the same Pocket PC.

Of course this is more expensive ! Or you have to find a friend with a similar Pocket PC, but this would also allow the comparison between Pocket PC performance.
I haven't checked if Arena can be used as a match maker between two Auto232 devices but if it can, then such Pocket PC comparison is already possible with CEBoard :wink:

best regards,
Alain
pgeorges
Member
Posts: 42
Joined: Tue Jul 31, 2007 2:55 pm
Location: France
Contact:

Re: Hiarcs on Pocket PC with UCI support

Post by pgeorges »

yes, engine tournaments is a real occupation for some users, but I am not sure that it must be the main goal of a PLAYING program such as Hiarcs.
I never said that it is the main goal, but only that it is an enjoyable feature.
As of today, you have seen by yourself the important performance difference between Toga running under CEBoard and running under Squid (CEBoard around 30% faster).

We still don't know if it is linked to your compiler or the usage of separate executable but if I were an engine developer, I would not trade 30% of performance just to allow other engines to be easily loaded in my own interface.
The performance impact I get on Scid (not Squid) can only be observed with Toga, which when asked to display its N best lines, (MultiPV) will be less efficient. If I turn MultiPV off, I get the same number of nodes per second than CEBoard. With Glaurung for example, I don't encounter that kind of problem. What I encounter here is only a bug in Toga 1.2.1a and is not related to interprocess communication which is really efficient with Pocket PC native message queues.
In addition, don't forget that a Pocket PC is not (yet) like a PC with a dual core : I think that the best way to compare performance of two engines would rather be to use two pocket pcs linked with some protocol than running the two engines on the same Pocket PC.
It is possible to run a tournament between 2 engines with ponder off, so engines will only think when it is their turn to play. With such setup I don't see the interest in linking 2 pocket PC.

Pascal
MSK
Member
Posts: 11
Joined: Tue Aug 14, 2007 5:43 pm

Post by MSK »

BigThanks Pascal for SCIDPPC with two strongs engines, your work is the first Gui for PPC with engine tournaments feature !! 8) go up SCID...

Meskaoui
User avatar
Alain
Moderator
Posts: 580
Joined: Tue Jul 31, 2007 12:51 pm
Location: Bellevue, WA
Contact:

Re: Hiarcs on Pocket PC with UCI support

Post by Alain »

pgeorges wrote:The performance impact I get on Scid (not Squid) can only be observed with Toga, which when asked to display its N best lines, (MultiPV) will be less efficient. If I turn MultiPV off, I get the same number of nodes per second than CEBoard.
I am glad that you find the solution. As you did not update your CCC message, nobody could know it was linked to the multipv and not to the other possible reasons.
With such setup I don't see the interest in linking 2 pocket PC.
as I said, it can also be a way to compare the performance of two different pocket pc.
Of course, I understand that for people interested in engine vs engine match it is a lot better to have the engines running on a single pocket pc and many people spend their live running engine vs engine matches on PCs so why not on Pocket PCs.
I am not a specialist of this kind of match (in fact, I have never made one) so I don't know how (serious) engine ratings are elaborated but I don't think that competitions are run on single machines.

best regards,
Alain
pgeorges
Member
Posts: 42
Joined: Tue Jul 31, 2007 2:55 pm
Location: France
Contact:

Re: Hiarcs on Pocket PC with UCI support

Post by pgeorges »

Alain wrote:
pgeorges wrote:The performance impact I get on Scid (not Squid) can only be observed with Toga, which when asked to display its N best lines, (MultiPV) will be less efficient. If I turn MultiPV off, I get the same number of nodes per second than CEBoard.
I am glad that you find the solution. As you did not update your CCC message, nobody could know it was linked to the multipv and not to the other possible reasons.
Well, I have ported 2 other engines, just to see how things are going : Fruit 2.1 and GambitFruit 1.0Beta4bx. And I have some strange results : the number of nodes per second can go as high as 30-40 knps on complex positions (start position) and sometimes it does not really take off (18-20 knps). There are several factors : engine (of course), multiPV, and ... if the engine is in good mood.

I thought computing was deterministic :?

Pascal
User avatar
Alain
Moderator
Posts: 580
Joined: Tue Jul 31, 2007 12:51 pm
Location: Bellevue, WA
Contact:

Re: Hiarcs on Pocket PC with UCI support

Post by Alain »

Hi Pascal,
pgeorges wrote:And I have some strange results : the number of nodes per second can go as high as 30-40 knps on complex positions (start position) and sometimes it does not really take off (18-20 knps). There are several factors : engine (of course), multiPV, and ... if the engine is in good mood.
I am not sure to understand : do you have the variations from 18-20 to 30-40 on the SAME position ?
I guess "yes", because otherwise you would not say "strange"...
Well, in this case, I suggest you to :

1) in any case : turn off all communication features of the PPC : turn the wifi off and unplug the usb link from the PC

2) for some tests : do a soft reset before and then just launch scid and run the test => the results should be deterministic here.
If there aren't in this case, there must be something in the code itself such as polling mechanism which creates some race conditions. I admit that I now absolutely nothing about tcl/tk : could it have some garbage collector started not only when memory lacks (which should be deterministic) but also preventively when the user seems inactive ?

3) if it is deterministic after the soft reset, use the few tools which are available for pocket pc such as the remote process monitor to see which processes are running.
I could suggest that may be you have a "zombie" engine still running and grabbing the CPU but you will be angry again with such suggestion :wink:
I thought computing was deterministic :?
I guess it is... to some extent but we can be affected by the "butterfly effect". That's a part of the fun of programming, isn't it :)
pgeorges
Member
Posts: 42
Joined: Tue Jul 31, 2007 2:55 pm
Location: France
Contact:

Post by pgeorges »

Thank you Alain for your hints, but it seems I have two solutions :

1. Set the same priority for the engine and the user interface : the engine reaches high nps values, but the UI is unresponsive;
2. Set the engine priority below the UI, and the engine achieves sometimes no more than 19000 nps, but the user interface reacts as if there were no engine running : it is exactly as responsive with or without engines running.

Well, I think solution # 2 is better : I prefer to lose 5000 nps but not be annoyed by an unresponsive interface.

Still investigating.

Pascal
pgeorges
Member
Posts: 42
Joined: Tue Jul 31, 2007 2:55 pm
Location: France
Contact:

Post by pgeorges »

Hi,

I discovered the engine Viper 0.1 by Tord Romstad : http://www.superchessengine.com/glaurung.htm

It is a simple chess program (less than 5.000 lines of code, including comments and blank lines), it calculates more than 50.000 nps on my Pocket, and even if it is said to be simple, it manages sometimes to beat Fruit 2.1 on my Pocket.

Pascal
MSK
Member
Posts: 11
Joined: Tue Aug 14, 2007 5:43 pm

Post by MSK »

Thanks Pascal for all good news 8) .

Meskaoui
pgeorges
Member
Posts: 42
Joined: Tue Jul 31, 2007 2:55 pm
Location: France
Contact:

Post by pgeorges »

Well, I just released a new version of Scid for pocket with 6 engines : Viper, Glaurung and 4 from the Fruit's family.

Currently I am running a tournament between Fruit 2.1 and Viper 0.1.

Pascal
MSK
Member
Posts: 11
Joined: Tue Aug 14, 2007 5:43 pm

Post by MSK »

For me Glaurung is the stronger engine in this groupe :wink: , I like that we have other stronge engine like Hiarcs ,Naum or Ryka in this super GUI .

Meskaoui
Post Reply