Daily iPhone chess programs releases

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

Moderators: hgm, Rebel, chrisw

Cubeman
Posts: 644
Joined: Fri Feb 02, 2007 3:11 am
Location: New Zealand

Re: Daily iPhone chess programs releases

Post by Cubeman »

Looks good, nice to see the analysis displayed under the board window and full plys given.If the strength is as strong or stronger than Stockfish then I think that it will be the current best mobile app.Any plans to port to other platforms.I would be very interested in a version for PocketFritz3, just the engine needs to be ported.
DomLeste
Posts: 221
Joined: Thu Mar 09, 2006 4:53 pm

Re: Daily iPhone chess programs releases

Post by DomLeste »

Salut Christophe

For the PC version will ChessTiger 2011 play Fischer Chess? When i get my 4g ipod i buy the chesstiger! Thanks

Dom
Insanity: doing the same thing over and over again and expecting different results.
Albert Einstein
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 »

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?


JuLieN wrote:
Tord Romstad wrote:
tiger wrote:- 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.
I can answer this question for Christophe :) As you know, iPhone apps now include two sets of graphics: one "low res" for the older iPhones, and one "high res" for the retina display. But the iPad won't use the retina display graphics of an iPhone-only application, despite having actually a higher-res screen than an iPhone 4. Instead, it will use the low-res ones. So the only way to deal with that and get good graphics on the iPhones and the iPad is to make a universal app and include three sets of graphics: lowres, retina and iPad. And the problem is: Chess Tiger is not a universal App, so it's stuck with low-res graphics on the iPad: iOS on the iPad will smoother the bitmaps but not the fonts.
(Note to Christophe: from where you are, it should take ten minutes at most to make a basic universal app! ;) )
Tord Romstad wrote:
JuLieN wrote:But what a pleasure to use xcode, once one feel fluent enough!
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? :) I learnt Objective C using Xcode, so it feels natural for me now (after a steep learning curve for the Delphi programmer I am.......)
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 »

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:

- port the Chess Tiger engine from Linux to Mac. As Chess Tiger is basically a terminal application, it did not take long. I just had to adapt a few low-level modules to be compatible with Darwin and I was done. Just took a few days.

- port the Chess Tiger terminal application to iPhone by replacing the console interface by a text-only UIKit interface. At that point I could play chess by entering e2e4 on the iPhone keyboard, and looking at a microscopic character-only board representation on the iPhone screen. When doing this port I started to learn Objective-C.

Then I had to pause the development because I had another application to write. Incidently I decided to write it in C# using GTK+ because I wanted it to be portable on Linux, Mac and Windows. This was my opportunity to learn object-oriented programming. It took me one full month to write this application and to start understanding and using the OOP concepts. This was done entirely in MonoDevelop which is VERY good and has taken much from Visual Studio and Xcode..

I went back to Chess Tiger for iPhone and at that point was really tempted to write the GUI in C# with MonoTouch. Unfortunately at that time Apple had banned thid-party tools from iPhone apps. It was quite clear that the target was Flash and not MonoTouch. There were constant reports that MonoTouch aplications were still approved in the App Store, but I did not feel very confident to invest so much time and risk being rejected, so I decided to use Objective-C.

BTW as you know Apple has since reversed the decision and third-party development tools are now "legal". Looking back, I think I should have used C# with MonoTouch.

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.

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.


Sorry for the rant Tord, I think you already know all of that. It's a warning for people who want to get into iOS programming and will read this.


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. :)


I will leave it to the rating lists to measure the strength of the program, however I have already noticed that Stockfish has problems against Tiger on this platform,
I got 1.5-0.5 in Stockfish's favor in the first two games I played, but of course two games are nothing, and I was cheating by running Chess Tiger on an iPhone and Stockfish on the 25% faster iPad 1, and by using a development version of Stockfish which is stronger than the public iOS Stockfish.
which was not totally unexpected as Stockfish is a 64 bits program and runs slowly on a 32 bits iPhone/iPad.
Yes. I should probably write a 32-bit version some time. Thanks for pushing me. :)

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.


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.



- 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.

There must be both technical and marketing reasons for this, but I wish they would just display the 640x960 version of your iPhone/iPod touch app when you display it zoomed on an iPad.

A few feature requests:

Would it be possible to display all scores from white's point of view, at least as an option?

Could you please add an option for a plain, non-textured background?

Could you please add the possibility to take back and replay moves by swiping left and right, as in most other iOS chess programs?

These are good suggestions that I add immediately to my (already quite long) list of TODOs.

Thanks Tord.



// Christophe
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 »

The answer for both question is that I do not know.

Android: while it may look like a fine platform from the user point of view because the phones/tablets are not expensive, look like they have most of the features of iOS devices and there is more choice, I'm not convinced by the platform as a developper.

In Q1 2009 I had decided to write an Android version of Chess Tiger. I had correctly predicted that Android would take a significant smartphone market share. But after carefully reviewing the platform and the ecosystem around it I decided to change my mind and to go for iOS (then known as iPhone OS) instead. I wasted 4 or 5 months by changing my mind, but I think I took the right decision.

Now, 2 years after, my analysis of Android has not changed. I find it technically inferior (I was surprised by the quality of Apple's software, which I did not know at all before October 2009), Google does not care about the developpers, and it's a platform designed to produce cheap smartphones for people who will almost exclusively want free applications. And all of these phones are and will always be subtly incompatible with each other.

It's natural that it is a big success.

Again, you as a user can find that the Android devices are great, not as expensive as Apple's devices and functionnally equivalent. So they naturally may look more attractive.

I can understand that.



// Christophe
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 »

DomLeste wrote:Salut Christophe

For the PC version will ChessTiger 2011 play Fischer Chess? When i get my 4g ipod i buy the chesstiger! Thanks

Dom

Popular demand will rule here. There are many points I have to work on, so I must work first on what people want.

That makes 1 vote for Fischer chess.


// Christophe
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 »

Steve Maughan wrote:Hi Christophe,

Great news! It seems to play well on my iPod Touch.

Can you give us any insight as to what you've been working on for Chess Tiger 2011. If I remember correctly, after CT 2007 you thought the evaluation function may need work. I assume you've done tons more but the highlights would certainly be interesting.

All the best,

Steve

I have changed the way I test for improvements. I still use lots of games but I have rewritten the tools that allow me to do automatic testing and I do orders of magnitudes more tests, which mean that I am now able to really tell if a change in the engine is an improvement or not.

I have wasted years between 2004 and 2009 because my testing methodology was flawed. Which is ironic because I you look in the archives, back in 2000-2002 I was the one to insist that without a carefully crafted testing system you could not make steady improvements to your engine...

So while I was working on the iOS GUI I had several quads doing automatic tests for me. I have re-tested lots of ideas I had discarded in the past and found some that eventually worked much better than I initially tought.

The evaluation has not changed much and I still think it needs work. However the search is now able to deal with state-of-the-art clones.



// 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 »

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. ;)
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? ;)
"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 ]
Robert Flesher
Posts: 1280
Joined: Tue Aug 18, 2009 3:06 am

Re: Daily iPhone chess programs releases

Post by Robert Flesher »

tiger wrote:
Steve Maughan wrote:Hi Christophe,

Great news! It seems to play well on my iPod Touch.

Can you give us any insight as to what you've been working on for Chess Tiger 2011. If I remember correctly, after CT 2007 you thought the evaluation function may need work. I assume you've done tons more but the highlights would certainly be interesting.

All the best,

Steve



I have changed the way I test for improvements. I still use lots of games but I have rewritten the tools that allow me to do automatic testing and I do orders of magnitudes more tests, which mean that I am now able to really tell if a change in the engine is an improvement or not.

I have wasted years between 2004 and 2009 because my testing methodology was flawed. Which is ironic because I you look in the archives, back in 2000-2002 I was the one to insist that without a carefully crafted testing system you could not make steady improvements to your engine...

So while I was working on the iOS GUI I had several quads doing automatic tests for me. I have re-tested lots of ideas I had discarded in the past and found some that eventually worked much better than I initially tought.

The evaluation has not changed much and I still think it needs work. However the search is now able to deal with state-of-the-art clones.



// Christophe

Hello Christophe, is Chesstiger now using multiple threads as your post seems to suggest?
tomgdrums
Posts: 736
Joined: Wed Dec 02, 2009 9:48 am

Re: Daily iPhone chess programs releases

Post by tomgdrums »

tiger wrote:The answer for both question is that I do not know.

Android: while it may look like a fine platform from the user point of view because the phones/tablets are not expensive, look like they have most of the features of iOS devices and there is more choice, I'm not convinced by the platform as a developper.

In Q1 2009 I had decided to write an Android version of Chess Tiger. I had correctly predicted that Android would take a significant smartphone market share. But after carefully reviewing the platform and the ecosystem around it I decided to change my mind and to go for iOS (then known as iPhone OS) instead. I wasted 4 or 5 months by changing my mind, but I think I took the right decision.

Now, 2 years after, my analysis of Android has not changed. I find it technically inferior (I was surprised by the quality of Apple's software, which I did not know at all before October 2009), Google does not care about the developpers, and it's a platform designed to produce cheap smartphones for people who will almost exclusively want free applications. And all of these phones are and will always be subtly incompatible with each other.

It's natural that it is a big success.

Again, you as a user can find that the Android devices are great, not as expensive as Apple's devices and functionnally equivalent. So they naturally may look more attractive.

I can understand that.



// Christophe
Hi Cristophe,

Thanks for the detailed answer regarding Android.

Although I am one android user that almost always prefer the "pay for" apps to the free ones in the Android marketplace.

I think most Android users will pay for good apps. But I do understand your decision (a music developer also said roughly the same thing).

Oh and any rough idea on a Chess Tiger 2011 release date? As I said I have been thinking about getting the 2007 version from lokasoft.