Archive for the ‘play’ Category

How to cheat at Mensa puzzles

Saturday, February 9th, 2008

At freshers’ fayre (yeah, a long time ago now) I was handed a slip from Mensa. I intended to follow it up later but being busy I never got round to it. Today I rediscovered it on my desk, and of course it had a couple of puzzles on it. One is a pretty simple number sequence. The other has you find an anagram:

Rearrange the letters of ‘ANY TIME‘ to give a seven letter word. What is it?

Obviously “anytime” is excluded (well, we’re not Americans ;). I tried to find one manually for a while, but then realised I could just solve it with a couple of commands:

[pwb@rhuidean ~]$ ghci -e 'Monad.mapM_ putStrLn (let s = "anytime" in filter (\s2 -> all (`elem` s2) s) $ Control.Monad.replicateM 7 s)' > words
[pwb@rhuidean ~]$ grep -f words /usr/share/dict/words

This was taking a long time. But then I realised you can cut out a big chunk of the search space by filtering out all the non-anagrams, which you can do easily with grep.

[pwb@rhuidean ~]$ grep '^[anytime]{7}$' /usr/share/dict/words | grep -f words
amenity
anytime

I wonder how this reflects on my intelligence… :)

pwb, naked and petrified

Tuesday, July 11th, 2006

You throw the cockatrice corpse with your bare hands.
You turn to stone...
Do you want your posessions identified? [yn]

I suppose you know you’re getting back into Nethack when you finally manage yet another stupid stoning death.

In this case I was fiddling about with my inventory and a stash. Having gone around the level, killed a cockatrice and picked up its corpse to wield as a weapon, I went back to the stash. I’d set things up nicely so that the only things on the square I was standing on were the things I wanted to identify, plus a few blessed scrolls of identify, a chest with my stash in it and my bag of holding. So I took off my armour and was about to stash it when I noticed I still had the cockatrice corpse, which I didn’t need to identify (it would rot away soon anyway). So I threw it away... forgetting that I’d just taken my gloves off.

Pity the scoring doesn’t count stuff on the same square as you, ‘cause there was a nice pile of gems in the chest.

Revenge of the Turbonerds

Thursday, July 6th, 2006

Having discovered that Liferea displays web pages using Firefox’s engine (and so you don’t have to open all links in a separate program), I decided to re-add all the web comic feeds which don’t embed the comics.


The last entry in the User Friendly feed was a feedback item about the “AJ in Nethack” story arc. Apparently someone has actually come up with a patch that implements the “Turbonerd” class which AJ played. Bizarre. No prizes for guessing what the deities are called :)


There was also a link to a server where you could play Nethack with this patch over telnet (nuclearwombats.net, port 20040). It’s not all that mind-blowing (your starting weapon is a +0 cluebat :), but you can connect over IPv6. So now there are two useful (*cough*) things I can do with IPv6 (the other being connecting to the Freenode IRC network). Yay.

Edit: Damn, you can’t connect over IPv6 after all. Seems I was just confused by it trying to connect, and didn’t notice that it fails.

Computer, IPv6 and Music

Tuesday, December 20th, 2005

Good grief, it’s been far too long since I last blogged.

I got myself a computer a week or two ago, an Asus A6K laptop. So I finally have a computer to call my own which I can use here, wohoo. Not bad either, Turion 64 and GeForce Go 6200, not quite top spec (especially the RAM, only 512 MB) but an order of magnitude better (and more portable!) than my desktop PC at home which (particularly with its 19” CRT monitor) is too huge to take on the plane. I managed to install Ubuntu on it (courtesy of this hall’s other resident geek Yaakov, from Connecticut) dual booting with XP Home (which was bundled). The first thing I tried to do with it was install Operation Flashpoint… but to my horror I found I’d left CD 1 in my desktop’s CD drive. Argh! Oh well, at least I have Neverwinter Nights to fall back on.

(more…)

Hampshire win by 8 runs

Thursday, August 11th, 2005

Went to my first ever cricket match yesterday – Hampshire versus Lancashire at the Rose Bowl, about half of the match under floodlights. Hampshire bowled Lancashire out for 243 with one and a half overs left (and about as many minutes). Having scored 251-5 in their innings (Lancashire having made them bat first) this was a very close match. Warne and Peterson could have made it less close but they are obviously busy with the Ashes at the moment.


The 3rd umpire had a lot of work, being called out at least six times. One very unusual wicket was Lamb’s: his partner (Watson I think) hit the ball into the bowler, which rebounded into the stumps. Lamb was out of his crease, and since the ball touched a fielder before reaching the stumps, he was technically run out. A very unusual and unlucky way to get out. Another run out had Chilton (I think) run about 3/4 the way to the other crease and turn back, obviously too late. Man of the match was probably Watson with 106 not out off 105 balls.


Watching cricket live is quite different from watching on TV. For one thing, watching the pitch side on makes it impossible to see the line of the ball, and even the length is hard to judge sometimes. It’s rather hard to see the ball at all at that distance and the speeds it travels at. You just can’t see whether a wicket was due to the batsman’s mistake, deceptive swing or spin, or whatever.


Another thing that startled me was how quickly they get on with the match. Test matches are quite sedate affairs – since they have so much time they don’t have to hurry up and bowl. One day county cricket is much more hasty as there is a time limit. You have to bowl 44.1 overs in 2 hours 50 minutes, or risk 6 penalty runs for each over you overran by. They really don’t muck about. I timed the balls at about 30-40 seconds each plus 35 seconds between overs.