# Reality Conditions

## Wednesday, November 29, 2006

### Mathematicians and computers

[UPDATE: I apologize to all those who couldn't see the images and were asked for a password yesterday. I have fixed the mistake I made when uploading the images.]

There is an old joke about mathematicians that comes in many variations, but the basic idea is something like this:

A mathematician is asked how he would prepare tea given a mug, an empty kettle, a heater, and a jar with cold water. After thinking a minute, he answers he would fill the kettle with cold water, put it on the heater, and when it is hot pour it into the mug and make tea. Then he is asked what would he do if the kettle was already full with hot water. He now immediately answers that he would empty the kettle, thus reducing the problem to a previously solved one.

I was strongly reminded of it when I saw two amusing chess positions from computer games, both at Tim Krabbe's wonderful chess site. It seems that modern chess programs come with a table of theoretically won and drawn endings and the complete algorithm to win and draw them; they are also programmed to strive to reach one of the won endings at any cost. This makes sense because reaching it is exactly equivalent to reaching checkmate from the computer's point of view, but it gives rise to curious situations like the following:

Instead of playing the natural 1.Qxf4+, or the even stronger 1.Kb2 which leads to mate in 6, the program Hiarcs 7.32 plays 1.Qf7+!! The reason is, of course, that the resulting ending with two pawns against one is in the tablebase of won positions. Krabbe comments: "He'd rather look something up than think - how human." (You can find the position and the commentary at the bottom of this page).

An even more amusing case:

From a game between programs Deep Junior and Deep Fritz. White is a rook and a pawn up and things should be easy for it. Junior decides that it would be even easier if it had only a pawn up, because then the position is "theoretically won". So it played 1.Rc6+! But Fritz is no fool -it has the same tablebase and knows better than to fall into the trap, so it played 1...Kb5! The game continued in a display of masterful chess: 2.Rc5+! Kb4! 3.Rb5+! Kc4! 4.Rd4+! Kc3! 5. Rc5+! and now Black inexplicably gave up and played 5... Kxd4?, which after 6.Rf5 reaches a tablebase and White wins.

It's like buying a can of beer, then taking the plane to Zimbabwe because you have a friend there who knows how to open them.