this post was submitted on 01 Feb 2025
126 points (96.3% liked)

xkcd

9245 readers
647 users here now

A community for a webcomic of romance, sarcasm, math, and language.

founded 2 years ago
MODERATORS
 

It struggles a little with complex positions, like when there are an even number of moves and it has to round down, but when run against itself it's capable of finding some novelties. At one point I saw six knights on the board at once; Stockfish rarely exceeds four.

https://explainxkcd.com/3045/

top 9 comments
sorted by: hot top controversial new old
[–] Iron_Lynx 12 points 2 days ago

Fun fact, you can have a completely different game now by changing the language of the notation.

[–] [email protected] 11 points 2 days ago* (last edited 2 days ago) (1 children)
[–] [email protected] 5 points 2 days ago* (last edited 2 days ago)

Yup. In fact, it is just Arithmetic (24:43) set to ½.

[–] [email protected] 6 points 2 days ago* (last edited 2 days ago)

For the curious: https://lichess.org/editor/r1b1k2r/1pp1nppp/8/p1b1p3/2PnpP1P/2K5/PP3q2/RNBQ1BNR_w_kq_-_0_1?color=white

For the less curious: it was mate in 16 for black, even before the knight moved. After the knight moved, it was mate in 1.

[–] feedum_sneedson 3 points 2 days ago (1 children)
[–] [email protected] 5 points 1 day ago* (last edited 1 day ago) (2 children)

The writer played multiple games of chess against some conventional chess programs or AIs, and used a simple algorithm to determine their own moves:

For each move, the writer:

  1. Generated a list of all possible moves in the current position, and the moves were recorded in standard algebraic chess notation
  2. Sorted the list of possible moves in alphabetic order
  3. Used the move that was in the center of the sort order, but I have no idea what they did if the number of possible moves was even

This algorithm for choosing chess moves did not result in optimal play, and lost badly against the standard chess programs/AIs.

The illustrated position shows the algorithm generating a blunder or useless move for White (Ne2) that allows a checkmate victory for Black with their next move (... b4#), i.e. "Black Bishop moves to b4, checkmate."

Black's winning move is not shown, likely as a brainteaser for the readers.

The writer named their algorithm "AlphaMove" as a take on Google's famous chess playing AI from 2017 named "AlphaZero".

Except in the writer's case, the "Alpha" in their algorithm's name is short for "alphabetic", which makes the expanded name "Alphabetic(-sort)Move".

[–] [email protected] 2 points 1 day ago (1 children)

He mentioned that it rounded down when even, so I'm assuming it went forward one place.

Also, wouldn't checkmate be notated with #?

[–] [email protected] 2 points 1 day ago

You're right, "#" for checkmate is in more common use than the "++"

[–] feedum_sneedson 1 points 1 day ago

Honestly, I understood that much, but I still don't get it.