Home
The Broken Hut
Working my way up to a full-size building
Recent Entries 
16th-Oct-2007 11:35 pm - Hill-climbing as a search technique

Photograph of hills

If you’ve spent any time hillwalking at all you’ll be familiar with the “false summit effect”. From afar you can tell where the top of the mountain is, but as you get onto the slope itself your view is occluded. You fix your sights on a little hill just in front of you that blocks your view of everything else. But just as you reach this summit, you find that there’s more to come. And in the worst case, you might have to go back down from the mini-summit you’re on to reach the slopes of the higher part of the hill.

That is the false summit.

Searching for things in computer science is often likened to climbing a hill, where the summit represents the goal, and every point on the landscape represents a candidate for this goal. The idea is that, without knowing where the summit is, one can get there by always walking up hill. Assuming an ideal (smooth) landscape one could get to the top of a hill blindfold. (Not recommended.)

The flaw, which I’m sure you’ll have spotted, is the false summit. If we can’t see where we’re going then we can never be totally sure if we’re on a minor summit rather than the very top of the mountain. This is called a local maximum—every direction you walk goes down, but there is a direction which will eventually take you to a taller peak.

The solution is to add a bit of randomness. If you’re at the top and don’t know where to go, spin round in circles until you’re dizzy and then strike out in the direction you end up facing. (I don’t suggest you do this literally either. I’m not going to be responsible for dizzy people hurling themselves off hillsides.) With a bit of randomness added to the search pattern you can break out of the local maxima.

Of course, this is one of those circumstances where you can never be totally sure you’re at the summit. Though if all you’re looking for is a hill high enough then it will fit the bill adequately.

Photograph credit goes to Christof Autengruber on Flickr.

12th-Jun-2007 10:05 pm - Propagation of computer worms

The field of epidemiology studies the health of populations with any eye to detection and prevention of illness.

Disease is fascinating in any light, and as our world shrinks due to global travel we’re likely to see a lot more of it in new guises. Single cases of disease in exotic places are a potent threat to major population centres, because that single person can travel round the world in a single day.

Securing yourself against infection is a proper arms race: infectious agents and defences improving in lock-step, forever exploiting and then being beaten back.

Nothing about the above paragraphs is unique to biology. In the early hours of the 25 January 2003 the fastest-spreading global infection ever seen first began to take hold, on the internet.

The infection, known as the Slammer worm, was the first of a new kind of Warhol worm — one that would spread as fast as it could within its “15 minutes of fame”. This epidemiological analysis of the appearance, spread and weaknesses of the Slammer worm make fascinating reading for the geeky. This is what happened. )

6th-Dec-2006 02:19 am - Alan Yentob on the World wide web

I watched this evening’s Imagine, (Alan Yentob culture show) for two reasons. One, it had Tom Reynolds on it — all too briefly, in fact. He certainly got less screen time than a man with a mask on, and a guy who put a cravat on to blog.

And two, because it was about the internet: specifically, the world wide web. I find it amusing to watch programs like that as an exercise in culture-watching. You can see how familiar the general populace is with technology by seeing how it is portrayed. And I was happy to note that there were no real technical errors in what was presented. Five years ago that would not have been the case. What’s more worrying is that this show was more grounded and far realler than anything Horizon would put on at the moment.

Read all about the intarwebs here! )
18th-Sep-2006 09:26 pm - On mental illness.

I urge everyone to have a look at Mark Chu-Carroll’s discussion of the perceived differences between physical and mental illness. Read the comments too, because there’s some interesting discussion there.

When you’ve got your fill have a look at John Searle’s Chinese room argument, which I find to be a most satisfying discussion of mental processes, even if — taken to its only logical conclusion — it actually shows the opposite of what Searle wanted to prove. But hey, no-one’s perfect, eh?

So is anyone else with me in attempting, from now on, to deprecate the term mental illness? Brain condition sounds satisfyingly real and tangible, and correspondingly less mystical.

I have a physical mental illness… which is to say that I have what used to be a mental illness, many hundreds of years ago, but nowadays is considered not more interesting than a rash. Epilepsy may happen for a myriad of unknown reasons, but we know exactly what happens when it strikes (and we can even watch it on a graph in realtime). The subtler skewings of perception afforded by depression, schizophrenia or the like still seem to be unknowns for most people.

And because they affect people’s emotional states and behaviour they can be hard — impossible, even — to diagnose without prolonged observation. Like the Chinese room example: is there a difference between having a 5-minute conversation with someone who is manic, or with someone who just took several tabs of ecstacy? Is there a difference at all?

As you can guess I’m pretty much out of my depth here but I’m keen and interested to hear folks opinions on the matter.

Tomorrow night I’ll be tuning in to watch Stephen Fry’s show about (his) manic depression. Maybe you’re interested too: BBC2, 9pm, Stephen Fry: The Secret Life of the Manic Depressive.

2nd-Aug-2006 12:44 pm - Tangled Bank #59

My submission to Tangled Bank #59 was accepted, and you can read all the science at this week's host site.

The editor did mention one peeve of his, which I am sympathetic to — discussion of maths subjects without any mention of maths. The author of Good Math, Bad Math has a mantra about the worst mathematics being no mathematics, because without the rigour of numbers almost any idea can seem reasonable at first glance.

So, do the regular readers here agree with the following summary?

... as a mathematician I can't help venting about a pet peeve of mine: writing about mathematics without actually showing, you know, any real math. The metaphor of "fingerprints" is very good for giving an intuitive sense of what hash functions are about. But how much would it hurt to add a paragraph with a simple example of how such a function is computed? It need not involve anything more than simple arithmetic. Must we really perpetuate the misapprehension that "math is so haaaaard"?

Or would you prefer I kept at the intuition level? I can't please everyone but it would be good to hear some feedback at this point.

29th-Jul-2006 06:24 pm - First carnival submission

Well, I wrote an article I was proud of, so I submitted my introduction to hash functions to Tangled Bank, a carnival of exciting science posts.

Are you a weblogger? Have you recently written something you are proud of, that you think other people with an interest in biology, medicine, science in general, or just the general workings of the natural world might find worth reading? Let me know! […] Don’t hesitate, don’t be shy, don’t wonder if your work is good enough — flit right into the bank with the rest of us elaborately constructed forms.

The previous edition is available here for those who want to read a collection of exciting science in all sorts of subjects.

I’ve just finished making my way through a pair of popular science biology books: Richard Dawkins’ The Selfish Gene and Steve Jones’ Y: The Descent of Men, both of which were pretty good.

Read on for thoughts on both books )

I enjoyed The Selfish Gene more than Y: The Descent of Men but they have very different purposes. For a proper popular science book I’d recommend getting hold of the 30th anniversary edition of Dawkins’ book. If you want more of a sedate run through the history of (the biology of) maleness, go for Jones’ book.

Just when the world seems to have forgotten what it is to have a sense of humour… From a Slashdot thread about using plants to grow human insulin:

And why is it [not] right? It may be obvious to you, but please spell it out to me. It’s like saying that “homosexualtiy is obviously not right” — it means nothing except “I don’t like it, and I feel self-righteous about that”.

It’s in Leviticus: “A restriction enzyme that touches a plant chromosome shall not touch an animal chromosome, lest there be an abomination.” You can’t argue with a commandment like that. Why do you hate G-d?

This page was loaded Jul 4th 2009, 5:21 pm GMT.