Monday, January 26, 2009

Intelligent Agents for Problem Solving

I have just finished my first week at a new job. The place is called Agent Oriented Software (or the AOS Group), and they are a 10 year old multinational product/consulting firm focused on the application of intelligent agents (and related technology) to problem solving, seemingly mostly for R&D and defence. The company core product is called JACK, which is an agent-based platform for autonomous decision making and provides the basis for a host of extension products including team-based behaviour, simulation, cognitive behaviour, and more.

I had been exposed to intelligent agents, multi-agent systems, and agent-based modelling before, taking a course in my undergraduate, and reading some if the literature that came out our sister research group while completing my PhD on computational intelligence. I am only now starting to grasp the true nature of this movement as a new paradigm for software-based problem solving. So-called methodology for designing and building autonomous decision making software systems, now called agent-oriented programming and agent-oriented software engineering.

There is an IEEE special interest group focused on standardizing such systems called the Foundation of Intelligent Physical Agents (FIPA) providing a suite of specifications promoting interoperability. Interestingly, the now-defunct Australian Artificial Intelligence Institute (AAII) from what I can tell used to play an influential role in this country and to the field. Given that contributions have trailed off since the early 2000's, I have been poking around the history and projected trajectory of this field.

Intelligent agents and related technologies still feature in the research curriculum at some universities in my immediate vicinity, for example:

I'm on the lookout for good inductive texts, other than the classics like Multiagent Systems: A Modern Approach to Distributed Artificial Intelligence, and more recent additions such as Developing Intelligent Agent Systems: A Practical Guide. I'm interested in cutting through the research agendas in the literature and better grasping the applicable niche for the approach. It seems that so-called agent-oriented programming is presented as an extension to object-oriented programming to address the complexity of problem solving with software, where the unit of modelling has shifted from the object to the agent and its interactions. One can achieve autonomous decision making without the application of an agent metaphor, so I'm interested in the specific benefits the approach can deliver. At the moment, the technology appears more complex than the problems it's trying to solve, I'm personally trying to figure out if it is overly so.

Saturday, January 17, 2009

So I jailbroke my iPhone...

I've had my iPhone for about a month now, and although the novelty has not worn off, my mind has been on pushing this little computer. I have been slowly been designing some AI-centric iPhone apps, although more than anything else the idea of jail breaking my iPhone has been weighing on me - coaxing me, slowly wearing me down.

Before taking the leap, I had some questions that needed to be addressed.

Would I loose my current configuration and apps? (no) Could I still use AppStore? (yes) Could I still manage and sync with iTunes? (yes), Could I restore to a virgin un-jailbroken state? (yes), Could I upgrade when future apple updates come down the pipe? (yes) Could I use the phone for development after the break? (yes)

I found these answers mostly piecewise, some on mentioned on guides, some from direct searching, and generally most of the answers came from iPhone/jailbreak-focused forms such as Hackint0sh, Whirlpool iPhone, and iPhone Hacks. There are some bad stories on some of those forums, which I tried to ignore, although reading through fixes for potential problems armed with some level of confidence if things went south.

Jailbreaking was all about changing small properties in software the runs the phone. Software like iTunes doesn't know or care about such modifications after they are made, allowing you to restore, restore from backup, sync, and continue life as per normal. I was satisfied about the process in general and turned my attention to the software used for the breaking. Who wrote it and where are the latest versions?

There may be a few iPhone cracking movements out there, although I focused on the most popular of the few who call themselves the iPhone Dev Team. They have a blog, a wiki, are on twitter, and most importantly maintain a list of the most recent versions of the required software. Some further reading taught me jailbreaking refers to acquiring the ability to install and execute unsigned code on the iPhone (basically homebrew apps and modified versions of proprietary apps). Another concern of this dev group is "unlocking" that refers to modifying a more specific aspect of the phone (it's modem or talking to the network thingo) and acquiring the ability to use sim cards from additional carriers (sim unlocking).

I was already familiar with jailbreaking although under a different name. I knew about modding in the context of game consoles, and had enjoyed the freedoms of watching movies across my network with a modded first generation XBOX for the 6 or more years.

I was only interested in jailbreaking my phone, not unlocking it. I discovered that there were two software tools to assist me with the process of liberating my phone: PwnageTool which is a is a wizard-like program for jailbreaking an iPhone by installing custom firmware through iTunes, and Quickpwn which is a tool to quickly and easily jailbreak an IPhone without as many steps (or as much control) as with PwnageTool. I believe PwnageTool is all about designing and constructing a custom firmware to push to the phone, whereas quickpwn is all about going with the defaults or the best practices.

I already had the most recent firmware installed on my 3G phone, and for the sake of simplicity I went with Quickpwn, using this outdated guide for the Quickpwn on OSX. I chose this guide for the clear and visual presentation of the steps required to get the firmware on the phone, specifically the combination and timing of button presses needed to get the phone into DFU mode. In retrospect, a quick read through the guide prior to running the software would have been all that would have been needed, as the wizard in the software provides sufficient detail.

I followed the instructions and still messed up the button combinations needed to get into DFU mode. I left iTunes running in the background, and it complained halfway through the process with a big ugly error message, which I ignored. Finally, at the end of the process, after the new firmware was uploaded, and after it rebooted and ran some on-phone updates, the phone sat in a cycle of rebooting and vibrating. After an impatient 10 minutes, I assumed the process was finished and pulled the cable out of the phone. It completed another reboot cycle and started up as per normal, although with the new Cydia and Installer homebrew apps installed. Success!

I've been jailbroken for a few days and have not had a single problem. Immediately after the jailbreaking process I tested wifi, 3G, inbound, and outbound calls. I proceeded to install an array of pre-researched/recommended homebrew apps through Cydia, not limited to: Cycorder, bossprefs, SBSettings, Doom, Quake, MXTube, mobilefinder, SSH, winterboard, Backgrounder, and many others. I have not yet installed any game console emulators, but they are high on my todo list. There are a lot of homebrew apps our there, and I'm always open to recommendations! In fact this has been the only way I have been able to navigate the avalanche!

From what I could read, the core application-centric motivation to jailbreak is to acquire functionalities such as recording video, streaming video from the phone, a zoomable camera, to use the phone as a modem (tethering), adding themes, and customizing the base system. They are fair reasons. In all truth think 'taking control' of the device and its software was a core motivation for me, and I think AppStore Piracy (and installation) is the core reason why an average Joe would jailbreak their phone.

I am really interested in pushing my own unsigned apps to my phone, and there are guides available. I am also interested in more edge homebrew apps that I have to compile and deploy myself. I'm thinking about getting involves in a few, just as learning exercise - maybe I'll port an open source game or two. We'll see.

If you are even remotely technical, jailbreak your iPhone already! You will know you made the right decision when you're killing processes from the command line and browsing the file system in MobileFinder. Just feels good knowing you can go there if you need to. Safe.

Sunday, January 11, 2009

New Project: Inspired Algorithms

I am happy to announce my new hobby project for 2009: Inspired Algorithms located at www.InspiredAlgorithms.com. As I outlined in the first post and enshrined in the web pages title bar, the goal of the project is to write and offer the largest set of explained and executable computational intelligence algorithms on the planet.

I have been writing copy for this project for about a month with the intention of releasing a self published book. The new year rolled around and I looked at my mess of private LaTeX files locked away on my hard drive and knew that the project needed to change. The important change in direction I made was the decision to start to release the content of the book piecewise, online, and for free.

My intention is to release 2 or 3 'inspired algorithm guides' per week for at least the next 6 months (8-10 per month), with the goal of amassing no less than 50 good quality guides by July 1st 2009. I then intend to release a book version shortly soon after, both in the form of a free PDF e-book and a paid (print on demand) hard copy book.

It is an ambitious project that I expect to contribute to in the evenings and weekends, channelling my so-called cognitive surplus toward something real and potentially useful to a wider audience. Already having a backlog of copy provides me with some buffer and slack to ride through any meatspace interruptions. I am also drawing heavily on my previous open source computational projects and my PhD research.

Already I have noticed a natural refinement of the copy from the dry guides I had written for myself to the more human and readable forms posted online. I have disabled comments on the blog as I don't think they're appropriate, and I've setup an Inspired Algorithms Discussion Group which I hope will generate some discussion and feedback that works towards further refining the the quality and accessibility of the content. I have also setup an Inspired Algorithms Open Source Project to maintain all ruby source code from the guides.

One of my concerns with using a blogger blog to host the project was how to effectively manage source code examples snippets in posts. I arrived at a somewhat antiquated solution that importantly looks pretty. I'm following a mixture advice from here that exploits the google-code-prettify project that offers javascript and style sheets specialised for syntax highlighting of code snippets in a web pages.

The setup process involved my adding the prettify links to the head of my blogger template (linked from the subversion trunk) and calling the prettyPrint() function in the onload of the page. Code sample inclusion involves writing the copy of guide first then editing the HTML and inserting the pre tags with the formatted code inside, then publishing immediately. I find that if I add the code and then view the draft post in compose mode that it messes up the indenting of the code. This is a real pain in the ass for maintaining a set of pre-prepared posts. The code looks really pretty in the blog posts, although sadly the effect is lost on those who subscribe via their feed reader.

I'm really excited about this project and the potential for building and refining a useful knowledge base of computational intelligence algorithms and explanations. I look forward to the challenge off my aggressive post schedule!

Tuesday, January 6, 2009

I'm Looking for a Job

Since finishing up my PhD in Artificial Intelligence in June last year, I've been working with a group of guys on a number of websites with the intent of starting a profitable business. An agreement I made with my girlfriend way back in mid 2008 was that if my ventures were not financially viable or looking like they would be viable soon that I would seek gainful employment in the new year. That time has come. It's a new year and I'm looking for work.

I started some preparation toward the end of last year, contacting and organising professional referees, re-writing my resume in LaTeX, and setting up email alerts for key terms on local job sites. Initially I was unsure of the space of job sites in Australia. I built a small list and checked traffic on Alexa to ensure I wasn't wasting my time. Seek is still the dominant player with an estimated more than double the page views than the next two competitors.

Re-writing my resume forced me to consolidate my research work and more recent entrepreneurial aspirations into a communicable form which I found useful for really fleshing out the core take-aways. For me the PhD was a true apprenticeship in basic research, the scientific method and technical writing. Co-founding a number of website businesses was a crash course in product development and brand management with sprinkles of team coordination.

I condensed my resume and used the content to update my linkedin and facebook profiles in the off-chance that a potential employer does a background check. Like this blog post, I exploited my social networks to broadcast that fact that I'm looking for work using the linkedin and facebook status messages, as well as twitter. Although, unlike those social networking sites, this blog is far less of an advertisement and more a synthesis of ideas.

I've been thinking a lot about the kind of work I want to do. I'm a trained and experienced software engineer and research scientist and so dream jobs fall into the spectrum of programming complex intelligent systems. This observation ties in closely with a post I wrote back in March 2008 entitled "Cycling Hobbies to Day Jobs: A Personal Assessment of Starting a Startup". In that post I made the observation that in the past I had cycled between software engineer and AI researcher and that an ideal job would be to build such systems for a living. I now believe that I'm broadly suited to jobs within the spectrum defined on the boundaries between full time academic and full time software engineer. I am not convinced that jobs in the sweet spot such as 'AI research for development' or 'development of complex intelligent systems' is any better or worse suited than 'research scientist' or 'programmer analyst'. They all effectively exploit the skill set that has been accreted over the last 10 years, and I feel confident that so-called hobby projects can fill in any gaps not covered by a real job.

I still maintain aspirations of building and owning my own business, but I have seen hungry entrepreneurs and I don't think I'm one of them. Socialising and working with some of these guys in Melbourne as highlighted that what I desired from my own startup is the ability to call the shots. What I think I currently lack is the business experience (or perhaps discipline) to map hard work to financial independence. I am also not convinced that a service based business is the way to go. The bulk of my professional, personal, and creative projects have been produce and release. A business, especially a service-based business is focused on maintenance after release, not abandonment.

I attended a handful of interviews in the declining weeks of 2008. The positions where predominately at the edges of my spectrum of interest and the conversations during those interviews really woke me up. Paraphrased: "we're after a career academic, why so few publications? will you teach?" or "we're after a senior developer/team leader, how does your 4 year absence from this profession make you competitive?". Valid questions without a doubt which I addressed, although I can't help but think that being a specialist for the last 10 years and not having to answer such questions would be a better position. Perhaps not. Nevertheless I'm preparing for the long haul.

Thursday, January 1, 2009

Artificial Intelligence on the iPhone

On a first pass, the iPhone appears to be the perfect platform to deliver on the promise of the field of Intelligent Agents. It's a moderately powerful computer with a number of integrated sensors in meatspace (touch, orientation, location, audio, and visual) as well as connectivity to the web and relevant virtual sensors (search, subscription, message passing, etc). The platform could host the ultimate interactive intelligent software agent, but like the vagaries of the field from which this promise came, it is not clear what actions and behaviours such a virtual personal assistant can or should mediate.

I've had my eye out for any iPhone apps that directly utilize some form of artificial intelligence. I say 'directly' because unlike apps that indirectly exploit such technologies, those that advertise the far are easier for me to find via search.

I have come across a number of demonstration apps that appear to be written by enthusiasts. There are cellular automata simulations such as Lifegame that provides an implementation of Conway's game of Life. There are fractal geometry implementations that use the touch screen interface to zoom such as Mandelbrot. There is at least one chat bot app called Amy AI. Other examples include speech recognition like google mobile app, image recognition like SnapTell, and talk of augmented reality applications on the horizon. There are also related science applications like programming references, graphics calculators, circuit simulators, and many others.

I keep finding I have free time to burn on the phone, but find the games pointless. I have been thinking that the iPhone platform would be perfect for so-called games with a purpose as a more meaningful diversion. I have also been thinking that interactive computational intelligence approaches may be a lot of fun, especially applied to open ended problems like automated controller design and simulation in 2D or 3D environments (like soda race) or morphology evolution (like Karl Sims classical works).

I've idly been looking into this and have stared poking around some open source 3D engines for the iPhone such as Oolong and SIO2. Not sure where this will go, but I would much rather be exploited as a subjective human fitness function while killing a spare 20 minutes on a train than play another round at a vapid arcade game.