# Algorithm Chess

Jonathan Mestel, 28 Apr 1995

`This is not really a retro-problem, but it is related.`
```When playing a game of chess, we each have rules for selecting one move rather
than another. Consider the following Algorithm for choosing a move:```
```(1) If we can legally take a piece we do.
(2) In choosing between two captures, or between two non-captures,
move as far up the board as possible.
(3) In choosing between two moves to the same rank, choose the one as
near as possible to the h-file.
(4) If (1)-(3) are ambiguous, choose the one which moves the average
of your pieces as near as possible to h8 if white, h1 if black.```
```Bill Hartston invented this algorithm. Suppose white and black both play it.
What happens?```
```White's first move is h4. Black replies h5. White now plays 2g4, and black
captures...```
`Who wins? The game only lasts 10 moves!`

### Gerd Wilts, 30 Apr 1995

```I liked the Algorithm Chess problem of Jonathan Mestel and
Bill Hartstone very much.```
`Here are some other Algorithm Chess problem:`
` `
```Version A)
----------```
```1. From all those pieces who can make LEGAL moves choose the one
which is on the highest rank (here the highest rank for BOTH White and
Black is the 8th rank, then the 7th and so on). If there is more than
one piece on the highest rank, take the one as near as possible to the
h-file.
2. After having chosen the piece which makes the moves choose the
destination square in exactly the same manner: from all those
legal destination squares for the SELECTED piece take the one
which is on the highest rank; if there are more than one legal
destination squares on this rank choose the one as near as possible
to the h-file.
3. Promotions are always in queens.
4. It is not allowed to make a move which leads to a position where the
opponent can claim a draw by the rule of triple repetition of position
or the rule of 50 moves.

Version B)
----------```
```the same as A) except: replace "highest" by "lowest" and "h-file" by
"a-file".

Version C)
----------```
```the same as A) except: For White the rules of Version A) apply, for Black
the rules of Version B) apply.

Version D)
----------```
```the same as A) except: For White the rules of Version B) apply, for Black
the rules of Version A) apply.

In all 4 versions: what is the game? Here are the beginnings for all
4 versions:

A) 1. h4 Sh6 2. h5 Tg8 3. g4 Th8
B) 1. Sa3 a5 2. Tb1 a4 3. Ta1 b5
C) 1. h4 a5 2. h5 a4 3. h6 a3
D) 1. Sa3 Sh6 2. Tb1 Tg8 3. Ta1 Th8

Have fun!```

To the Solutions of A-D (50 kB)