Boris Johnson’s post about English Football and Education is a great read. Though I’m myself not very interested in football (other than as a way of taking exercise) I believe that people need heroes. Unfortunately, buffoons earning hundreds of thousands pounds a week aren’t really great role models for young lads who already have a hard time motivating themselves to work on their education.

Introducing Phage

March 27, 2007

Phage is a strategy game for 2 players, where you play against an AI (built using my game-tree search framework). The interface is a bit crude—click origin, then click target instead of drag and drop—and the featureset is somewhat limited, but it’s got the basics (making moves, undo) and I’d like it out there for people to play with.

phage.png

Previously I’ve just been re-implementing old classics (like Reversi & Connect-4), but this is completely original. After seeing some of my game-tree search work online Steve Gardner, Phage’s inventor, contacted me about creating a computer version of his game. So I did, after stalling mulling it over for about a year.

I created the core of the game logic at a hack day four weeks ago and a first stab at an interface the following weekend. A new hack day is coming up, and assuming I get the chance to hack more on Phage then, what do you think I should focus on next? A more challenging AI? Drag-n-drop of pieces? Highlight possible moves? Answers in the comments please!

SBAlphaBeta is a Foundation framework for creating AIs for many 2-player games. It encapsulates the Alpha-beta algorithm. No prior experience with Artificial Intelligence is necessary in order to use this framework.

Version 0.2 is a “back to sanity” release, incorporating improvements found by developing more games against the framework. Changes include: classes and interfaces have received a common prefix. The interfaces for states have been renamed. There are now some minor restrictions on moves, which allows us to do more error checking. Several “convenience methods” ultimately turned out to be confusing and have been dropped; many of the remaining methods have been renamed for clarity.

Set CFBundleVersion

March 25, 2007

setCFBundleVersion.pl is a quick hack to update the CFBundleVersion in Info.plist. I invoke it from a Makefile that also builds the documentation and release tarball, so I’m sure all the version numbers agree. I coded it quite defensively and believe it to be well-behaved, but don’t blame me if it causes demons to fly out of your nose.

Update, 30th April 2007: Updated the script to deal with version numbers of the form x.y.z.

Well done is

March 22, 2007

My boss is very good at taking meeting notes so that everybody knows what’s going on. These notes are highly distilled and this week’s notes contained the following rather cryptic bullet point: Well done is. After puzzling over what he could have meant for a little while I realised that it actually makes sense as a statement in its own right, akin to Unix improvements aren’t.

Walking home from work today I spent some time philosophising over this. I had in my head a long rambling post about the importance of stopping to acknowledge that well done is and how it could fundamentally change people’s lives in weird and wonderful ways. Unfortunately I arrived home and Nadia gave me a cookie and now it’s all lost forever.

Meh. It was a good cookie. It was worth it.

About to purchase a TV license online (now that I have a TV I think I should get one) I was reading through their terms and conditions and found this near the bottom:

15. Under no circumstances will we be liable for any of the following losses or damage (whether such losses where foreseen, foreseeable, known or otherwise): (a) loss of data; (b) loss of revenue or anticipated profits; (c) loss of business; (d) loss of opportunity; (e) loss of goodwill or injury to reputation; (f) losses suffered by third parties; or (g) any indirect, consequential, special or exemplary damages arising from your purchase of your TV Licence online and the delivery and receipt of your TV Licence, instalment payment plan (if applicable) and your first reminder electronically regardless of the form of action.

16. If any of these terms are determined to be illegal, invalid or otherwise unenforceable by reason of the laws of any state or country in which these terms are intended to be effective, then to the extent and within the jurisdiction in which that term is illegal, invalid or unenforceable, it shall be severed and deleted from these terms and the remaining terms shall survive, remain in full force and effect and continue to be binding and enforceable.

Some serious ass-covering there. Makes you wonder what experiences people have had in the past, that makes them come up with this crap. Or have they just put people in a room and told them to come up with the most inane clauses imaginable to put in their terms and conditions? Maybe I’m just being stupid; is this really a humour site and I just don’t get the joke?

Senseless

March 7, 2007

I’m home ill for the third day running. I’m not sure if I’m getting worse—or just bored senseless with day-time television—but taste and smell is failing me today. I’m not very fond of cooking normally (just of eating well), but when you can’t even taste or smell your culinary miracles it certainly gets a bit tiresome.

Quiet please!

March 3, 2007

In January I bought a guitar and a small practice amp. As I noted back then the amp has lots of effects which saves me buying an array of pedals. It has one problem though: it is very loud. And by that I don’t mean that it goes to 11, but that it goes from zero to hero already around 2: below is too quiet, above too high, and the optimal setting in the middle is too hard to find.

There’s simply not enough (useable) dynamic range. I could turn down the input volume from my guitar, but that changes the sound unfavourably (I get lower signal-to-noise ratio, and many of the effects rely on high input level to work satisfactorily).

To solve the problem I measured the resistance through the speaker to 6.2 Ohms, hooked a 57.4 Ohm resistor in series with it (for a total of 63.6 Ohms) and a 8.2 Ohm resistor in parallel with that. Substituting 63.6 and 8.2 for R1 and R2 in 1/R1 + 1/R2 = 1/R, the formula for calculating the combined resistance in a parallel circuit, and solving for R gives a combined resistance of about 7.3—close enough for my purposes.

The result? Most of the output from the amp now bypass the actual speaker, shunted off into a resistor where it is converted to heat rather than sound; the volume dial has a much greater effective range, making it much easier to adjust to a sensible level; and my neighbours are much happier.