Archive for December, 2007

Programming Collective Intelligence

December 30, 2007

It’s easy to get so involved in your day to day work that you don’t find the time to read around the wider areas of your profession (or at least I find this to be the case). Because of this, one of my colleagues suggested that we have a “geek book club” where we read articles and books that are related to software development, and through this I’ve encountered books such as Object Thinking and Pragmatic Programmer that I otherwise wouldn’t have heard of. For holiday reading over Christmas one of my colleagues suggested that we read Programming Collective Intelligence.

Programming Collective Intelligence
Programming Collective Intelligence by Toby Segaran

This is a book about machine learning and AI in relation to developing Web 2.0 applications so there are chapters about search engines, spam filtering and making recommendations a la Amazon. These chapters I haven’t read but, as I’d implemented a genetic algorithm at university, what I immediately did was to skip to chapter 11 entitled Evolving Intelligence which is about Genetic Programming.

Genetic Programming is a term I’d not heard of before but it is, apparently, an offshoot of Genetic Algorithms. The difference, as I understand it, is that Genetic Algorithms start with an initial population of data structures which represent the answers to a problem. These data structures are amended using the evolutionary concepts of crossover and mutation and a fitness function which chooses the fittest structures (answers) to go on to the next generation. However, as the author explains, Genetic Programming evolves the algorithm itself, not just the parameters or results of an algorithm. In Segaran’s example the algorithm is modelled as a parse tree, which is the way in which programs are often first broken down by a compiler or an interpreter. This tree representation of the algorithm is then subject to crossover and mutation to evolve “better” programs as defined by the fitness function.

This kind of programming, the author tells us, has been used in fields such as optics, gaming, evolving scientific inventions such as antennas for NASA, designing a concert hall shape that gives the best acoustics etc. Though this is only one chapter in a book it goes further than the basics, for example, it touches on how you can provide the algorithm with memory and the algorithmic population with shared memory to help it learn longer term strategies, and points you in the direction of implementing this. I was most impressed and wished that I’d had this book to hand when first learning about the subject. I’ve only read chapter 11 and a bit of chapter 5 but these have already given me a good overview of the subject of genetic algorithms/programming, refreshed my memory on stuff I’ve already learned, taught me new things as well as helped me brush up on the python language. If these chapters are anything to go by then the entire book is well worth reading.

Advertisements

The Singing Ringing Tree

December 30, 2007

I was delighted to receive, as a Christmas present from a friend, a copy of The Singing Ringing Tree which I remember watching as a very little girl – maybe around 5 or even younger.

The Singing Ringing Tree

The blurb on the DVD describes it as a fairy tale that “haunted a generation” and it must have made an impression on me because although I was only very little when I watched it I still have vivid memories of it. Watching it as an adult I can see why. For a start it’s in technicolour with glorious and strange scenery which reminds me of watching the Wizard of Oz, though of course the settings are on a smaller scale. The soundtrack is very evocative, especially in the scary bits. The acting is good for that sort of thing – the sort of theatrical, unsubtle acting which works well on stage and the costumes are good, for example, when the prince gets turned into a bear they were clever enough not to have a bear mask but to have hairs glued onto his face so you could still see the pathos in his features (as my friend put it he doesn’t look like Bungle out of Rainbow which would have been really rubbish).

I chose to watch it with the English voice over, just as I watched it as a little kid. This is a narrator telling the story Jackanory style in line with the visuals. I don’t know in how many countries this was shown, but I can see how it could have wide appeal as the visuals and acting are compelling enough, and with a narrator telling the story in their own language it would work for children anywhere. There is one thing I misremember … instead of hearing the actors’ voices in the background (it was a German production and the actors speak in German) I remember a constant burbling in the background of what sounded like another narration in Czech or something? … this of course added to the overall weirdness … perhaps this is a false memory but the friend who gave it to me says that he remembers the same.

The wicked dwarf is very scary indeed and I am surprised that it didn’t scare me as a little kid. When he’s thwarting the prince and princess you can hear his cackling laughter as his face pops up out of a cloud, or out of the side of a tree, or out of the ground like an evil teletubby.

Philosophy – what’s the use?

December 17, 2007

There are a couple of people, including myself, in our team at work who have philosophy degrees. I went to university later on in life as what is euphemistically called a “mature student” so I had to go through the annoyance of putting up with such comments from friends and family as “Philosophy – you must be mad what the hell use is that?” Apart from my Mum, who always supports me in anything I choose to do, who said that she was sure studying philosophy would be “very nice”.

I was, therefore, glad to receive from a colleague of mine, whose son is doing maths and philosophy, this link to a paper which espouses the benefits of studying for a philosophy degree and the transferable skills it helps to develop which should be of benefit to any employer.

It’s a formidable list of benefits and I don’t pretend to having half of these transferable skills but I’ve never regretted my decision to study philosophy. It raises the important question of what is the use of any degree. Maths and English can certainly be applied to a lot of practical and useful careers, but what about Music? Should we really allow youngsters to study music as ultimately “what the hell use is that”? But if you are of the opinion that every degree should be vocational and “useful” then you may end up like the man who learned to service the betamax video recorder (as a philosophy student at my university pointed out).

And what is education for? Is it to produce worker drones or is it to produce people who can think for themselves?

In Britain I think there is often a prejudice against intellectualism which, as a friend of mine pointed out, often manifests in the often overheard phrase “Oh these people, they may have degrees but they have no common sense” and of course Socrates was murdered by the state for his wisdom!

What, after all, is the use of you? or of myself? Is Gont Mountain useful, or the Open Sea? … (Le Guin, A Wizard of Earthsea)

First Impressions of Stockholm

December 14, 2007

First impression was of course the weather, which was damp and cold, and the darkess, in December it gets dark at 3.00 pm. I’ve heard that there’s a high suicide rate in Sweden because they don’t get enough light, however, a bit of googling shows this to be a myth.

Another impression is that of the public transport system which seemed very complicated, until we got the hang of it and realised that it was very simple as long as you’re good at directions and can hold a map in your head. Stockholm central metro station is very big, very sprawled out and with lots of exits and escalators which makes it very confusing. One thing I did notice was the pleasing lack of advertising, instead it had painted walls with a few murals which gave an impression of a public space belonging to the people of the city, rather than corporations.

Another impression was of the people, who did not seem very warm and friendly (according to my two Greek companions, who are rather expressive) however, they were polite and helpful and spoke very good English (their education system must be excellent). We stayed at Kista which is north west of Stockholm and is a bit like Milton Keynes, but we also explored Djurgarden, Norrmalm, the centre bit by Stockholm Central Station, and of course Gamla Stan the old medieval town. In all these places we saw no evidence of anti-social behaviour and we felt very safe. As it was December there were many Christmas (or Yuletide) markets, as well as a fairground and in all of these places open fires were burning. Imagine an open bonfire in the German market in Victoria Square or the Bullring in Birmingham – you’d get people being silly and chucking it around and setting fire to things.

It was also nice to see children looking dignified and sensibly dressed as children instead of dressed up like slutty teenagers – apparently advertising aimed and children under 12 is banned and it certainly shows in what they are wearing.

Clothes and shoes seems no more expensive than your average prices here, however, eating out and going to bars is very expensive (a single Baileys and ice cost £6).

Probably due to the weather, and the light, and being built on an archipelago and with a lot of water around, Stockholm gave the impression of being a wee bit mournfull, though not in a depressing or dreary way, but rather in a detached, calm way.

Bong Sau and Tan Sau notes

December 5, 2007

The wrist is on the centre line and when turning from bong sau to tan sau (as in the 3rd section of siu nim tao) the wrist should stay in the same place. Tan Sau stays roughly a fist and thumb distance away from the body with the elbow in line with the hip. Both bong sau and tan sau can be higher or lower depending on the height of your partner (tan sau should point roughly at your partner’s throat/chin as you can strike more efficiently from that position).

Bong sau is not necesarily a deflective technique (is it a deflective technique at all?) but is used to gain information. Once you’ve turned out of the way of the strike bong sau is put into place to tell where your opponent’s arm/elbow is and then you can countermove from there. From when you are in the basic stance bong sau moves through the centreline and then “corkscrews” up into position at the last moment to avoid clashing.

Chi Sao

December 3, 2007

Tonight during Wing Chun training we concentrated almost solely on Chi Sao which my Sifu describes as “play fighting” in that it is not an all out brawl, there are certain rules and niceties and the attitude should be that you are there to learn. Sifu’s useful analogy was that of tiger cubs playing – they need to learn to hunt but they don’t want to kill each other so they go through all the motions but with their claws in; so there’s an element of trust involved as well as assertiveness (and controlled aggression maybe?)

One of the more difficult things I find about Wing Chun is that you’ve got to get over your British reserve and get physically close to people. I find this difficult, especially with a training partner I’m only mildly acquainted with. During Chi Sao I feel stupid because I don’t know what move to make next. I feel silly and embarrassed when someone gets through. I feel guilty and embarrassed when I get through someone’s defences and usually end up apologising for it. Also I feel that the men I train with are just indulging me and fear that they think they would get more out of training with another male. I also suffer from what I call “body dyslexia”, for want of a better phrase, which means that I may be able to do the moves when practising on my own but that it all goes to pot and I forget my left from my right when paired up with a training partner.

I think it true to say that during Chi Sao I’m just a bundle of conflicting impulses with a cloud of free floating anxiety on top.

I wonder if this kind of contact is perhaps easier for men because as children they’ve usually played some sort of contact sport at school (it may have changed for girls now but netball was about the only contact sport I did at school).

Controlled aggression may play a part in it but one of the guys I consider to be very good at Chi Sau seems to have absolutely no ego – if you get through (not that I often do!) he doesn’t take offence but always wants to know why and asks you to repeat what you did more slowly so that he can learn from it.

There is definitely a lot of cognitive processing going on during Chi Sao and I’m not quite sure what kind of body and brain combined intelligence is involved, but it appears to me that there’s great deal of skill involved in predicting your partners moves and coming up with a skilful countermoves.