Daily iPhone chess programs releases

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

Moderators: hgm, Rebel, chrisw

User avatar
tiger
Posts: 819
Joined: Sat Mar 11, 2006 3:15 am
Location: Guadeloupe (french caribbean island)

Re: Daily iPhone chess programs releases

Post by tiger »

JuLieN wrote:
tiger wrote:Are you half-joking by saying 10 minutes or is there really a compilation option I missed that would allow to display the hish-resolution graphics on the iPad?
Yes, I was half joking, because it doesn't take 10mn, it takes one second. :) So, YES, you missed an option.
Configuring Your Xcode Project

The first step to creating a universal application is to configure your Xcode project. If you are creating a new project, you can create a universal application using the Window-based application template. If you are updating an existing project, you can use Xcode’s Upgrade Current Target for iPad command to update your project:

Open your Xcode project.
In the Targets section, select the target you want to update to a universal application.
Select Project > Upgrade Current Target for iPad and follow the prompts to create one universal application.
Xcode updates your project by modifying several build settings to support both iPhone and iPad.

Important: You should always use the Upgrade Current Target for iPad command to migrate existing projects. Do not try to migrate files manually.
(This is right from Apple's "About iOS Application Design" PDF, and I tested it, it works like a charm.).

This will create a new xib and plist for the iPAd in your project and from that your App will automatically use either iPhone's ones or the iPad's ones according to which device it detects it's running on. But you'll want to edit the iPad's xib file to make it look a bit more like a real iPad application of course (and make sure you use the good set of graphics, for instance) : that's where the 10mn will get handy. ;)

I must definitely have a look at this.

Thank you Julien.


tiger wrote: Brothers and sisters, listen to me: Objective-C on iOS is a bitch, and you'd better stay away from it. At least until it gets decent garbage collection.
Christophe, I can't let you give such a tip to beginners: YES, Objective C is a bitch (in the beginning) on iOS, because of the manual memory management, but I did the same error than you did in the beginning: I tried to stick to my usual language (free pascal) as it had an iOS declination, but I ran in a lots of trouble with it: it's never up to date to the latest iOS version, it's a nightmare to get it signed by the keychain and so on. Objective C is hard to learn but it's Apple's natural language, and it pays off in the long run to learn it. Besides, after a while, you come to like Objective C. But I'm sure your sentence was meant like a big cry from the heart for the painful hours of learning, right? ;)

It's not that hard to learn actually.

It's that just when you think you master it just enough to build a decent application, it bites you with a memory management nightmare.

I appreciate that the language has evolved and that it has very solid foundations. It has definitely avoided obsolescence status thanks to several additions

It's acceptable with GC. I could even consider settling for it for other developments if only it was correctly supported under Linux and Windows. Which it is NOT and I have tried: there is no living Objective-C ecosystem outside of Apple.

But there is no way I would prefer it over C# with a grain of C.

Objective-C without GC is not doing Apple any favor. They must have good reasons for this and I'm pretty sure they will add GC in iOS in the (hopefully near) future.

And it will be good.


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

Re: Daily iPhone chess programs releases

Post by JuLieN »

There it is, I finally managed to put my lazy fingers at work and create a blog about chess programs for our iOS devices, as I yet suggested that should be done on several occasions. :)

Here is the baby:
http://chessforios.blogspot.com/

It is really a new born, still to be polished, so please tell me what you think.

For a starter, I just copied/pasted the review I made yesterday of Chess Tiger for iPhone. ;)
"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 ]
User avatar
tiger
Posts: 819
Joined: Sat Mar 11, 2006 3:15 am
Location: Guadeloupe (french caribbean island)

Re: Daily iPhone chess programs releases

Post by tiger »

JuLieN wrote:There it is, I finally managed to put my lazy fingers at work and create a blog about chess programs for our iOS devices, as I yet suggested that should be done on several occasions. :)

Here is the baby:
http://chessforios.blogspot.com/

It is really a new born, still to be polished, so please tell me what you think.

For a starter, I just copied/pasted the review I made yesterday of Chess Tiger for iPhone. ;)

There is a small typo: search for "USCF or Elo". It should be "USCF or FIDE".



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

Re: Daily iPhone chess programs releases

Post by JuLieN »

thx :) updated.
"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 ]
Albert Silver
Posts: 3019
Joined: Wed Mar 08, 2006 9:57 pm
Location: Rio de Janeiro, Brazil

Re: Daily iPhone chess programs releases

Post by Albert Silver »

JuLieN wrote:There it is, I finally managed to put my lazy fingers at work and create a blog about chess programs for our iOS devices, as I yet suggested that should be done on several occasions. :)

Here is the baby:
http://chessforios.blogspot.com/

It is really a new born, still to be polished, so please tell me what you think.

For a starter, I just copied/pasted the review I made yesterday of Chess Tiger for iPhone. ;)
Looks great though one issue: I wanted to share/recommend the link via Facebook, but the icon at the bottom of the article shows the shared link as (no title) etc. Can this be rectified?
"Tactics are the bricks and sticks that make up a game, but positional play is the architectural blueprint."
Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 9:19 pm
Location: Oslo, Norway

Re: Daily iPhone chess programs releases

Post by Tord Romstad »

JuLieN wrote:
Tord Romstad wrote:Despite having used OS X as my development platform of choice since OS X 10.1, I still hate Xcode. But then I dislike IDEs in general, except for highly dynamic languages like Lisp, Smalltalk or Factor. There is something about the workflow in C/C++ IDEs which is fundamentally incompatible with how my brain works, and working with them makes me feel miserable.

I almost never use Xcode, except in the very few cases when there is no other option. The rest of the time, pencil, paper, Emacs and a few terminal windows are my tools of choice when writing C, C++ or Objective-C code.
Probably because you still code in C++, Tord? :)
No, whether I program in C, C++ or Objective-C makes no difference from this perspective. I hate using Xcode equally much with all of them. Fortunately, it is hardly ever necessary.
Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 9:19 pm
Location: Oslo, Norway

Re: Daily iPhone chess programs releases

Post by Tord Romstad »

tiger wrote:
Tord Romstad wrote:Wow.

This is the best computer chess news I have seen since -- I'm not sure, but it must be several years. Thanks a lot for Chess Tiger for iPhone, Christophe!
tiger wrote:Wow Julien you are damn fast!

The application has appeared on the App Store less than 12 hours ago and is still on the fourth or fifth page (yes the last page) when you search for "chess". In other words it is totally lost amongst 200 chess programs or so...
Don't worry, it will climb. Believe it or not, Stockfish is close to the top of the list.
What I have not included in the App Store description is that the chess engine is exactly the same as the PC version of Chess Tiger 2011, which has not been released yet for PC. So even advanced players, as you have noticed, will get a run for their money! :)
There will be a Macintosh version too, I suppose? :P

Actually there is already one... Sort of! :)

The development went like this:
Interesting story snipped.

Stockfish (originally Glaurung) for iOS was more straightforward: I started by porting just the UCI engine, and ran it in console mode on my iPhone. In fact, "porting" is a too strong word to do, because the only thing I had to change was a few compiler flags in the Makefile. I used the UCI engine to play automated test games with the iPhone against various OS X chess programs and on the ICC, in order to make sure everything worked.

I then hacked up a simple GUI (I already knew Objective-C, of course), and connected it to the engine with a minor modification of UCI. Since Apple doesn't allow third-party apps to start new processes, I had to bundle the engine and the GUI in a single executable. I did this by running the two in separate threads, and let the engine listen to UCI command from an internal queue rather than from the command line. This design makes it almost trivial to adapt other UCI chess engines to the GUI. As a proof of concept, I once made a port of Fruit 2.1, which only took a couple of hours of work. The iOS version of Hiarcs is also based on the same GUI.
Objective-C has the invaluable advantage to be 100% compatible with C. Any C code can be integrated into an Objective-C program. This has been a very helpful feature for me.

However Objective-C is a language from the eighties, and while it has been updated several times there are 3 things I still really hate about it:

- Having to maintain ".h" files. I admit C# has spoiled me and that it is probably debatable, but there is no question that you can program much faster and make less mistakes just because of this in C#. However it is such a fondamental feature in Objectice-C (like in C) that there is no hope that it can be improved.

- Properties are an afterthought in Objective-C. While they are not strictly necessary in OOP, they make programming easier. If iwanted to stick with purely elegant programming, maybe I would use Forth. But I want the language to help me, I want syntactic sugar. Properties in Objective-C are acceptable, but require that I pay attention to what I do. This energy I should be able to spend to more productive tasks.

- And finally, the real killer: there is NO GARBAGE COLLECTION on iOS. The feature is not missing in Objective-C actually, because it has been implemented years ago and is available for Mac applications. But not on iOS. The general belief is that Apple decided against GC for now because of performance concerns. But MonoTouch has it and I have not heard that it was slow. Anyway... The lack of garbage collection makes programming in Objective-C for iOS extremely painful. Half the variables you manipulate are objects (a string is an object for example) and you need to pay attention about memory management ALL THE TIME. Far too much of your energy is consumed by taking care of this problem. Screw just a release on one variable up and your program will crash. And it will not crash where you screwed it up, it will crash in a totally unrelated place and you will spend the rest of the day trying to figure it out. Or worse, it will crash only on the device and not on the simulator. Or the opposite. Or it will corrupt something, somewhere else, and it may go unnoticed until you release the product.

While memory allocation is naturally also a concern in C, C++ and many other languages, it is especially painful in OO programming languages, where basically everything is an object and has to be allocated and later released (freed).

So I have learned that an OO language without garbage collection is an absolute NO-NO, and unfortunately I have spent months working with one.
Agreed on all points. I like Cocoa and UIKit, but programming in Objective-C is quite uncomfortable (better than C++ in most respects, but that isn't saying much). The only mitigating factor is, as you point out yourself, full compatibility with C and C++.
Brothers and sisters, listen to me: Objective-C on iOS is a bitch, and you'd better stay away from it. At least until it gets decent garbage collection.

My guess is that it will get it when all iPhones, iPads and iPod touch get a dual core processor. At this time only the iPad 2 has one. There are hints that some work on GC in iOS have been done, but I guess we will have to wait for 2 years or more to get it for real.
My prediction is that it will happen when the first iOS version without support for older devices than the iPhone 4 is released.
So back to your question: the Chess Tiger engine works very well on Macs but it is only a terminal application.

I guess I could make an UCI engine from it but I have so many other priorities that I do not see this happening before the post-PC (and post-Mac) era is on us. :)
A UCI engine is all I would want, anyway. I never use any desktop chess GUIs anyway, and wouldn't buy Chess Tiger if it shipped as anything else than an XBoard or UCI engine (I'd be happy to buy it bundled with a GUI, but only if it contained an easily extractable engine). But of course, I'm hardly an average customer.

If a UCI engine alone is not enough, would you be willing to do it if I can make a decent GUI for you (for free, of course)? This is not a promise, but I would at least be willing to discuss it if it could help to bring Chess Tiger to OS X.
Actually I was surprised to see that Tiger was not slaughtered, but eventually it does not matter.

Look at how strong our programs are on a modest iPhone. If you are still concerned by strength and investing considerable time on it, then you are working for less than 1% of your users.
Absolutely. I don't remember even a single user complaining about the strength of Stockfish on the strongest settings, but I get lots of requests for weaker play at the bottom settings. It's strange that most of the commercial programmers still believe that strength is what matters for commercial success. My opinion is that strength is almost completely irrelevant these days.


About the minus sides you have mentionned:

- This is an introductory price. Sorry, but it will go UP in a few days.
I am not sure this is a good idea, but of course it is your decision.

There is no doubt that I would get more users and more ego satisfaction by giving it away for free.

As my ego does not need much fixing anymore nowadays, I actually appreciate more that people spent a very modest amount of money on a product that took me almost a year and a half of my life, and that is going to take me even more time and energy as I improve it.

I'm sorry about how psychotic I sound by implying that I would like to get money from my work, and I how I am going to be flamed for this.[/quote]

You don't sound psychotic at all, and I understand very well that you want to get money from your work. You already got my money, and you'll get more of it when you release an iPad version. :)

What I meant was that I believe you would earn more with a lower price (like the current one). I could be wrong, of course.
- The application has High-resolution graphics built inside, so on iPhone 4 or iPod touch 4 it uses the full definition of the retina display. Unfortunately the iPad does not use these high-resolution graphics, which is a shame.
Not sure I understand what you mean here. The iPad has even higher resolution than the iPhone 4. Stockfish uses 40x40 bitmaps on the iPhone <4, 80x80 bitmaps on the iPhone 4, and 96x96 bitmaps on the iPad. Most of the piece sets are actually antialiased, down-scaled versions of 300x300 bitmaps.

Chess Tiger is a retina application (compatible with both 320x480 and 640x960 screens) but the iPad just takes the 320x480 resolution and scales it up. This results in blurred graphics, mainly visible on text.
I misunderstood. I was confused because I thought Chess Tiger was a universal binary with support for the iPad's native 1024x768 resolution.

Tord
Kaj Soderberg
Posts: 137
Joined: Sat Jan 01, 2011 7:33 pm

Re: Daily iPhone chess programs releases

Post by Kaj Soderberg »

Hi Christophe,

Let me first bring a salute to Chess Tiger 2011.
I always enjoyed the often onorthodox approaches to positions by Tiger. That is what makes chess fun.
The app looks good and plays well, on my Ipad anyway.

I found a little piece of nuisance though.
With the right intentions probably, in analysis mode, the thinking time is restricted to a certain time per move in order to save the battery. Well, there is something called an adapter around. It would be nice if one of the options would be to analyze infinitely. Just to tease you, Stockfish does.
Maybe you could facilitate this in an update.
If i overlooked a settings option, just give a shout.

Anyway, thanks for bringing out the new engine.
My PC is also dying to get the heavy metal version of CT 2011 do it's magic.

Thank you for the best computer chess news in a long time.

Best regards,
Kaj
S.Taylor
Posts: 8514
Joined: Thu Mar 09, 2006 3:25 am
Location: Jerusalem Israel

Re: Daily iPhone chess programs releases

Post by S.Taylor »

Is this app up for sale/download for the 3 network (in the UK)?
User avatar
tiger
Posts: 819
Joined: Sat Mar 11, 2006 3:15 am
Location: Guadeloupe (french caribbean island)

Re: Daily iPhone chess programs releases

Post by tiger »

Kaj Soderberg wrote:Hi Christophe,

Let me first bring a salute to Chess Tiger 2011.
I always enjoyed the often onorthodox approaches to positions by Tiger. That is what makes chess fun.
The app looks good and plays well, on my Ipad anyway.

I found a little piece of nuisance though.
With the right intentions probably, in analysis mode, the thinking time is restricted to a certain time per move in order to save the battery. Well, there is something called an adapter around. It would be nice if one of the options would be to analyze infinitely. Just to tease you, Stockfish does.
Maybe you could facilitate this in an update.
If i overlooked a settings option, just give a shout.

Anyway, thanks for bringing out the new engine.
My PC is also dying to get the heavy metal version of CT 2011 do it's magic.

Thank you for the best computer chess news in a long time.

Best regards,
Kaj

Thank you for the suggestion.

Indeed, it looks like most request at this time are for longer thinking times.

You will get this in the next update.


// Christophe