tag:blogger.com,1999:blog-5017213576718024910.post898436606933788333..comments2011-05-03T23:22:40.718-04:00Comments on metalev: Spoiler alert: Code to solve GoogleNexus Challenge...Luke Hutchisonhttp://www.blogger.com/profile/07119186060702104432noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-5017213576718024910.post-26308150461028843622011-05-03T23:22:40.718-04:002011-05-03T23:22:40.718-04:00Great question Casey -- what tipped me off was thi...Great question Casey -- what tipped me off was this: http://ni.chol.as/media/geoff-files/sillymaps/anagrammap.gif<br /><br />I forget what my exact search terms were, but I did a Google Image search for &quot;London Tube map&quot; or something similar, and this was the first image that came up. I don&#39;t know London at all so I thought it was the real map at first, and I was laughing at the quirkiness of British culture. &quot;Seriously, who names their subway stops things like &#39;Ogre Awarded&#39;, &#39;Strange Perk&#39; or &#39;Togetherness Thinking&#39;?&quot; I mean, I know England has some pretty darned weird names for historical reasons, so I didn&#39;t question it :-) Then I crossed the threshold of incredulity and I thought they must be plays on word sounds or placename meanings -- somehow I missed the fact that it was linked from this page: http://ni.chol.as/media/sillytube.html<br /><br />Anyway once I realized it was an anagram map, I thought I had the key in-hand. But then I realized I couldn&#39;t see any matches between the list of clues and the map. <br /><br />So, long story short, I figured if they were anagrams, finding the shortest match would be the easiest, so I picked the one that ended up matching Kilburn. But visual search over an image was taking forever, even to verify a short match. So I took a risk and simply assumed the theory might be right, even if it would lose me time, and I found a text-based list on Wikipedia, pasted into a spreadsheet to pull out the first column, pasted into gedit to add the quotes and commas at every newline, pasted into eclipse, and wrote a quick program to loop through each string to list just strings for which str.contains(&quot;k&quot;) &amp;&amp; str.contains(&quot;i&quot;) &amp;&amp; str.contains(&quot;l&quot;) etc. I got a match so I hurriedly wrote the rest.<br /><br />I only won by 2 minutes, and the second guy did it by pasting strings into an online anagram applet of some sort. I don&#39;t know how he did it because I have no idea how an anagram applet could handle the missing letter...<br /><br />One quick way to do this by hand is to realize you only have to match clues to station names that are the same length (including the space in the clue and not including spaces in the station name). That cuts down on a lot of the work.Luke Hutchisonhttp://www.blogger.com/profile/07119186060702104432noreply@blogger.comtag:blogger.com,1999:blog-5017213576718024910.post-18508087808830798962011-05-03T22:52:23.990-04:002011-05-03T22:52:23.990-04:00Nice job. How did you know the phrases were imperf...Nice job. How did you know the phrases were imperfect anagrams for London Tube stops? I too realized that the phrases were anagrams, and I also thought to check out the London Tube map, but I never imagined the phrases were all exactly one letter short of the location names. Clearly, you were 100% sure of this fact by the time you wrote the script. So what tipped you off? Did you just cross reference the map with the phrases by eye until something jumped out at you or what?Casey Dwyerhttp://www.blogger.com/profile/05425197225537483455noreply@blogger.comtag:blogger.com,1999:blog-5017213576718024910.post-19421984072133222812011-05-03T22:11:34.242-04:002011-05-03T22:11:34.242-04:00Yeah, the code sucks, partly because Java sucks an...Yeah, the code sucks, partly because Java sucks and forces you to write boilerplate code. I&#39;m not proud.Luke Hutchisonhttp://www.blogger.com/profile/07119186060702104432noreply@blogger.comtag:blogger.com,1999:blog-5017213576718024910.post-65368004426593543392011-05-03T07:26:15.188-04:002011-05-03T07:26:15.188-04:00Haha, pretty impressive, Luke! There are a lot of...Haha, pretty impressive, Luke!<br /><br />There are a lot of places your code could be cleaned up, but I&#39;m not here to judge.Evanhttp://www.blogger.com/profile/06603403675773114032noreply@blogger.comtag:blogger.com,1999:blog-5017213576718024910.post-54280061733125577962011-05-03T05:04:28.420-04:002011-05-03T05:04:28.420-04:00O_O oh so that&#39;s what it meant... people just ...O_O oh so that&#39;s what it meant... people just kept putting that up and I didn&#39;t understand what they were saying :)<br /><br />Nice work, I really suck at those challenges... my answer was &quot;3&quot; cause only 3 or those random phrases had the letters of london.<br /><br />Maybe it would be a good idea for me to learn programming :)<br /><br />Awesome post!Mylifeasacomichttp://www.blogger.com/profile/13824487352167389731noreply@blogger.comtag:blogger.com,1999:blog-5017213576718024910.post-88851817158235749012011-05-03T04:03:40.484-04:002011-05-03T04:03:40.484-04:00Yeah, that&#39;s a much nicer approach. Java prett...Yeah, that&#39;s a much nicer approach. Java pretty much sucks :-)Luke Hutchisonhttp://www.blogger.com/profile/07119186060702104432noreply@blogger.comtag:blogger.com,1999:blog-5017213576718024910.post-89997041189595689412011-05-03T03:57:07.445-04:002011-05-03T03:57:07.445-04:00Here&#39;s a simple Python implementation, which m...Here&#39;s a simple Python implementation, which might be easier to understand (it assumes the &quot;matches&quot; and &quot;stations&quot; variables have been set). Note that rather than remove a letter from the station name, I add a letter to the match:<br /><br />from string import ascii_lowercase<br /><br />def clean(s):<br />    return sorted(c for c in s.lower() if c in ascii_lowercase)<br /><br />for match in matches:<br />    for station in stations:<br />        for letter in ascii_lowercase:<br />            if clean(match + letter) == clean(station):<br />                print letterAramgutanghttp://www.blogger.com/profile/01806614250311809194noreply@blogger.comtag:blogger.com,1999:blog-5017213576718024910.post-49164107456877569622011-05-03T01:59:21.565-04:002011-05-03T01:59:21.565-04:00Haha, how did you even find this blog post? I wasn...Haha, how did you even find this blog post? I wasn&#39;t going to publicize it until people had had a chance to solve the puzzle. I guess Google&#39;s realtime indexing is working nicely.Luke Hutchisonhttp://www.blogger.com/profile/07119186060702104432noreply@blogger.comtag:blogger.com,1999:blog-5017213576718024910.post-50657179869921023982011-05-03T01:59:13.259-04:002011-05-03T01:59:13.259-04:00Congrats ! Wonderfully solved.. !Congrats ! Wonderfully solved.. !Georgehttp://www.blogger.com/profile/02892113582115392699noreply@blogger.comtag:blogger.com,1999:blog-5017213576718024910.post-61620321570210004962011-05-03T01:38:22.240-04:002011-05-03T01:38:22.240-04:00I can&#39;t imagine how you noticed the connection...I can&#39;t imagine how you noticed the connection between the stops and the words in the puzzle :) CongratsSomeBlokehttp://www.blogger.com/profile/10688583240331572055noreply@blogger.com