ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stockfish 2.2 IOS source
Goto page 1, 2  Next
 
Post new topic       TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Threaded
View previous topic :: View next topic  
Author Message
David Whitten



Joined: 29 May 2011
Posts: 85
Location: San Diego

PostPosted: Thu Mar 22, 2012 6:30 am    Post subject: Stockfish 2.2 IOS source Reply to topic Reply with quote

Hey there,

I've shifted focus from WP7 to iPhone for now. I'm putting C# on hold as I'm finding it very difficult to get the performance I desire. Its just the nature of things, and was really expecting much better results.

Anyways, what source is the Stockfish 2.4 for iOS using? I'm guessing its not the Stockfish 2.2 for iOS Source Code, is it? If not, is the 2.4 code released somewhere? What I'd love to do is look at ways to deepen the search in the same amount of time for a given position. If I can currently go to depth 12 in 10000ms, maybe we can get it to go deeper, say depth 14 in the same amount of time.

Anyways, I wish I had gone down this route before but this all was a learning process, and C# ultimately failed in giving me what I need. I do not know iPhone at all so this will be another learning curve but certainly the performance is just awesome.

Thanks for any info.
Back to top
View user's profile Send private message
David Whitten



Joined: 29 May 2011
Posts: 85
Location: San Diego

PostPosted: Sat Mar 24, 2012 2:00 pm    Post subject: Re: Stockfish 2.2 IOS source Reply to topic Reply with quote

No one knows where the source lives for IOS 2.4 app? I'd love to grab so I can start playing around with it.

Thanks much
Back to top
View user's profile Send private message
Eelco de Groot



Joined: 12 Mar 2006
Posts: 2596
Location: Groningen

PostPosted: Sat Mar 24, 2012 2:21 pm    Post subject: Re: Stockfish 2.2 IOS source Reply to topic Reply with quote

Just my guess but if it is not included with the download on the App store then that would mean Tord has closed the source maybe? I would not be surprised if that were the case, because the iOS Stockfish application was cloned, without source or with slightly changed source but changing the credits and then put up for sale many times and protests had to be filed but some of the clones are for sure still in the store now. Tord has the right to change the license unilaterally, but I don't know if he has done so. If he has not closed the source and the App is still fully GPL it is for sure available from Tord if not included with the App? It is not entirely clear if Apple is not also partly copyright owner of Apps that it sells, programmers like Christophe Théron would know the details of this.

Regards, Eelco
_________________
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
Back to top
View user's profile Send private message
Eelco de Groot



Joined: 12 Mar 2006
Posts: 2596
Location: Groningen

PostPosted: Sat Mar 24, 2012 2:40 pm    Post subject: Re: Stockfish 2.2 IOS source Reply to topic Reply with quote

The description on the Application store http://itunes.apple.com/us/app/stockfish-chess/id305558605?mt=8
still says
Quote:
* Complete source code available under the GNU General Public License.

so you would just need to download the App I think? Have you not done so already?

Eelco
_________________
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
Back to top
View user's profile Send private message
David Whitten



Joined: 29 May 2011
Posts: 85
Location: San Diego

PostPosted: Sun Mar 25, 2012 3:52 pm    Post subject: Re: Stockfish 2.2 IOS source Reply to topic Reply with quote

If we do not have access to the source for IOS 2.4 app, does anyone know if it based off of the latest SF source? I noticed that the source for IOS 2.2 appears to be based off of maybe SF 2.1.1 or before, at least before the magics were introduced.

Thanks for any info
Back to top
View user's profile Send private message
Ted Wong



Joined: 01 Nov 2010
Posts: 246

PostPosted: Sun Mar 25, 2012 4:01 pm    Post subject: Re: Stockfish 2.2 IOS source Reply to topic Reply with quote

Only Tord knows the version of the engine, it's highly likely that it's the same version as 2.2.

However that doesn't matter. You can simply copy-and-paste the latest Stockfish sources into the project. It's still C++.
Back to top
View user's profile Send private message Visit poster's website
David Whitten



Joined: 29 May 2011
Posts: 85
Location: San Diego

PostPosted: Sun Mar 25, 2012 5:31 pm    Post subject: Re: Stockfish 2.2 IOS source Reply to topic Reply with quote

Thanks for the reply. Yeah, I'm just wondering about the CPU cache alignment code. Not sure how that will work for the iPhone. Maybe that stuff was taking out. I'll have to check the iOS 2.2 source and see how that looks.

I may just bring the latest sf source into Xcode and see how it behaves.

Thanks
Back to top
View user's profile Send private message
Ted Wong



Joined: 01 Nov 2010
Posts: 246

PostPosted: Mon Mar 26, 2012 12:53 am    Post subject: Re: Stockfish 2.2 IOS source Reply to topic Reply with quote

Note that you have to fix the internal UCI queue before your new engine works.
Back to top
View user's profile Send private message Visit poster's website
David Whitten



Joined: 29 May 2011
Posts: 85
Location: San Diego

PostPosted: Mon Mar 26, 2012 2:19 am    Post subject: Re: Stockfish 2.2 IOS source Reply to topic Reply with quote

Hi,

Yeah, I've only started looking at the source in depth today. I have to wait to actually start working on the code since I don't have a Mac yet to develop on, and I want to use XCode. I'll probably get the Mac mini, something simple.

Anyways, in the meantime, I was hoping you can explain something about the source. There's an "Engine" and a "Chess" folder. Seems like the files in the "Chess" folder were modifed for the iPhone specifically then? I'm not a C++ guy at all as I only really started to learn it for this C++ to C# port so forgive my questions if they seem obvious to a C++ guy. I don't think the latest C++ source can be pasted in without some modification for th eiPhone but I may be wrong.

I'll continue looking at the source to get a better understanding how things work.

Thanks for you emails.
Back to top
View user's profile Send private message
Ted Wong



Joined: 01 Nov 2010
Posts: 246

PostPosted: Mon Mar 26, 2012 2:42 am    Post subject: Re: Stockfish 2.2 IOS source Reply to topic Reply with quote

The Engine folder has the sources for the actual chess engine. Inside it has iphone.mm, which is where you need to look at. In the iOS version, the interface doesn't send the UCI command via process piping, the commands are saved in internal queues defined in EngineController.mm as "commandQueue". The commands are passed to command_to_engine in iphone.mm which directs the inputs to the engine.

The Chess folder has the bitboard implementation. This is necessary for checking invalid moves attempted by the user without sending an illegal move to the engine.

In order for the latest SF to work, actually for any kind of UCI engine to work. You just need to copy the latest SF sources into the Engine folder. Make sure that the handleCommand() function in the new sources are still there. Also make sure when the engine outputs UCI command, you replace the code with making a call to iphone.mm.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic       TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions All times are GMT
Goto page 1, 2  Next
Threaded
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads