On the Subject of Lousy Chess

It’s like smashing your head into the keyboard.

This variant of chess has the following differences from the original:

  • 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 passant”, 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.

The display shows the following information from top to bottom:

  • Whites' engine and seed.
  • Blacks' engine and seed.
  • 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.

Random digit generator

Whites and blacks have their own digit strings that they use to determine the moves. Use the following instructions to get those strings:

  • Define the base number by taking the serial number and replacing letters with numbers (a=1, b=2, ..., z=26). Append the base number to itself as many times as needed later on.
  • Example: SH1HJ3 -> 198181031981810319818103...
  • In order to get the whites'/blacks' random digit string:
    • To get the first digit calculate (whites'/blacks' seed + base number's first digit) % 10
    • To get any other nth digit calculate (whites'/blacks' (n-1)th random digit + base number's nth digit) % 10.
  • In a string nth random digit corresponds to nth move.
  • In the simulated game the first move has index 1 meaning that the initital seeds aren't part of the random digit string.

Example with seeds white - 2, black - 7:

--198181031...
W2320190034...
B7875645589...
--123456789...

Bottom row is the move for convenience. In this case the whites' random digit string is 320190034..., blacks' string is 875645589...

Keep calculating extra digits if you need more.

The engines

Every engine follows these steps to determine their next move:

  • Each engine has it’s own list of goals. Find the first goal in the list that has any valid moves:
    • Capture the enemy king.
    • Engine's unique goals from the table below.
    • Play any valid move.
  • Within that and only that goal list all valid moves and name them “from-to” according to the a1, a2, ..., e6 coordinates and sort them alphabetically.
  • Depending on the previous random digit the sorting order should be:
    • Even -> ascending.
    • Odd -> descending.
  • Count moves on the list, starting at 0, wrapping around to the first if you reach the end, until you reach the current random digit. 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.)

*The module uses Manhattan distance.

**Setup position - position of the same piece of the opponent.

***If the opponent’s last move was a promotion from a pawn to a queen, the engine will try to move their queen, rather than their pawn.