Psellos
Life So Short, the Craft So Long to Learn

OCaml iOS App “Slide24” Updated for Lion

May 26, 2012

I updated the OCaml iOS example app, Slide24, to build under Lion with the latest Xcode. It lets you solve the well known 5 × 5 sliding tile puzzle. It will also solve it for you if you like, using a tiny bit of AI. If you’re interested in running OCaml on iOS, this app shows how to interface with GUI elements of Cocoa Touch. You can download the sources and build it to run on your own iOS device.

iPhone running Slide24 app

There are no changes to the OCaml and ObjC code—all the updates are in the instructions and in the project metadata used by Xcode. The generated app runs on iOS 3.1 and later.

There seems to be a fairly steady stream of interest in this app, maybe because it’s a classic problem for testing heuristic searches. In fact an expert in the field offered to help me make my heuristic work better. (I think he could tell I don’t know anything about heuristic searching, beyond what I read in Wikipedia while coding up the app.) I’d be really happy to improve the heuristic someday, and I’ll also happily accept patches from anybody who has already done so.

As always, the previous version of Slide24 is still available in the OCaml Programming Archives.

Posted by: Jeffrey

Comments

blog comments powered by Disqus