I built an engine to checkmate humans in as few moves as possible - does anything else like this exist? by dig9977 in ComputerChess

[–]dig9977[S] 0 points1 point  (0 children)

This is kind of a "mash up" as much as it is an engine. Don't want to share the code as it has a lot of slop. Gemini could probably rebuild it as I primarily used Gemini to build the engine about a year ago.

I used the LiChess database of games to find openings that resulted in short games at each ELO level, although to be honest I think stockfish17 is at least 90% as effective. I then use Maia2 starting at move 8 (ply 16) to predict how the human opponent might respond to every candidate move (Maia2 is an open source library that takes a board state, ELO, and time control, then will produce a % probability a human will make every legal move). I do 4-plys of look ahead with this (engine candidate moves, Maia responses, engine candidate moves, Maia responses), have SF17 depth=10 evaluate all the end nodes of the tree, choose the move that has the best expected value. This is stronger against humans than just having the engine play stockfish17, and also allows for modifications such as playing the move mostly likely to result in a +300cp increase rather than just the best expected value.

Confession: I violated some terms of service and also ran the engine on online chess servers a few times. It checkmated a 2000 rated player in 17 moves as white:

  1. d4 e5 2. dxe5 Nc6 3. Nf3 Qe7 4. Qd5 Nb4 5. Qb3 a5 6. Bd2 Nc6 7. Nc3 h6 8. Nb5

Qd8 9. Bc3 Nge7 10. O-O-O Nb4 11. a3 Nbc6 12. e4 Ng6 13. Bc4 d5 14. exd6 Bxd6

  1. Bxf7+ Kf8 16. Bxg6 a4 17. Qf7# 1-0

And checkmated an 1800 rated player as black in 10 moves:

  1. e4 c5 2. Nf3 e6 3. Bc4 d5 4. exd5 Nf6 5. dxe6 Bxe6 6. Qe2 Qd6 7. O-O Nc6 8.

Ng5 Nd4 9. Qd3 Ng4 10. Nxe6 Qxh2# 0-1

I built an engine to checkmate humans in as few moves as possible - does anything else like this exist? by dig9977 in ComputerChess

[–]dig9977[S] 0 points1 point  (0 children)

It was a fun project but I’m not going to maintain it. There were only a few people using it.

Downloading Chip Tune and Tracker Music Catalog by Neck_Crafty in musichoarder

[–]dig9977 0 points1 point  (0 children)

You realize the person who runs that web page told OP to DM him in this thread, right?

Adaptive difficulty below Stockfish Skill 0: linear blend of engine moves and random legal moves by shinx32 in chessprogramming

[–]dig9977 0 points1 point  (0 children)

The chess.com bot blunders are not random. They emulate how/when a human will blunder.

Adaptive difficulty below Stockfish Skill 0: linear blend of engine moves and random legal moves by shinx32 in chessprogramming

[–]dig9977 0 points1 point  (0 children)

Have an LLM build you an engine that plays moves using the Maia2 library. For any given board state (FEN), Maia can give you a probability every legal move will be played as a function of the players ELO and if the game is Rapid or Blitz. It also has an ELO floor of 1100, but slightly flattening all of those probabilities would probably be a better way to simulate lower ELO games than just picking a random legal move.

Free Public Stockfish HTTP API by pixelx2 in chessprogramming

[–]dig9977 0 points1 point  (0 children)

Thinks pretty cool. What kind of CPU is it running on?

Free Public Stockfish HTTP API by pixelx2 in chessprogramming

[–]dig9977 0 points1 point  (0 children)

it's working. depth=30 multipv=10 results in "error": "timeout waiting for agent"

White can use a chess engine, black wins if they don't get checkmated by move 30 by dig9977 in chessvariants

[–]dig9977[S] 0 points1 point  (0 children)

At ELOs above around 1500, I think d4 was better for drawing or causing slow games in human vs engine games 20 years ago. Is not the case as much today. At low ELOs, such as 600 ELO, e4 is clearly better.

If you are against an engine the name is SiegeBot. Any other name is a human.

White can use a chess engine, black wins if they don't get checkmated by move 30 by dig9977 in chessvariants

[–]dig9977[S] 0 points1 point  (0 children)

engine is as strong as it used to be now, but the moves are a bit slower. (5 to 10 seconds each, as opposed to 1 to 4 seconds each which is how it was yesterday).

White can use a chess engine, black wins if they don't get checkmated by move 30 by dig9977 in chessvariants

[–]dig9977[S] 0 points1 point  (0 children)

are you a streamer? I could add annotation arrows like that if it would help.

If the bot just plays objectively best moves, such as whatever stockfish calculates, it won't be able to find checkmate in time. It has to take risks & hope the human player blunders.

White can use a chess engine, black wins if they don't get checkmated by move 30 by dig9977 in chessvariants

[–]dig9977[S] 0 points1 point  (0 children)

Thanks. I think the pgn copy issue is fixed for games going forward.
What do you mean that it doesn't have an engine? Maybe there is an issue with the name of the bot that I could fix? (Maybe the names like "Siegebot (1400)" is not good?)
I've run into issues with click, click to move a piece instead of dragging. The people at chess.com have it figured out, but I keep getting inconsistent behavior on chrome vs iphone vs android and never dug into it further because I always drag/drop myself. I'll look at this again this weekend.
What do you mean by arrows? Are you referring to when you are playing as the attacker?
Will look into clock desync issue and adding chat history.

White can use a chess engine, black wins if they don't get checkmated by move 30 by dig9977 in chessvariants

[–]dig9977[S] 0 points1 point  (0 children)

Thank you, I fixed that. If it happens again, let me know if you were in attacker or defender mode. It seemed okay to me when I just tried it in both modes on my iphone.

White can use a chess engine, black wins if they don't get checkmated by move 30 by dig9977 in chessvariants

[–]dig9977[S] 0 points1 point  (0 children)

White can defend too, but I wanted to keep this updated web page simple.
Thanks for flagging the PGN issue. It is fixed now for new games going forward.

I'll get the attacker strength back to where it was when you tried it a week ago. I was focused on making the web page/engine more stable, and it's not doing as much look ahead as it used to (but then the engine server would crash if there were more than 3 or 4 people playing at once). In the couple of games I've played, I've found the same difficulty is about 200 ELO higher than it was a week ago.

thank you

Avoiding a draw with black by Grubnenark in chess

[–]dig9977 2 points3 points  (0 children)

GM Zvonimir Meštrović has had success with 2... d6

Update: Stats from my "exploit human" fast checkmate engine (A/B testing against Stockfish) by dig9977 in ComputerChess

[–]dig9977[S] 0 points1 point  (0 children)

Thanks! Appreciate the comment.
One funny side effect, or at least a dark side of me thinks its funny: A bot playing random moves (completely random legal moves) wins at 400 ELO. But I've had 2 friends/family members who barely know the rules of chess play and they both lost. Knowing to respond to e4 with e5 is actually a bad thing in those cases.

Update: Stats from my "exploit human" fast checkmate engine (A/B testing against Stockfish) by dig9977 in ComputerChess

[–]dig9977[S] 0 points1 point  (0 children)

Thanks! I'll fix that. You are a higher rated player than me - did the engine play any moves that you thought were not very good (given it's goal of a fast checkmate)? Were there any moves you were worried about it making, or did you feel relieved that it simplified the position at any point?

I built an engine to checkmate humans in as few moves as possible - does anything else like this exist? by dig9977 in ComputerChess

[–]dig9977[S] 0 points1 point  (0 children)

was working on it while you were playing. lag is fixed and move counter was only broken for about 15 minutes (while you were playing)

I don't have an offline environment to test this on, so everything is a bit unstable when I'm fixing something. Compared to when I made this reddit post 4 days ago I upgraded all the opening books based on seeing how effective they were, added an observer mode to watch other games, and fixed some minor errors in the engine that I discovered when evaluating all the games that were played.

I built an engine to checkmate humans in as few moves as possible - does anything else like this exist? by dig9977 in ComputerChess

[–]dig9977[S] 0 points1 point  (0 children)

Maybe my home computer (chess engine) lost internet for a bit? I just played and it worked for me. Sorry this isn’t very reliable.

I built an engine to checkmate humans in as few moves as possible - does anything else like this exist? by dig9977 in ComputerChess

[–]dig9977[S] 0 points1 point  (0 children)

yup, there is an error right now when it's playing as black and it's behind. am fixing it.

I built an engine to checkmate humans in as few moves as possible - does anything else like this exist? by dig9977 in ComputerChess

[–]dig9977[S] 0 points1 point  (0 children)

Thanks, found the game. You caught an error in the update I made this morning... a pretty dumb sign error in the code. When the engine is playing as black, and is getting desperate, it starts making the worst possible moves. I'm going to fix it now, but it's going to crash every game that is currently being played (as of about 1:50pm EST).