Live data from Hacker News

A minimax chess engine in regular expressions

nicholas.carlini.com

51–60 of 103 posts

Re: A minimax chess engine in regular expressions

#51

There's a bug somewhere it seems like, as it ends the following game with "Illegal move, you lose", even though it's not an illegal move: 1. e2e4, e7e5 2. d2d4, e5d4 3. d1d4, a7a5 4. g1f3, b7b5 5. b1c3, a5a4 6. c3b5, a4a3 7. b5a3, a8a3 8. b2a3 --> Illegal Move You Lose. Game over. FEN of game above: 1nbqkbnr/2pp1ppp/8/8/3QP3/P4N2/P1P2PPP/R1B1KB1R b KQk - 0 8

a2a3 on the first move or on the second move after e2e4 outputs that you have played an illegal move.

But this is a bug as these are legal moves.

Re: A minimax chess engine in regular expressions

#52
post #46

Earlier quoted context omitted.

It’s very fun and impressive but it’s absolutely not a single call.

Maybe a generous interpretation of the comment and a realisation that common language isn't always 100% precise would be better than pointless arguments about semantics. There is only a single printf written in the source code.

That I can agree with!

Re: A minimax chess engine in regular expressions

#60
As it's already been reported in this comment section, at a seemingly random stage of the game when it's the player to move, an error caused by an illegal move is triggered. Happened to me twice already in the opening. Once for a King's knight move to f3 and once for a simple pawn move as follows: 1.Nc3(b1c3) Nc6(b8c6) 2.g3(g2g3) g6(g7g6) 3.Bg2(f1g2) Bg7(f8g7) 4.e3(e2e3) Bxc3(g7c3) 5.bxc3(b2c3) a6(a7a6) 6.c4(c3c4) a5(a6a5) 7.Ne2(g1e2) a4(a5a4) 5.a3(a2a3) saying a2a3 is illegal.

Creative approach. Very impressive if it'd work, but you cannot finish the game, because it doesn't recognize the moves properly. The program understanding and strength is poor, but it was to be expected and it's beyond the point of this intellectual exercise, I guess.

Post reply on HN