Saturday, 12 July 2014

Watsonian

On waking this morning, I returned to the Watson of my first post of 10th July, starting out in a dream but eventually waking up to the extent of arriving here.

In the dream I was wondering about, simplifying a little, the various models of Rolls Royce cars (see http://www.rolls-roycemotorcars.com/, not to be confused with the people who make power plants). We suppose that the marketing chaps have arranged the various models in an array three deep and twelve across. The three deep might be, for example, three different styles of headlight. Further, that a buyer is allowed to chose a colour, perhaps with a different choice of colour scheme for each of the 36 models.

The task for Watson, on the basis of having looked at a reasonable number of cars from a vantage point on the outside, is first to be able to enumerate the various models available, second to be able to say which model some new car is and third to describe the various models in a way that a car enthusiast would relate to.

We suppose that Watson is equipped with two eyes, eyes which are capable of jointly scanning the car and so capable, by triangulation, of plotting the position in space of every point on the visible surface of the car.

We suppose in passing that the models are such that one can tell what model a car is from whatever reasonable angle that one looks at it. And we leave aside the business of getting enough images of any one model to be able to build up a complete picture.

That such plotting can be turned into a three dimensional array where each element of the array can be described as (surface as boolean, colour as string, transparent as boolean, edge as boolean). So the array describes a brick shaped portion of space and for each point in the array we can say whether or not it was part of the surface of the object being described, and if it is whether or not that bit of the surface is transparent (and so probably glass or some such), and if it is not what colour it is and whether or not it is on a boundary line of some kind on that surface. A boundary which might be, for example, that of the windscreen or that between two colours.

Exercise for the reader: would it be necessary or helpful for Watson to know about inside and outside? To be able to say of all points which were not part of the surface, whether or not they were in or out?

We suppose in passing that the colours can be picked from a list. That there are only a few dozen of them to bother about. No need to get into RGB tuples. No need to worry too much about the quality of the ambient light.

We suppose in passing that the cars are more or less convex bodies and that their surfaces are more or less topologically equivalent to the surfaces of spheres. That is to say they are reasonably straightforward objects which Watson can reasonably be expected to have a stab at.

Then how does Watson get from such an array, vaguely comparable to the output from the eye-side processing of vision in the brain, to the various models of Rolls Royce cars?

To make things a bit easier for Watson, we assume that all the cars have four wheels in the same place and that all cars have bilateral symmetry. This means that he can start on comparing two images by getting them to face the same way, superimposing the wheels and then seeing what he has got.

One could probably decide on this basis whether two different images were of the same shape. If the images had good resolution, one would not get very many models to the shape, maybe just one most of the time. We suppose that it is just one all of the time.

Allowing for a bit of noise in the system, Watson can then, given enough teaching cars, work out how many models there are and classify any inbound car to model. I think he would be able to do this without knowing anything much about cars at all. No domain knowledge to speak of.

But what about saying what it was that made one model different from another? How could he start to pick out relevant features of cars and say that this model had fatter headlights than that model? Would he ever arrive at the three by twelve array that the marketing chaps had come up with?

I dare say that, again given enough teaching cars, which would probably need to include cars which were not Rolls Royces, he could work out that there were common features, features that most cars shared. Things like headlights, windscreens, doors and door handles, to which he could assign his own names. He could perhaps ask his human teacher for the human names for such features, which names would help a lot with interactions with humans.

And having got this far, it would be interesting to talk to the Watson engineers to find out how they would actually go about it. Do IBM do tours?

Thursday, 10 July 2014

Pasta

Yesterday, for once in a while, was a pasta day. Something we did quite a lot of a while back, but nothing much recently.

Take three onions, chop finely and simmer in a little rape seed oil. After a while add a finely chopped clove of fresh garlic. After a further while take three large tomatoes, chop finely and add to the mix. Bring back to heat and simmer for a further quarter of an hour or so. No need to add water but there is need to boil off some of the tomato water towards the end of the quarter of an hour. But worth it, as tomatoes fresh work better than tomatoes paste - or, for that matter, tomatoes tinned, which last always taste to me of tin.

Take about 300g of corkscrew pasta. We use fusilli from Napolina. Fill saucepan with water and add three large stalks of celery, sliced crosswise. Bring to boil and simmer for ten minutes. Add the pasta and simmer for a further ten minutes, stirring occasionally, as necessary.

Meantime, take two medium carrots and slice crosswise, thinly towards the fat end. Add to the tomato mix, continuing to simmer while the pasta cooks.

Meantime, take 150g of Italian salami. We use milano from Tesco. Chop into approximately 1cm cubes and add to the tomato mix.

Serve with a light lettuce and cucumber salad, without dressing. Leave that sort of thing to continentals. We also prefer to serve the tomato mix to the side of the pasta mix, rather than on top of it. Furthermore, despite boiling off, the tomato mix is apt to be a little wet so best served with a perforated spoon.

Note the fine mix of reds in the completed tomato mix. All very arty. All followed by a fine riesling from Leitz of Rüdesheim am Rhein (see 49.992395, 7.922644) via Waitrose.

Quantities for two.

PS: continuing with Volume I of the Osbert autobiography (see 25th May), I read this morning that as a young child he used to like to be visited by his mother before he went to sleep at night. Perhaps bearing sweets (from the grown-ups' dinner) and perhaps in defiance of a disapproving father. Echoes of the vaguely contemporary Proust. Which prompts me to think of lots of other parallels between the two lives and works.

Watson

I mentioned Watson on 5th July and now get around to a more substantial mention.

The long name of this little book is 'Smart Machines: IBM's Watson and the era of cognitive computing' and the main author is one Steve Hamm, an IBM staff writer. A very US sort of book, full of optimism about how technology is going to save the world. A very company sort of book, full of short but edifying - rags to riches - biographies of illustrious IBM staffers and of tales of IBM contributions to the world. I read incidentally that they employ lots of mathematicians, so maybe I should have joined them, a blue chip operation which has remained in business, stayed the course, instead of joining the civil service! It was also an easy read which does not dig very deep into the technology, about on a par with an article in the Economist.

The story starts with a computer which I remembered as being called 'Deep Throat' but which was actually called 'Deep Blue', a chess playing computer which defeated the flashy world champion Gary Kasparov in 1997. It then moves onto 'Watson', a Jeopardy! (see http://www.jeopardy.com/) playing computer which defeated various important people on television in 2011. The first point of interest is that playing Jeopardy! is a lot harder than playing chess, which made me stop and think a bit. The second point of interest is that Jeopardy! appears to be the most successful & longest running television quiz game the world  has ever known, despite my never having heard of it. And all credit to IBM for having a crack at something which it was not clear at the outset that they were going to be able to do - and for going on live television with what they were able to do. However did such a thing pass me by?

The next thought is that rather than have computers playing against humans, we have them helping humans. So, for example, IBM and others are working away to adapt Watson to help oncologists, to help them make better use of the huge amount of information about cancer sculling around the world, far more than any human is going to get a grip on. How do we get Watson to cope with all this data structured or unstructured in a million and one different ways? I notice in passing that a plus point for Watson is said to be his ability to interact with the computer systems of health insurers, important as an oncologist needs to get any proposed course of treatment OK'd by the customer's health insurer before (s)he can go ahead. Not quite how we do things over here, at least not until Cameron and his crew have finished with us. (Although we do need to remember that someone has to do the rationing bit. Maybe I don't want an insurance company doing it, but someone has to).

Next question, how do we cut down on the huge amount of human input which was needed to teach Watson how to play Jeopardy!? How do we teach computers to teach themselves and save us the bother?

Then the argument is that we need to move processing out to the data, to blend process and data rather in the way that a human brain does. Which reminded me of the CAFS (content addressable file store) which was being promoted by the company then known as ICL back in the eighties of the last century and which, according to Wikipedia, had its problems and was eventually killed off by increasing central processor speeds; it became quicker to move the data to the central processor and look at it there, rather than to look at it on the disc. The IBM argument seems to be that stagnating processor power combined with rapidly increasing data volumes mean that this is no longer true.

Then we have an aside about something called the Cognitive Enterprise Lab, a fancy computer assisted meeting room which sounds very much like something called the Pod invented by guess who, back in the eighties of the last century - ICL. Maybe lots of people were playing with the things at that time and maybe the time has now come when they might work. Maybe the COBRA room in Whitehall we hear so much about is one of them.

Before moving onto the need for computers to understand stuff from our five senses - sight, sound, touch, taste and smell - as well as they can understand words now. And to soak up all the stuff swirling (or perhaps swilling) around the mobile phone networks. Ten years from now, for example, the chic thing to wear might be a head mounted smell sensor, smelling and recording everything that the wearer smells. And then doing something useful with all this stuff. Perhaps the sort of thing an industrial chemist ought to wear when touring his factory, perhaps with some kind of a display to tell him about anything odd.

And to power all this we are going to need a new kind of chip, something that gets around the physics barriers that our chips are hitting just presently. Maybe a chip made of neurons like a brain rather than transistors like a radio. Go parallel processing down at the level of the chip rather than pretending at some higher level. Somewhere I read that provided you keep your wires at least ten molecules thick, the current in the wire still behave like the currents we learn about at school. Go under ten and you go quantum which is a whole new world.

Along the way we get glimpses of applications to help me decide which new car to buy, to help build giant radio telescopes, to help manage country wide power grids and to help manage large cities. Which last resulted in a waking wonder this morning about what happened when one had a computer model of a city which was interacting with the real city in real time, perhaps managing the traffic lights and the dispatch of police cars to hotspots. What is the relation of the model to the city? Who is in charge? Are the model and the city in symbiosis? What about the computer model of the city including a model of itself? By which time I had woken up, which was perhaps just as well.

But a good read, well worth the money. Maybe I shall return to it when I have read it again, a bit more carefully.

Wednesday, 9 July 2014

Dying with dignity

The DT ran a large piece by Charles Moore on dying with dignity last week (July 5th), the first that I have seen which is against legalising assisted suicide for those who, for some good & sufficient reason, have had enough.

The piece comes in four columns, the first two of which are scene setting waffle. The third column points to the sometimes poor quality of care for the elderly, taking a swipe at the NHS while he is at it (this is the DT after all). The fourth column explains that, if we make it possible to assist such suicide, such assistance will become the norm. That the old will feel that they have become a burden, that everyone expects them to go and that they will, in consequence, go before their time.

To which I offer three answers.

First, most of us will be content to die of natural causes; for most of us palliative care will do the trick. But there will be some, and I suspect there are always going to be some, for whom palliative care is not enough and who want to call a halt to the misery. Perhaps as many as a few hundred a year in this country - and Moore does not offer anything for them. I observe in passing that it is ironic that a gentleman of the right, generally inclined to deplore government interference in matters large and small, should be advocating government interference, that is to say government prohibition, in this matter.

Second, I do not think many of us would allow ourselves to be pushed into suicide, assisted or otherwise, in the way that Moore suggests. Most of us are far too keen on living and far too frightened of dying. And the proposed protocols should provide adequate protection against any pushing that there might be.

Third, there is no evidence of abuse of the right to assisted suicide from those places where it is legal, for example in Oregon, where it has been legal for many years now. And it is hardly going to be difficult to keep the sort of records needed to be sure that there was no systematic abuse (to say no abuse would be going too far, no system is going to be perfect). Just keeping an eye on the annual totals would go quite a long way towards providing the necessary reassurance to those unconvinced by my second point.

Tuesday, 8 July 2014

Midsonian

Earlier in the year (see, for example, 20th February) we built the Morsoleum and it has done good service since. But it is now, after heavy use, in need of a break and we have started work on the Midsonian, with the start being triggered by a chance purchase of series 1-4 of Midsomer Murders from a nearly-new-to-us charity shop. Comprising no less than 2 boxed sets and not forgetting the pilot episode.

We watched the pilot episode last night, which we are fairly sure we have seen before as all the occasionals were familiar, but of the plot of which we could remember nothing. Which does not say much, as we have difficulty these days remembering enough of the plot to understand what is going on during a viewing, never mind about between viewings.

Interesting not least for a take on how the show has moved on since inception.

In the pilot episode, we got some water colour vignettes of village life during the opening credits, a reasonably regular ploy at the time, now vanished.

The music was recognisably what we get now, but rather lighter, a bit more jolly. Someone clearly decided that portentous and pretentious was more the thing.

Towards the end, taking a leaf from the Morsoleum, we get some recognisable glimpses of Cambridge. Maybe someone decided that this was all a bit too derivative as we didn't get another glimpse as the show rolled on.

The sergeant is shown as very young and crass, both qualities rather rapidly watered down. Quite right too, rather irritating. Quite enough young and crass in the real world.

The chief inspector talked rather a lot about his pilot case with his family, also rather rapidly watered down, on the advice of the police procedural advisor.

The number of directors grows from three to four between series 1 and series 2 while the number of writers grows from three to eight. The show is gathering weight and speed.

Last but not least, I had known that Mrs. Nettles was a casting director by profession, but I had not known that she was casting director for this.

I was left wondering how much film was made before what became the pilot episode. Were there several pre-pilot episodes or is that all too expensive? On what basis does someone commit the considerable funds needed to produce a screenable pilot? Is there a university of the fourth age course on soap making which would throw light on these interesting matters? Judging by the amount of soapy material in Wikipedia, I am clearly not the only one to find them interesting.

PS: 1: not altogether clear how many books there are. Amazon seems to run to about half a dozen. Order of magnitude less than the 100 or more episodes which have been screened.

PS 2: I read this morning in Osbert (vide supra) about a collector who took his books very seriously, boxed sets not having been invented at the time. In the case of an important book, he would have one copy for show in his library, one copy for use in his study and a third copy to lend to his friends. At the time of his death, I think some time in the eighteenth century, he was said to own some 150,000 books scattered over 8 houses (in more than one country) and sundry lock-ups.

Monday, 7 July 2014

News from Dundee

Further to the first post of 5th July, the cake came out of the tin OK, this being made a lot easier by it being a loose bottomed tin. Quite a shallow cake, maybe 2 inches deep in this 7 inch tin. Maybe two or three millimetres of brown outside, over the yellow crumb inside.

Left it to cool, stored it overnight and then tried it out yesterday evening.

The dried fruit and glacé cherries had not sunk to the bottom of the cake, such sinking being a common failing with such cakes. So far so good.

Quite a crumbly and quite a dry cake. Flavour quite good, not spoilt by it turning out that I had put twice as much grated orange rind in the mix as was specified in the recipe - a whole orange's worth rather than half an orange. Must try harder to read things, rather than to skim them. (In which connection, I have recently noticed a tendency to read a paragraph as a block, rather than reading it serially, one word after another. It seems reasonable enough that the brain, with its massively parallel processing, should do this, even if the subjective reading experience is not, in consequence, quite the same. Maybe what is happening here is that I have always been reading in blocks, but now the process is starting to break down so I notice).

I had used the Whitworth's recipe which, looking at other recipes, is a small cake - 6 ounces rather than 8 ounces of flour - cooked for a short time. Maybe a bigger cake, cooked at a lower temperature for a longer time would work better? Maybe a tin of water at the bottom of the oven, something that BH does for heavier fruit cakes, like Christmas cakes? Something which did not work at all well in the context of the much higher temperature bread baking, with the oven refusing to come to heat with all that water in it.

We will give the matter further consideration as we move on into the cake we have in hand now.

Saturday, 5 July 2014

Amazing amazon

This being prompted by a review of 'The Everything Store', an account of the rise of Amazon, in a recent NYRB. In what follows I leave aside that now large part of the Amazon operation which is not books.

One the tone-setting allegations in the review was that (as of early June) Amazon were making it difficult to buy this book, but it seems to be alive and well and available today in a kindle edition for £6.99, so maybe one should read the review with care.

Nevertheless, I am reminded of the famous phrase from Lord Acton about how power corrupts (see September 22nd 2007 and October 21st 2008 in the other place), a phrase which must surely apply to Jeff Bezos: no-one can have the power he does without being corrupted in the process - one of the very good reasons why most countries do not allow their leaders more than two bites at the cherry. That said, not clear what form the corruption does or might take in this case.

The story seems to be that Bezos spotted an opportunity and went for it, providing a very efficient and very cheap service for a very large number of customers in the process, a service which is good enough to keep the anti-trust people at bay. One way he is able to do this is by squeezing publishers - who are now in a very poor bargaining position - and another is by squeezing his workers. So far so like WalMart. Nor does the company pay much tax, despite its huge turnover, but then it does not seem to make that much profit, at least not from what little you can make out from their published accounts. Nor does it pay dividends to its stockholders, with its investor relations page announcing that 'we have never declared or paid cash dividends on our common stock. We intend to retain all future earnings to finance future growth and, therefore, do not anticipate paying any cash dividends in the foreseeable future' - so I don't think I will be stumping up $337.49 for a share any time soon. But it does appear to finance the Bezos ambitions for space travel through an outfit called 'Blue Origin' (see http://www.blueorigin.com/). Motto 'Gradatim ferociter'.

I am also reminded of the phrase that says you don't get to be a big cheese by being nice. There is clearly a lot of aggression out there.

So, despite the good service I get from Amazon, I worry about the use that it will make of its market power. Will the squeeze on margins mean that publishers will gradually pare down the quality of their offerings? That the digital offerings will never match that of the paper ones? I have, for example, formed the impression that a proportion of the digital books are poorly wrapped, that in a digital version of an old book one may not get too much apparatus to help one make sense of it, the sort of thing you do get in a good quality paper book. And will the kindle people ever get around to doing a proper job on on fiction?

I close with a minor moan. I do not buy kindle books that often and my kindle is not very wifi so I like to download my kindle books to my kindle via my PC. The minor moan is that, while I seem to have acquired a Kindle Cloud which I can use to read my purchases on any internet capable PC (which is good), I also seem to be losing touch with download (which is bad). I have to fiddle about to do it.

PS: as it happens, my last kindle purchase was from another very large company, IBM, and is about their drive to take computing to the next level. Part of which goes under the name of Watson, a nice conflation of Conan Doyle and the founder. There was quite a high charge per kindle page, but not that many pages and so far an interesting and easy read.