Tuesday, January 28, 2020

A conversation with Alan Turing

I was recently rummaging around some old half-completed projects when I came across an idea for a chess-playing computer program that had been lying around for years. It hinged on a single hunch that I thought might be worth exploring, but before I can explain that I need to provide a bit of background on how chess-playing programs work.

The classic chess playing program (chess engine) relies on two basic ideas:

The Search. For any given position, the program examines all the legal moves available and, for each of these moves, looks at all the moves available to the opponent and, for each of these in turn, looks at each of the possible responses. As there might be around 30 moves to choose from at any one time, the number of possibilities rapidly grows to be in the millions so eventually you have to stop, at which point, we come to the second idea:

The Evaluation. For every possible outcome in this rapidly branching tree of moves and counter moves you work out a score for the position - high if the side whose move it is is winning, low if it is losing. All that remains is to choose which of the first moves is the one that leads to the position with the highest score.

Evaluation functions differ from one chess program to another but they all examine the layout of pieces and calculate a score based on a number of factors - the first being a simple totting up of pieces that remain on the board. Others factors typically involve looking at the placement of pawns (pawn structure), whether major pieces are in strong, central positions and so on. There are many variants and it is probably true to say that chess engines are primarily distinguished by their evaluation functions. Nevertheless, given the evaluation has to be repeated millions of times, it needs to be fairly succinct.

My own idea for a chess program proposed an extremely straightforward (and fast) evaluation function that simply counts the number of moves available to each side and calculates the difference. Of course, since capturing a piece immediately eliminates it from making any further moves, the hope was that my program would automatically try to make captures as a consequence of minimising the moves available to the opponent. The appeal of checkmate is even easier to understand, as that occurs when the losing side has absolutely no moves left.

So in mid-December I set about trying to write my engine which I had decided to call Moby on account of the fact that the evaluation function measures mobility.

I didn’t start from scratch but from a previous well-documented engine called Vice which I partly rewrote and adapted over the course of a few weeks. It took me longer than expected, as my programming skills have grown a bit rusty.

I embarked on this adventure in the drab, gloomy days following the election, possibly as a means of distracting my thoughts from the prospect of 5 more years of Conservative government. And so, as each dreary, rain-sodden day was followed by the next, through long nights when every line I wrote seemed riddled with errors, I began to question whether the project was less a genuine investigation and more an attempt to prove that I had still got it when it comes to programming (or coding as it is called these days). And each night, as tiredness took a grip, I would take myself to bed only to lie, raking through the code in my head, in search of what was going wrong.

But I did get it working eventually and what a strange game of chess it played. For example, when considering positions in which a rook happened to have no immediate moves available (as is often true near the start of a game) it was quite happy to sacrifice it in order to let another piece move into a slightly more open position. It wasn’t all hopeless however; it would occasionally make a clever move. I began to see that some of the more ridiculous mistakes could be avoided by combining mobility with a simple count of the pieces remaining on the board.

So have I gone ahead and made this improvement? Well no — but I probably will. But that’s not the point right now because here the story takes a different turn.

I thought it might be a good idea to share my investigations with the world or, more precisely, the chess programming forum on a website called TalkChess, and so I submitted a contribution describing my approach and invited people to make comments. I had a number of responses the majority of which could be characterised as:

“That’s interesting but it’s unlikely to get you very far.” 

Another person wanted to know what it was that had drawn me to such an austere choice of evaluation function to which I responded that it was largely aesthetic, or the appeal of seeing complex behaviour emerge from a simple rule.

But it was one of the later responses that I found most enlightening. A respondent from Germany (Gerd Isenberg) wrote:

“Maybe you aware that programs like Barricelli’s Freedom and Marsland’s Wita used mobility as the evaluation term.”

I replied that I was not aware of these programs, to which he replied

“Yes, the idea of using mobility in evaluation is old. Also note Slater’s ‘Statistics for the Chess Computer and the Factor of Mobility’ and the discussion with Alan Turing.”

My interest was immediately sparked by mention of Alan Turing, widely considered to be ‘the mother and father’ of theoretical computer science and artificial intelligence. The discussion referred to was documented under an item on Eliot Slater who, as well as having an interest in a chess playing machine, was mainly known as a psychiatrist with some questionable views on eugenics. Slater, it appears, felt that mobility was a key indicator of the strength of a chess position and suggested that a chess playing machine programmed to maximise its advantage in mobility would play a strong game - just as I was speculating.

To this, Alan Turing replied:

“Although the immediate mobility is a useful measure of the relative advantage of the players in normal play it by no means follows that it is wise to direct one's play to maximising such a measure. To do so would be like taking a statistical analysis of the laundry of men in various positions and deciding, from the data collected, that an infallible method of getting ahead in life was to send a large number of shirts to the wash each week.”

So that’s that - done and dusted. I’m not inclined to argue with Alan Turing and in any case his laundry simile, despite being somewhat quaint by today’s norms, is pretty deflating.

But the startling fact is that the discussion between Slater and Alan Turing took place 70 years ago, in 1950, at a time when the number of computers in the world could be counted on the fingers of one hand! The whole episode felt like an immense cycle that had taken an unexpected turn and had transported me back to the time of my birth. And despite the fact that my speculations appeared to have been thoroughly dispensed with around the time I was learning to walk, I was left with a feeling of quiet contentment - happiness even.

Maybe it also had something to do with the fact that the sun had begun to shine again, bringing a lightness in the air and the first intimations of spring.

Monday, January 20, 2020

A souvenir of Venice

Whenever I go on holiday for more than a day or two I like to seek out a special object, delicacy or suchlike to bring back home with me. If I go up to Lancashire, for example, there’s a very good chance I’ll come back with a black pudding. On one occasion, having been seduced by the intoxicating delights of Stockport covered market, I brought some tripe back, in the belief that some deep Lancashire part of me would instinctively know how to go about eating it .... it didn’t

Thinking further afield - each destination offers its own unique and fascinating souvenirs.

In Hong Kong you can buy a bottle of wine with a dead snake coiled up inside it. At first it might seem an ideal souvenir — at least until you  have the presence of mind to realise that, in some desperate or tormented state, you might be driven to drink it. 

Venice presents its own peculiar difficulties in the souvenir department. To kick-off,  there are those carnival masks, ranging from a number of variations on the pale courtesan theme to that other slightly sinister one with a long, drooping proboscis - or is a beak? But then what would you honestly want to do with a carnival mask?

“I could wear it at parties” you find yourself thinking. But then you know for sure that, when it comes to it, it would never feel quite right. And what else is there to do with a pair of carnival masks other than to mount them at a jaunty tilt on either side of the chimney breast ?

No - the carnival masks won’t do.

Glass, maybe. Since the thirteenth century Venice has produced a steady stream of exquisite glassware - most of which has since been accidentally broken. Today the descendents of those early glassmakers churn out a dazzling variety of objects  — mainly ghastly, except for the chandeliers which — you may confidently have it from me —  are gorgeous. I briefly tormented myself with the thought that I really owed it to myself to buy a chandelier, despite the fact that they can cost as much as a decent secondhand car. This is in Venice, of course. I have since seen the selfsame items on-line for a fraction of the Venice price. But hey, hang on: this is beginning to sound like one of those conversations overheard whilst in the queue for passport control. I’m meant to be thinking about souvenirs and whether glass might do … and no, it won’t.

There are nice paper-style goods in Venice. There’s that lovely wrapping paper printed with Rococo designs and if I were to buy some, I would take it home and I would squirrel it away carefully; and later, after my death, my children would discover it and recount to others: “There were drawers and drawers full of exquisite Venetian wrapping paper. I don’t know whether he planned to do anything with it or whether he just enjoyed it for its beauty. It broke our hearts to take it to the recycling.”

So that’s the  paper out as well.   

In the end it was a hat.

Right from the start of our holiday, on the waterbus that carries you across the lagoon from the airportI had noted that our driver was wearing an interesting woolly hat that would have been a perfect fit had his head been the shape of a rugby ball. As it was a normal head, the empty, surplus bit of hat was left to droop backwards in a manner that invoked images of generations of lagoon-dwellers, netting wildfowl on damp, misty mornings; of renaissance merchants and even Bellini's famous portrait of Doge Leonardo Loredan (except in his case the spare bit is sticking up, suggesting there's a bit of cardboard inside it )

So the hat it had to be.

Finding it proved to be harder than I first imagined - the problem being, it wasn’t a tourist item. But then, having to track it down, scouring the outdoor markets and department stores that somehow manage to cling on to the less fashionable fringes of the city, lent the whole quest an extra level of romance. I found one at last, hanging outside a hardware store and costing a couple of euros and for the rest of our holiday enjoyed swaggering around the decks of vaporetti in the hope of being mistaken for a deckhand who had just finished his shift and was on his way home.

I still have it. It’s a nice hat.

Monday, October 28, 2019

The Embodiment of Architectural Space

In my architectural work, I am aware of a number of private ‘instincts’ that I repeatedly draw upon in reaching design decisions. This has been true for some time and I have never given it much thought.

Recently however, I found myself pondering on what these ‘instincts’ amount to and whether there is a way of thinking about them. A key indicator was the simple fact that successful designs are frequently those in which people are presented with spaces that are rounded.

This led me to a speculative model based on the idea that, when interacting with our physical environment, our minds continually construct a hope or expectation that is fulfilled to a greater or lesser extent by our real world surroundings.

The fruits of these speculations are contained in a longish essay: The Embodiment of Architectural Space which I have just published on Medium.

I consider the ideas I explore to be fairly radical – though naturally, you will ultimately be the judge of that.

If you have 20 minutes to spare you can read it here:

Thursday, September 19, 2019

Snippets from America - a different kind of car

On the subject of cars, this is an Oldsmobile, Dynamic 88 convertible, spotted at the Olmsted Point pull-in overlooking Yosemite Valley. It is possible the late afternoon light had something to do with it but it was simply one of the most beautiful artefacts I have ever seen - a relic from a time long gone.

For those interested in details, you might note that it is graced with a fine set of furry dice.

Snippets from America - road manners

Once we get back home from our holiday in the US I can see that we will need to watch our step on the roads - both as pedestrians and drivers - as we have grown accustomed over the past month to American road manners. 

Of course most people, at different times, are both drivers and pedestrians, though to observe people’s behaviour on UK roads you’d never think it. In the UK it’s as if the category of road user you just don’t happen to be right now, suddenly becomes a figure to be feared or despised. When in the pedestrian mode, for example, we loathe drivers who lurch threateningly forwards the instant the lights have changed whilst, as drivers, we become enraged by pedestrians who have the misfortune to get in our way. 

In the US the situation appears to be entirely different. It’s as if the contract between motorists and pedestrians has been rewritten. In towns, cars travel slowly and sedately along wide streets. Pedestrians don’t stray across the road, people wait for the ‘walk’ sign at crossings and in return motorists give way whenever it appears there is any doubt as to the right of way. It’s refreshing, civilised and (I imagine) safer.

Friday, September 13, 2019

Snippets from America - the last of the dinosaurs

As we travel across the American West (and much to Mrs. Wormwood’s embarrassment) I have taken to asking owners of giant cars if I can pose in front of their magnificent vehicles. They are invariably flattered and turn out to be the sweetest of people. 

For those keen on technical facts, the black car above is a 6.7 litre Ford Superduty 350 pickup (fitted with the excursion modification). The elderly owner of this monster was quite small in stature and had some difficulty climbing in and out of the cab. 

Snippets from America - learning from Las Vegas

Learning from Las Vegas is the title of a book published in 1972 by Robert Venturi, Denise Scott Brown and Steven Izenour. The three were teachers and research students at the Yale School of Art And Architecture and their book proved to be highly influential in defining architectural Postmodernism. 

The position they took in analysing the Las Vegas is an interesting one. On the one hand, they appeared to be in agreement with everyone else that Las Vegas is the very epitome of artificiality, materialism and bad tasteand yet there was the accompanying view that, in the right hands,and with a generous measure of sophisticated irony the same superficiality and stylistic eclecticism might serve as the inspiration for a new architecture. 

In time, the book came to bear architectural fruit not so much in Las Vegas itself but in the business centres of New York and the City of London. Architects were encouraged to consider crass environments like the Las Vegas Strip, and to distill from them both elements and methodologies that they would go on to apply in entirely different contexts. For an extreme example of this kind of transplantation there is probably no better example than the MI6 headquarters building on the south bank of the Thames. 

During our own short trip to Las Vegas I was impressed by something quite different and that was the degree to which the various hotel-casinos along the strip - each of them representing some fabulous past culture or fantasy: Caesar’s Palace, the Luxor (ancient Egypt), the Venetian, Mandalay, Treasure Island - how, despite the crassness of these representation (where else could you see the Venice campanile, cheek by jowl with the Rialto Bridge?) how despite all of this, they genuinely succeed in creating an environment in which masses of people seem to enjoy something of the same ‘bread and circuses’ escapism enjoyed by the citizens of Ancient Rome. 

So, for me, I am inclined to take Las Vegas on it’s own terms - or preferably not at all. We were there for less than 24 hours and, though it was an unforgettable experience, it was more than enough. 

Monday, September 09, 2019

Snippets from America - National Forest typeface

We’re travelling in the USA and I was intending to write a number of blogs along I the way but there is something wrong with the blogger interface on the iPad which means you can’t see more than one page of text, so, rather than beat my head against a brick wall I have decided to keep my posts short. This will no doubt come as good news all round. 

One of the first things I noticed on our travels was a simple typeface used on signs in the National Parks. When I saw this sign in the Sequoia National Forest it gave rise to a whole flood of memories and impressions. The style of lettering seems so familiar, old-fashioned and oddly reassuring and yet where do these memories originate? Could it have been in old, secondhand copies of the National Geographic magazine, pored over in dentists’ waiting rooms? Or was it in an old film from the 50s? Whatever the answer, it is one that is coloured in hues of Kodachrome. 

Monday, August 12, 2019

A Halloween premonition

There are two sorts of Brexiteer: the Idealists, as found in UKIP and the deeper recesses of the ERG, and the Opportunists - the ones who are currently occupying 10 Downing St. It’s the second lot who worry me most.

The Idealists are fixated on a significant point in time: the moment when Britain casts off the shackles of EU membership and bravely embraces the dawn of a new Golden Age. There will be difficulties, they admit, but having boldly stepped across the threshold, we can all confidently look forward to a glorious future.    

For the Opportunists, on the other hand, Brexit is merely a small piece in a much larger plan. While the Idealists may be genuinely convinced that post-Brexit Britain will be a better place, the Opportunists have bigger fish to fry. They secretly see the disruption and hardship of a No Deal Brexit not as a threat but rather as a softening-up exercise on the path to a wider goal. It is no good trying to persuade such people that crashing out of the EU will result in empty supermarket shelves, queues on the motorways and power cuts. They already know this and, what is more, they welcome it. 

Picture this: November 1st and Boris Johnson is still Prime Minister - Labour having stymied hopes of a Government of National Unity. The UK has crashed out of the EU and everyone is beginning to feel nervous. Within days problems begin to arise - many of them resulting from a pervasive sense of uncertainty which, in turn, gives rise to defensive behaviours, panic buying etc. There’s an increase in the number of public order incidents, blame being directed at remainers who — it is rumoured — are deliberately sabotaging the  process of transition. In turn the remainers cry “I told you so” while quietly hoping for the best. Within a week or two gaps begin to appear on supermarket shelves. At first it amounts to little more than a narrowing of choice but it quickly moves to the point where the supply of essentials appears threatened. As the days grow shorter, power-cuts become more frequent. Most people begin to suffer a sense of unease; others are genuinely fearful. 

Then one morning, just when things are starting to look really bad, Boris Johnson, with Liz Truss at his elbow, appears on the media to announce that Britain has concluded a comprehensive trade deal with the US and that the sunlit uplands are finally within sight. It’s incredible; it’s almost as if it was all planned in advance. A week later, supermarket shelves are replenished; and while choice is a little more restricted, it’s so cheap! 

Everyone is happy and relieved. It was just like they said it would be: “An unavoidable short period of adjustment, followed by the long-awaited rewards”. Waitrose shoppers might be a bit grumpy about having to pay more for their French Wine but then, as we all know, the appreciation of fine wine is about far more than mere affordability. 

In the general election, held after long delays and constitutional shenanigans, The Tories, under Johnson, are swept to power with an unassailable majority. The opposition parties don’t know what hit them.  

Game over — or at least that particular one. In reality it is just the start.

Saturday, August 03, 2019

Dominic Cummings - Boris Johnson's Éminence Grise

An Ă©minence grise or grey eminence is a powerful decision-maker or adviser who operates behind the scenes or in a non-public or unofficial capacity

Having watched the Channel 4 Drama, Brexit: The Uncivil War, I feel I know Dominic Cummings rather well. In fact, Benedict Cumberbatch’s portrayal of Cummings was so convincing that I am happy to accept it as as the real thing. I’d go so far as to say that I honestly can’t imagine Cummings doing himself any better.

This is made all the more persuasive by the fact that Cumberbatch is identified in the public imagination with Sherlock Holmes. So the character we all saw leaning against a door frame in 10 Downing Street on the first day of Boris Johnson’s premiership was none other than the legendary resident of 221b Baker Street, invited to apply his powerful intellect and sharp eye for detail to the task of getting Brexit done. The illusion is one colluded in by the media, admiring colleagues and quite possibly by Cummings himself - Benedict Cumberbatch being — it has to be said — a very attractive and impressive individual. 

You might view all this this as little more than whimsy, but it is worth noting that Dominic Cummings is already being referred to as a genius - and not only by his political associates. 
What is undoubtedly true is that the genius stereotype, namely that of an individual blessed (or cursed) with great insights while simultaneously  lonely, self-conscious and socially inhibited, appears to hold a fascination for many people and Cummings clearly fits the bill.

Of course the aura of genius surrounding Cummings was greatly strengthened when, against all the odds, he engineered the British electorate into voting to leave the EU - an outcome that left even the politicians fronting the Vote Leave campaign shocked and disoriented. If such a mind could be persuaded to apply itself to the mundane matter of delivering Brexit — so the thinking goes — we might hope to put the whole nightmare behind us.

For those wishing to find out more about what Dominic Cummings thinks, he has conveniently published a blog and a long paper: Some Thoughts on Education and Political Priorities in which he explores many of the ideas that interest him. The first thing that has to be said about this material is that there is an awful lot of it. The paper, written in 2013, incomplete and running to 237 pages, reads like a mash-up of current trends in scientific, technological and sociological thinking. The range of topics is huge - the following being a partial list: pure mathematics, the standard model of particle physics, complexity, emergence, self-organisation, chaos theory, synthetic biology, energy policies, game theory, space exploration, computer science, quantum computing, artificial intelligence, digital fabrication, modeling and simulation, genetics, biological engineering, education, virtual reality, augmented reality, economics, politics, psychology and philosophy.  He has clearly done an immense amount of reading across a vast expanse of contemporary theory and the end result is something resembling a trophy cabinet, calculated both to impress and intimidate. This is not to denigrate Cummings’ understanding of these topics. I have ventured into this jungle on a number of occasions and it is a rich source of ideas, some of which I am already familiar with - others that are new and intriguing. At the same time, there is something faintly disconcerting about the sheer magnitude of material and the unstructured manner of its presentation. 

Reading Cummings brings to mind a cinematic trope frequently encountered in thrillers: you know, the one where the protagonist discovers the lair of the serial killer (who incidentally is never at home) only to find the walls covered from floor to ceiling with mysterious photographs, diagrams, calculations etc. and marking the moment when the true, horrifying extent of the other’s insanity becomes suddenly and undeniably apparent. Now I am not suggesting for a moment that Dominic Cummings is an evil genius any more than I am ready to acknowledge him as a genius plain and simple. All the same, David Cameron’s characterisation of Cummings as a ‘career psychopath’ has a peculiar resonance.

There is a serious point however and it is this: amongst all Cummings’ exposition of ideas, technologies etc. there is no trace of a guiding ethic, no acknowledged beliefs or principles. His thoughts are almost exclusively confined to the applicability of sophisticated mathematical models, visualisation techniques and computational tools to problems of government. In a very real sense, Cummings has weaponised the fruits of his researches and appears willing to put them at the disposal of interests whose aims are only too explicit. For his part, he demands only two things:

1. That the stated goal is deemed susceptible to an engineering approach and
2. That he is given sufficient scope and freedom of action to promise a successful outcome.

There is an unspoken assumption behind his thinking however, namely that problems in the social domain: education, politics, the economy and so on are, in essence, no different from the more complex areas of the physical sciences such as weather-forecasting and the modeling of turbulent flow; and that while the available formal models might be somewhat limited, there is nothing in the social domain that need be impervious to successful manipulation by a sufficiently sophisticated intelligence. The ends justify the means so the saying goes, but in Cummings’ case one suspects it is the other way round, namely that The effectiveness of the means, validates the end.

Nevertheless, when it comes to his recent appointment, Cummings' stated mission is to deliver Brexit by any means necessary. Given the undoubted challenge that this represents it should come as no surprise that one of the conditions of his acceptance is that he should have a veto over the appointment of ministerial aides. Never having been a member of a political party himself, he makes no secret of his disdain for politicians, describing former Brexit secretary, David Davis as ’Thick as mince, lazy as a toad and vain as Narcissus’, Ian Duncan Smith as ‘incompetent’ and ERG members as ‘useful idiots’. It seems likely that he will control ministers (on Boris Johnson’s behalf) with ruthless efficiency - transforming the principle of collective responsibility into something more like cowed obedience. One has the sense that there is no way back for ministers now. If they want to keep their jobs they have no alternative but to drink the Kool-Aid and try to come up to speed on at least a few of the funky new topics that make up the Cummings currency.

Both Dominic Cummings and his master, Boris Johnson could be accurately described as exceptional - neither is cut from the common cloth. The extent to which their very different characters intermesh suggests a game plan in which Boris works parliament, the media and the crowd whilst Cummings runs the back room operation. Boris, it is fair to say, is a self-assured communicator with a significant capacity for charm and buffoonery calculated to win support in the most unlikely quarters. However, as is tacitly acknowledged on all sides, beneath the bumbling there is a complete lack of substance and no trace of belief, moral or political principle. Not that this matters much, as there are others with perfectly clear agendas of their own whom he is prepared to serve, in exchange for the trappings of power.

The thing I am not fully  convinced about however is the importance of the Brexit project itself.  It is more likely, I imagine, that the real mission to which Dominic Cummings has been invited to apply himself is to ensure Boris Johnson enjoys a long premiership, during which he can make his mark on history alongside Churchill or Margaret Thatcher.

As far as Cummings himself is concerned, I have come to the conclusion that, while his interest in mathematics, science and technology is undoubtedly fascinating, to attempt to criticise him with reference to these ideas would be pointless. It is not a matter of debating truth or falsehood but of confronting a closed, self-referential system. It would be like trying to have a sensible discussion with someone who believes that shape-shifting lizards are taking over the earth — you’re never going to win.

No — in assessing Cummings’ contribution to the future of our country I prefer to adopt an altogether older, time-hallowed principle: by their fruits you will know them.