Since it's the 30th anniversary of the ZX81 computer, I thought I'd write about what I think is one of the most amazing pieces of programming ever: 1K ZX Chess.
In 1983, David Horne wrote a program that would play a game of chess that ran on the Sinclair ZX81 computer using just 1K of memory. As one of the smallest versions of the game to have a visual display of the board, it stands as a remarkable achievement. If sculpture can be described as starting with a block and whittling away anything that doesn't "feel" like the thing you're trying to create, then David has done something similar to the ZX81's tiny memory. It's hard to believe that there's a single byte left in the program that doesn't have some element of “chessness” to it.
Of course, to fit the greatest game ever into such a small space necessitated certain limitations. The program always plays as white and only makes one of two opening moves, depending which side of the cassette was used to load the game... king's pawn to king's pawn three (van't Kruijs' Opening), or queen's pawn to queen's pawn three (Miese's Opening).
The artificial intelligence of 1K ZX Chess could only look one move in advance, and the program had no concept of the newer rules of the game (ie, after the sixteenth century) such as castling, en passant, and promotion of pawns. Nevertheless, within these 672 bytes of code lie the barest bones of chess, as if this is the absolute zero of chess and below this it cannot exist in any recognisable form.
Playing the game isn't that satisfying, as it has a fondness for moving the rook back and forth between a1 and a2. If you want to break this cycle then you have to attack the square a2, and only then does it turn its attention to other things. So it's possible for it to play a good game, but only if the human opponent acts as a kind of sheepdog, guiding it towards the right move. Or at least away from a really wrong one.
If it takes one monkey seventy thousand years to type “TOBEORNOTTOBE”, then how long before 1K ZX Chess accidentally plays like a grandmaster? Having no memory of the previous game to learn from, it would be a fleeting success, never to be seen again but is there at least the potential for this game to mimic the style of every master who ever studied the game? I hope so. In one game, it suddenly pushed its queen into the fray in what seemed like a very bold and romantic move. It didn't last, though, but for a moment I felt like Prof Higgins in My Fair Lady, and I wanted to call out “By George, I think it's got it!”
(Oh, and here's a blog post in which 1K ZX Chess goes up against a newcomer to the 1K chess world, Tiny Chess.)
Friday, 11 March 2011
Tuesday, 8 March 2011
The Speech Puppet
Wolfgang von Kempelen (1734-1804) is perhaps best known as the designer of The Turk, an automated chess-playing machine which amazed the wealthy and the wise in late 1700s Europe. It was a fake, but nevertheless brought him a lot of fame during his life.
More impressively, he invented a machine that could speak. He began working on it in 1769, and slowly perfected it over time. Charles Dickens wrote about it (in 1870, so probably working from second-hand sources)
“Having combined the results of his researches, he constructed a head which contained the requisite wind-tubes and vibrating reeds, and a bust provided with some kind of bellows. Thus armed, his automaton could pronounce the words “opera,” “astronomy,” “Constantinople,” “vous etes mon amie,” “je vous aime de tout mon coeur,” “Leopoldus secundus,” and “Romanum imperator semper Augustus.” These words were spoken when the machine was wound up, without any player being required to press upon keys and pedals.”
A more contemporary source (although I forgot to note the source) records:
“When Widisch heard the device he said it answered ‘clearly and distinctly’ in a ‘sweet and agreeable voice,’ but that it pronounced the letter r ‘lispingly and with a certain harshness.’ He added, ‘When its answer is not perfectly understood, it repeats it slower, and if required to speak a third time, it repeats it again, but with a tone of impatience and vexation’.”
(A nice example of how people can read emotions into inanimate objects, by the way.)
These days, it seems that a full working model of Kempelen’s machine doesn’t exist, although on YouTube there is a reconstruction which needs to be manipulated by hand for it to work. It says little more than “mama” and “papa”, but perhaps given time and a little practice, some of Kemplelen’s lessons could be re-learnt and some dexterous operator could make the machine speak again.
Thursday, 24 February 2011
Clever King
During the 1600s, it was thought that the touch of the British monarch had curative properties. It is said that Charles II touched a hundred thousand subjects during his reign (more than 8,000 in 1662 alone).
William III was rightfully more skeptical of his own role as a healer, and could be persuaded to touch only one sufferer during his reign, whom he advised "God give you better health and more sense."
Source: "Forgotten English", Jeffrey Kacirk, 1999
William III was rightfully more skeptical of his own role as a healer, and could be persuaded to touch only one sufferer during his reign, whom he advised "God give you better health and more sense."
Source: "Forgotten English", Jeffrey Kacirk, 1999
Tuesday, 22 February 2011
Buried Alive Hoax, 1929
A man who called himself Marcel Clement, the Marquis of Champaubert (real name: Clement Passal) had been trying to sell his memoirs of his life of crime, but had met with little success so he struck upon a plan to make his biography more appealing. He invented a story in which he’d been kidnapped and tortured by a secret society, sending out letters from this society to newspapers in the hope they’d pick up the story.
The culmination of the plan was to have himself buried alive and for journalists to find him and disinter him, still alive. He and a fellow criminal, Henri Boulogne, successfully completed a dress rehearsal in which Clement had remained in the coffin (fitted with an air tube) for nine hours.
Despite the newspapers ignoring the letters they sent out, they decided to see the plan to its completion. At a rented villa near Versailles, Henri was given the letters to post and buried Clement in his coffin. However, exhausted by all the work, Henri then fell into a deep sleep and when he awoke he sent off the letters in a rush. Later on he went to check on Clement, but when there was no reply through the air tube, he feared the worst and ran away.
Meanwhile, the newspapers received the letters, informed the police and the body was exhumed. It was found that Clement had suffocated, and that the air tube fitted was not adequate.Henri was captured, tried and sentenced to three months in jail. The report from the Times, 7 October 1929, ends with:
“The grim irony of Passal’s fate is given greater prominence in the Press than has been accorded to any criminal event in recent years so that the vain desires of the psuedo-Marquis de Champaubert have been fulfilled. Unfortunately for him, even this measure of gratification has come too late.”
Source, The Times, 07/10/1929 and 05/12/1929
Sunday, 20 February 2011
The Tale of Thomas Arden
I haven’t been writing any comic strips for a while, but instead of leaving this blog lying unused, I thought I’d just type up any curious bits and bobs that I find while looking around the library.
The first entry is about a man called Thomas Arden (1508-1551) whose wife needed seven attempts and ten conspirators to murder him. Thomas had married into a powerful family, and so when his wife, Alice, had an affair, he put up with it just so he’d retain access to her family.
1. She asked a painter from Faversham to concoct a poison, but although Thomas fell ill, he didn’t die.
2. John Greave (who had previously argued with Thomas over a property issue) offered a £10 bounty on Anne’s behalf to a man named Black Will (an ex-soldier). Black Will was to murder Thomas at St Paul’s, but there were too many people around.
3. Thomas Arden’s servant was asked to leave the back door open, so that Black Will could get in and kill Thomas in the night. But the servant, Michael Saunderson, was too afraid of Black Will and would not let him in.
4. Black Will was told to murder Thomas as he journeyed back to Faversham, but Thomas was accompanied by a number of gentlemen.
5. Alice tricked Thomas into going to see Sir Thomas Cheyne at Shurland. The plan was that Black Will and his accomplice George Shakbay would ambush him on the way. Unfortunately due to the mist they waited for him in the wrong place.
6. A man called T Morsby picked a quarrel with Thomas Arden, but he refused to fight.
7. Lastly they successfully attacked Thomas while he was at home, playing a table game with T. Morsby. Morsby, Black Will and Alice all inflicted wounds upon him. After the murder, they hosted a party for visitors from London, before hiding the body in the snow. The body was soon found, and Morsby and Alice were arrested.
Eventually, all conspirators were executed. Black Will, Morsby and his sister were hanged, Alice burned, and Saunderson was hung, drawn and quartered.
The first entry is about a man called Thomas Arden (1508-1551) whose wife needed seven attempts and ten conspirators to murder him. Thomas had married into a powerful family, and so when his wife, Alice, had an affair, he put up with it just so he’d retain access to her family.
1. She asked a painter from Faversham to concoct a poison, but although Thomas fell ill, he didn’t die.
2. John Greave (who had previously argued with Thomas over a property issue) offered a £10 bounty on Anne’s behalf to a man named Black Will (an ex-soldier). Black Will was to murder Thomas at St Paul’s, but there were too many people around.
3. Thomas Arden’s servant was asked to leave the back door open, so that Black Will could get in and kill Thomas in the night. But the servant, Michael Saunderson, was too afraid of Black Will and would not let him in.
4. Black Will was told to murder Thomas as he journeyed back to Faversham, but Thomas was accompanied by a number of gentlemen.
5. Alice tricked Thomas into going to see Sir Thomas Cheyne at Shurland. The plan was that Black Will and his accomplice George Shakbay would ambush him on the way. Unfortunately due to the mist they waited for him in the wrong place.
6. A man called T Morsby picked a quarrel with Thomas Arden, but he refused to fight.
7. Lastly they successfully attacked Thomas while he was at home, playing a table game with T. Morsby. Morsby, Black Will and Alice all inflicted wounds upon him. After the murder, they hosted a party for visitors from London, before hiding the body in the snow. The body was soon found, and Morsby and Alice were arrested.
Eventually, all conspirators were executed. Black Will, Morsby and his sister were hanged, Alice burned, and Saunderson was hung, drawn and quartered.
Subscribe to:
Posts (Atom)

