Archive for April, 2008

To all those who lead monotonous lives…

Tuesday, April 15th, 2008

…in the hope that they might experience at second-hand the delights and dangers of adventure” (Agatha Christie)

That is the dedication Agatha Christie wrote for her book “The Secret Adversary”, which I spontaneously bought at the train station yesterday. I thought it is brilliant, both the dedication and the book. I don’t think I have actually read her books in English before, and now I really look forward to reading more of them. “The Secret Adversary” might have some unlikely twists in the story, but it is very well written.

In fact, I think I’ll add “own all Agatha Christie books” to my list of things I want to achieve in life, next to “all the Adventures of Tintin” by Herge. Unfortunately, it doesn’t seem to be so easy. What I found on ebay here is quite fragmented (ie no collections, and buying them one by one on ebay seems ineffective), and books currently sold are outrageously expensive (like 25€ for a rather thin collection of four of her stories – consider that the complete Sherlock Holmes is available for 10€). Also, she apparently wrote more than 100 books (I guess I will also count ebooks towards my goal). It is also not obvious what editions I should get.

The local library was quite a letdown, too. Besides “The Secret Adversary” they only had “Murder On The Orient Express” in my local branch – much as I like it, I must have seen it about a million times as a movie on TV.

I am not sure how exactly I’ll carry out that goal. Of course I could buy all the Tintin cartoons and Agatha Christie books right away, but somehow it doesn’t feel right. I guess I have to collect them by and by. Something to look forward to.

Exploring GeoTags

Tuesday, April 15th, 2008

One thought that excited me recently: the geographical information that is often saved in newer digital photographs via GPS, combined with photo tags on photosharing pages like flickr or just the context of photos, will lead to an implicit tagging of maps.
Probably the information will not be accurate enough to generate maps like “normal” maps from them (that show specific buildings and streets), but surely it will be possible to identify landmarks and other things that are not commonly marked on maps.

For example, I was never sure where or what exactly the “Cote D’Azure” is, so I searched for it on flickr maps, and it already gives me a rough idea of the area. Flickr maps was a bit unsatisfying, though. I suspect they show only a few photos, not all matches. Through the flickr forums I found another service, loc.alize.us that seems to rely on flickr data, but shows a few more hits. I am still not sure what exactly it shows. Anyway, for now there are usually just a few hundred hits, but soon it will be millions, which should provide pretty accurate information.

Another thing I searched for is “Kungsleden”, the name of a trail in Sweden that I walked once upon a time. So far, there are not that many pictures, but you can already see where the path probably is, and I am sure soon it will be a very precise map. It also seems to work quite well for the Camino de Santiago (Jakobsweg in German), at least for the Spanish part.

Another idea to play around with would be the spreading of plants animals, or of fashion and architectural styles. And this article on the effect of names reminded me of a project a former colleague told me about, where he extracted addresses from the phone book to aid his father’s research in the etymology of names. Apparently a lot of interesting things can be derived from names, like how much people moved around in former times. With geotags, it might soon be rather easy to get that information (Facebooks photo service might be very interesting for this, because it encourages tagging pictures with the name of the people who are in it).

I know this thought is probably not very cutting edge. GeoTags have been around for a while, and people are already building services around it (like loc.alize.us). Still, I am intrigued, also because some nice mathematical problems might be involved (for example, determine the real location of something if pictures have been taken from different places. Discover what different tags mean the same thing). The current maps don’t really satisfy my curiosity, and they are probably geared towards different purposes.

I wonder how much data Flickr is giving away through it’s API? I already checked, and the API is not ideal: when you query for a photo, the response doesn’t seem to include the information that if is GeoTagged or not, and it is also not possible as a search parameter. So one has to make an extra check for every photo and get as a response the geotag if it exists, or the info that it doesn’t exist. Still, I didn’t find anything about traffic limits. I don’t know what other photo sharing sites are out there that could be interesting. Also, I wonder if online newspapers and blogs commonly include the geo information in the photos they display. (Another search idea: “accident” could reveal hotspots for accidents).

I’d love to play around with this. So many things to do… But we’ll see, perhaps I’ll actually get around to it eventually. In any case I am now more sure than ever that for my next camera (or camera enabled phone), I want to have that GPS tagging feature. Recommendations are welcome.

Solving the traveling salesman problem with genetic algorithms

Tuesday, April 15th, 2008

The Traveling Salesman Problem is one of the best known NP complete problems, and genetic algorithms are among the best known approaches for approximating solutions for hard problems that can’t be solved completely. Therefore it is a common question how to solve the Traveling Salesman Problem with Genetic Algorithms. However, the solution is not so straightforward, because any encoding of salesman routes in the form of digital genes has to make sure that no illegal routes are being created through the GA’s crossover and mutation operators. Often, new and slightly awkward crossover operators are being suggested, that somehow don’t break the route.

A while ago I had an idea for an encoding that seemed reasonably elegant to me: instead of encoding the routes directly, encode permutations of the route, and construct the ensuing route by applying the permutation. A long time passed, until about two years ago I finally set out to write a proof of concept program. Said program I rediscovered a few days a ago when I reinstalled my computer and went through my files and archives to create a backup.

Now that work is very much in it’s infancy. It seems to work, but I haven’t compared it to other approaches, I haven’t tweaked the genetic algorithm at all, and so on. It seems unlikely, after so much research that has been poured into the problem, that it is really a new or worthwhile idea. Nevertheless, to make sure that it won’t be lost (just in case), I have now created a google code project for it: genetic algorithm for traveling salesman.

It is also almost my first open sourced code, apart from two small Greasemonkey Scripts. I have to say, it is fun to open source: even though I don’t expect much interest in that particular code, just to publish it is a good motivation to keep working on it.

I chose Google Code because I thought it would have the best chances for showing up in the google code search there. However, I am a bit disappointed that Google does not seem to have any facility for ranking projects and finding projects by popularity. The only means to discover projects hosted there appears to be the search box. SourceForge.net (the pioneer of public open source repositories) seems to be much better in that respect, although I often found their pages a bit confusing. The latest fad of course is GitHub, perhaps I’ll try that for the next project. I’d like to open source my mobile games, if only I’ll find the time to polish them enough.

Now blogging in english

Saturday, April 12th, 2008

A few weeks ago I started a german blog at bjoernguenzel.de. I finally wanted to use the domain to promote myself. However, I feel that blogging in english is much more interesting, especially when writing about information technology and other science subjects. Therefore I will probably write most of my new posts here, and limit the german blog to topics that are only relevant to Germany, or that already have had much traction in english, but less so in german.

Maybe a dual-language blog would have been more elegant, but to be honest I am not sure if WordPress supports it, and could not be bothered to set it up. Also, blinker.net is my primary domain, and bjoernguenzel.de was more of an afterthought.