On the Subject of Lousy Chess

It’s like playing random moves. Only worse.

Two lousy chess engines are playing against each other. It’s up to you to predict their moves and finish the game.

The variant played is MinitChess. It’s different from regular chess in the following ways:

  • Smaller board with less pieces — see diagram.
  • Bishops can also move to an adjacent empty square, allowing them to change color.
  • No double pawn moves or “en pasant”, no castling, pawn promotion always to queen.
  • No “check” or “stalemate”, victory by king capture.
  • No draw by repetition or number of moves after capture.
  • Draw after 40 moves by each side.

On the display you can see the white engine’s letter code and seed number, the black engine’s letter code and seed number, and the current move. Check which pieces are selectable to determine whose turn it is. Freely use the FULL/FLAT button to switch between two sets of pieces.

Make a move by first selecting a piece, then selecting its destination. Keep playing moves until the game is finished. Selecting the incorrect piece or destination will result in a strike.

The engines

Every engine follows these steps to determine their next move:

  • Each engine has it’s own list of goals. While making a valid move, try to meet a goal, starting at the top of the list.
  • The first goal of every engine is: Capture the enemy king.
  • The final goal of every engine is: Play any valid move.
  • For each goal, if there are no moves that meet the goal, try the next goal.
  • If there are one or more moves that meet the goal, name them “from-to” according to the a1, a2, ..., e6 coordinates and sort them alphabetically. Sort ascending if the previous random number was even, descending if it was odd. (First valid move in starting position is a2-a3, last is e5-e4).
  • Use the random number generator explained below to get a number.
  • Count moves on the list, starting at 0, wrapping around to the first if you reach the end, until you reach the random number. That’s the next move to play.
Engine Goals
D Dark squares are lava
  • Move a piece from a dark square to a light square.
  • Move a piece from a light square to another light square.
K The king must die
  • Move a piece closer to the enemy king.
L Light squares are lava
  • Move a piece from a light square to a dark square.
  • Move a piece from a dark square to another dark square.
M Mirror, mirror
  • Mirror the last move of the opponent using point reflection on the center of the board with the same piece as the opponent.
  • Move the same piece as the opponent.
S Let's switch sides
  • Move a piece closer to the setup position of the enemy. (Pawns only look to the starting square in front of them.)

Distance is measured in straight lines. E.g. the distance between the queens in starting position is 7, between the kings is 9.

Random number generator

  • Define the base number by taking the serial number and replacing letters with numbers (a=1, b=2, ..., z=26).
  • To get a new random number:
    • Start with the previous one (for the first time, use the engine seed for this).
    • Add the next digit of the base number (looping around to the first if you are at the last).
    • Only use the rightmost digit.

Example

  • White = L4 (Light squares are lava, seed 4)
  • Move = 1 (starting position)
  • Serial: CH3SS5
  • Base number: C=3, H=8, 3, S=19, S=19, 5 → 38319195
  • 4 (seed) + 3 (first from base number) = 7
  • First goal: Capture the enemy king. No moves meet the goal.
  • Next goal: Move a piece from a light square to a dark square.
  • Possible moves: 0:a2-a3, 1:b1-a3, 2:b1-c3, 3:c2-c3, 4:e2-e3
  • For the 7th one we wrap around after 4 back to 0, so we end up on 2:b1-c3.

To get the next random number for white:

  • 7 (current random number) + 8 (next from base number) = 15 → rightmost digit = 5.