Talk:3045: AlphaMove
Ask Tom Murphy VII to get on this 141.101.99.103 22:50, 31 January 2025 (UTC)
This has actually been done and tested against other strange algorithms: https://youtu.be/DpXy041BIlA?t=729
I have attempted to run the proposed bot against itself — if I haven't made any errors, here are the resulting games:
Rounding down:
1. e4 e6 2. f3 f5 3. e5 g5 4. d4 d5 5. exd6 g4 6. d7+ Kf7 7. dxc8=N Ke8 8. fxg4 h6 9. gxf5 Kd7 10. g4 h5 11. fxe6+ Ke8 12. g5 Na6 13. h3 Nc5 14. h4 Ne7 15. Kd2 Ne4+ 16. Ke1 Nf5 17. g6 Nf6 18. g7 Ng3 19. gxf8=N Nge4 20. Ke2 Ng4 21. Kf3 Ngf2 22. Ke2 Nh3 23. Ke3 Nhf2 24. Nb6 Nh3 25. Na4 Nhf2 26. Nac3 Nxc3 27. Kxf2 Nxd1+ 28. Kf3 Qc8 29. c4 Ne3 30. Ke4 Nf5 31. Kd3 Ng3 32. e7 Nxh1 33. Kc2 Qb8 34. d5 Kxe7 35. d6+ Kf6 36. dxc7 Nf2 37. c8=R Ng4 38. Kd2 Nh2 39. Ke3 Ng4+ 40. Kd4 Nh2 41. Kd5 Nxf1 42. Nc3 Nh2 43. Nce2 Ng4 44. Nd4 Nh6 45. Nd7+ Kf7 46. Ndf3 Qd6+ 47. Ke4 Qd2 48. Nf8 Qd5+ 49. Ke3 Qd2+ 50. Ke4 Qd5+ 51. Ke3 Qd2+ 52. Ke4
Rounding up:
1. f3 f5 2. e4 f4 3. d4 e6 4. e5 g6 5. g3 fxg3 6. c3 g2 7. d5 gxf1=Q+ 8. Kxf1 exd5 9. Ke2 d6 10. Kd3 g5 11. Kd2 dxe5 12. Ke2 d4 13. Kd3 dxc3+ 14. Ke3 e4 15. Ne2 exf3 16. Ng1 f2 17. Nxc3 fxg1=N 18. Qc2 Kd7 19. Ne2 h6 20. Qa4+ Ke6 21. Qb3+ Ke7 22. Qb4+ Ke8 23. Qb5+ Kf7 24. Qa6 Kg7 25. Qa4 Kg6 26. Qb3 Kg7 27. Qb4 Kh7 28. Qb5 Kg7 29. Qa6 Nc6 30. Nxg1 Na5 31. Qb6 Kh7 32. Qb3 Kg6 33. Qb4 Kg7 34. Qb6 Kh7 35. Qb3 Kg6 36. Qb4 Kg7 37. Qb6
Rounding down code:
const { Chess } = require("chess.js"); const chess = new Chess(); while (!chess.isGameOver()) { const moves = chess.moves(); moves.sort((a, b) => b.localeCompare(a)); const move = moves[Math.floor(moves.length / 2)]; chess.move(move); } console.log(chess.pgn());
To round up, swap the a and b in the sort function.
Both games end in a threefold repetition draw. The game with rounding down does, in fact, have 6 knights in it, so I believe he did code this to see what would happen.
Ohpointfive (talk) 22:52, 31 January 2025 (UTC)
To elaborate on the Tom VII point - this is the YouTube video that possibly inspired the comic: https://www.youtube.com/watch?v=DpXy041BIlA 141.101.98.179 22:55, 31 January 2025 (UTC)
- Specifically, it's the Arithmetic Player at 24:43 set to ½. ChaoticNeutralCzech (talk) 17:52, 1 February 2025 (UTC)
Unfortunately for white, it's mate in 1 with Bb4# 162.158.90.124 23:25, 31 January 2025 (UTC)
Even if white makes a different move, its still forced mate in one. RIP XKCD Bot. Redacted II (talk) 00:53, 1 February 2025 (UTC)
- Well, for most options. Queen to a4 puts Black in check, forestalling an immediate move to mate White; capturing the knight de-threatens enough squares around the king that Black can't check next turn without leaving an escape route. 172.70.176.28 17:45, 1 February 2025 (UTC)
Although it wouldn't change the outcome much (either by changing black's move or white's general options), I'm currently not understanding why Kd4 isn't on the list of options at this point in time. So long since I played serious(ish) chess, and the only reason I could think of is that it's probibited by some strict ortbodox game rule recognising the potential moving of the knight out of the way (in the next white move-cycle). But I'd have treated that later option as forbidden, as a revealing-mate. But, as I said, it's been a while, so maybe I'm just blind to something like a sweeping bishop-range that disbars this (much as the near knight, bishop and pawn disbars four out of the five moves). ...darn, it's just clicked. That's the AlphaMoved white-knight's destination (before that, the black queen was entirely covering that square, and double-teaming one of the adjacent black-knight covered squares), I'd been thinking that was the piece's origin (with the empty highlighted square as its destination) until I'd finally read the highlighted movelist item properly and deciphered it as Knight To King Two (done), not the (intention of) Knight To King's Bishop One. So ignore the above. Although, just to note, for the Black Queen to have even achieved that position would probably have required at least one normally-sacrificial exposure to the deadly white Q/B/R pieces guarding the obvious entry, give or take the algorithmic development of their (and the "gateway pawns"') current positions. 141.101.99.104 02:00, 1 February 2025 (UTC)
- Follow-up... As far as the black queen is concerned, I suppose she could have done d6, (x?)g3 then f2, in-between the other black and white moves made, largely safe from the white 'defence'. Or to d4 then f2, if white Queen's Pawn was shielding still. (Appears to have been taken, but it would have been bold to have done that with the queen, for a normally immediate pawn-queen exhange!) A bolder/more opportunistic set of moves than I would have tried, either. Even (unknowingly) against AlphaMove, I'd have been wary of the unconventionally developing white disposition actually being an idiot-trap (and I'm really not that far off being an idiot, insofar as chess). 172.70.162.162 02:17, 1 February 2025 (UTC)
The explanation gives both O-O and 0-0 as notations for castling and then explains why 0-0 can never occur, even though O-O can be sorted pretty centrally. So, which is the correct notation? 172.71.250.91 09:14, 1 February 2025 (UTC)
- According to the pgn spec, section 8.2.3.3: they are capital Os and not zeros 172.68.3.96 15:10, 1 February 2025 (UTC)
I'm pretty sure we're looking at a retrograde puzzle. Ohpointfive is onto something here, with the six knights on the board a strong indicator. The question is, of course, where is the joke? White plays Alphamove all along and must have started with e4 (rounding down) or f3 (rounding up). Both are consistent with the end position. So from my point of view, the joke is
- either that the "stronger engine" is not a strong engine at all but maybe the same algorithm, rounding up instead of down
- or that black doesn't win this position (in real chess, White is of course toast) because its algorithm is even worse
@Ohpointfive, could you run the two versions against each other? --Pganon (talk) 15:55, 1 February 2025 (UTC)
I created a playable version of this game in like 10 minutes using ChatGPT ;)
https://enn-nafnlaus.github.io/AlphaMove/alphamove.html
Git page here:
https://github.com/enn-nafnlaus/AlphaMove
-- Rei 17:52, 1 February 2025 (UTC)
I checked, castling and en passant both work. 172.68.245.25 19:26, 1 February 2025 (UTC)
@Pganon certainly: White rounding down vs. black rounding up:
1. e4 f5 2. f3 f4 3. d4 e6 4. e5 g6 5. d5 exd5 6. g3 fxg3 7. c4 g2 8. h3 gxf1=Q+ 9. Kd2 Kf7 10. Kc3 Ke8 11. Kc2 Kf7 12. Kb3 Ke8 13. Kc2 Kf7 14. Kb3 Ke8 15. Kc2
White rounding up vs. black rounding down:
1. f3 e6 2. e4 f5 3. e5 g5 4. d4 d5 5. f4 gxf4 6. h3 h5 7. h4 Kd7 8. Kd2 Kc6 9. Kd3 Kb6 10. Ke2 Kb5 11. Ke1+ Kb4 12. Ke2 Kb5 13. Ke1+ Kb4 14. Ke2 Kb5
The first game is quite exciting, with black at one point having a chance at checkmate in one, but alas too many available pawn moves drives the winning move Qxc4# far past the center of the list. The second game is much less exciting.
Ohpointfive (talk) 21:30, 1 February 2025 (UTC)
Here's a question: What is the quickest way to checkmate AlphaMove? Here's the quickest that I have found so far:
- f3 d5
- e4 d5xe4
- f4 e5
- g3 Bg4
- d4 Qxd4
- f5 e3
- f6 Qxd1#
Thus, we have mate in seven. This might be good to mention outside the comments section as a demonstration tha AlphaGo is not very good (not to mention failing to attack black's queen with a less valuable piece), but a quicker checkmate might be possible, in which case we should mention that instead.172.70.207.159 11:08, 2 February 2025 (UTC)
- Checkmating Alphamove is easy. Getting checkmated *by* Alphamove is challenging. You basically have to forget everything you know about normal chess. -- Rei (talk) 14:48, 2 February 2025 (UTC)
- Fastest mate against Alphamove playing Black 3 moves (natural max), White 5 moves (exhaustive search), selfmate 9 moves - problem composers and mathematicians solve that in a jiffy. See here: https://chess.stackexchange.com/questions/46651/fastest-win-against-xkcds-alphamove 172.70.248.29 09:11, 3 February 2025 (UTC)
One possible move, Kd2, is missing! /141.101.76.164 17:41, 2 February 2025 (UTC)
- That can't be done. The Knight isn't between d2 and the Q@f2 at the point that the moves are being compiled. The Ne2 hasn't happened yet (we now see it, as having moved there, as a result of Ne2 being selected from the list, so next turn the King could move there, assuming the game isn't lost (or black decides to do something else which prevents it, for some strange reason). 162.158.74.25 18:47, 2 February 2025 (UTC)
I put the position before White's move into Lichess and it says it's mate in 12 for Black.
On a related note, I'm also wondering how they got to the comic position in the first place. Anyone want to try constructing a proof game? Arcorann (talk) 03:30, 3 February 2025 (UTC)
A lot of the explanation is based on a round-up version of AlphaMove. It should round down for even lists like the title text says. The example implementation is wrong too. The first move should be e4, not f3. 162.158.187.55 07:25, 3 February 2025 (UTC)
If there ever was an explanation that needed to be broken up into three paragraphs and a Detail section, this is it. 172.71.142.30 17:19, 3 February 2025 (UTC)
It is not mentioned what happens when there is a tie for the middle move (for an even number of possible moves). Is it then chosen "at random"? 162.158.155.102 19:38, 3 February 2025 (UTC)
- The title text discusses it, so presumably that's the principle we should consider at play. 162.158.6.110 21:23, 3 February 2025 (UTC)
Why is there still a pawn on a2? It would seem that a3 would be the first move, followed by a4. 172.69.135.191 (talk) 23:20, 3 February 2025 (UTC) (please sign your comments with ~~~~)
- a3 would be the first in the list for the compilation of first move (then a4, then [b-h] x [2-3], then four "N"-moves. The middle of the list would therefore (depending upon round-up or round-down) "e4" or "f3". Assuming e4, the next white move list is going to be seven pawns that can move to self.3 or self.4, one that can move to self.5, with some B-moves between b4 and c3, a K-move, five N-moves and a number of Q-moves. pawn on a2 just doesn't get a look-in, move-wise, at least not until after a lot of moves (possibly designed by the opponent specifically' to remove moves from anything that isn't pawn-move from a2 to a3 or a4. 162.158.33.252 15:48, 4 February 2025 (UTC)
What does this mean? The current explanation includes a paragraph starting with "The actual middle of the list might vary away from the usual alphabetic median if the moves (and the pieces removed by the opponent) are heavily biased to a particular subset of player-pieces." I can't make head or tail of this, but maybe that's just 'cause I'm dumb. Why would the middle of the list be different from the median? It should be re-worded to be clearer, or perhaps removed. DKMell (talk) 22:43, 3 February 2025 (UTC)
- As an example, when the King is in check, there are far fewer legal moves, but they might include (or be limited to) interposing with a bishop, so that a bishop actually does get moved. That differs from the _usual_ median, even though the median function is still being used. JimJJewett (talk) 06:56, 4 February 2025 (UTC)
- Several ways of reading "alphabetic median", one is that, in a-z, the m/n point is the median, or divide between the two halves. But of course not all letters are used (a-h as no-prefix pawn-destinations, B, K, N, Q, R as non-pawn prefices to destinations, a capturing pawn-move will start with x (of a-h and then an x, if needing disambiguationg, and then there's O-O and O-O-O). That's already overbalanced, so that 'g' is the 'middle' of the first-letters (unweighted by whatever actual opportunities, or lack of them, there are).
- But, in any given board position, the lower-case letters tend to be pawns with (initially) two possible moves, generally just one move, maybe up to four (a first-move pawn given 1/2-step forward options and given two different options to capture away from its current file, where near-neighbour pawns require the disambiguation to be used) A queen can (where not restrained, until (possible capturing whilst) hitting the edge-of-board) have 28 moves (seven positions front/back, seven left/right, similar on the two diagonals). Rooks and Bishops might have 14 move-to positions. The kNight might have up to 8 'landing spots'. Initially, apart from the kNight with two moves, they of course have no opportunity to do anything. As the game develops, though, whatever you prior preconceived 'median' might be, in the alphabetically-sorted list, the gaining (by gaining opportunity to move) eand losing (by a piece being capture) adjusts the move-state's 'middle' of all valid-moves up and down the alphabet. Probably never as far as an unambiguous pawn-capture, or a first-file pawn move (or disambiguated capture from that positions), but it'll change a lot.
- How to concisely explain this, I don't know. Especially as I'm just running off the various possibilities off the top of my head, and might have forgotten some of the 'algebraic' notation's subtleties. 162.158.33.252 15:48, 4 February 2025 (UTC)
This comic reminds me of suckerpinch's "Elo World" video, where he made a whole bunch of similarly single-minded chess engines and ranked them against each other. https://www.youtube.com/watch?v=DpXy041BIlA - If I recall correctly there was an alphabet-based one but it picked the first result rather than the middle result. 172.68.23.136 01:01, 11 February 2025 (UTC)
Is there any series of moves to be checkmated by alphamove?799571388 (talk) 11:34, 14 February 2025 (UTC)