A probabilistic chess engine

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Post Reply
one_thousand_lakes
Posts: 1
Joined: Tue Mar 05, 2024 7:33 am
Full name: Luke Salamone

A probabilistic chess engine

Post by one_thousand_lakes »

Hi everyone, I am working on a probabilistic engine which uses opponent modeling to play the move which has the best expected value given an accurate model of the opponent. Currently it uses a neural net model of lichess 1500 elo players for the opponent model, and stockfish as an oracle for the value of a position under consideration.

For minimax, my understanding is we are essentially playing the best move under the assumption that the opponent will play their best move. But this isn't necessarily the fastest path to victory or the most engaging to play with. If we have a model of the opponent's behavior, we might be able to beat them faster. And from the player's perspective, it is possible to beat such an engine by playing moves which are better and out of distribution. In practical terms, this engine will try to trap you, but learning to play better moves will let you beat it.

Here is a demo: https://chessmate-demo.s3.amazonaws.com/play.html

(Technical note: the model is around 33mb, so it may take a minute to load depending on your connection. Unfortunately I don't have a loading bar for that yet. But the whole thing should run from your browser, no server necessary.)
User avatar
towforce
Posts: 11581
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK

Re: A probabilistic chess engine

Post by towforce »

Loved the fact that I could play it in the browser, like a chess.com bot!

Can't say how good it's probabilistic feature is - it simply outplayed me: got its pawns into good positions, trapped my bishop, made a lethal attack against my king. I'd have to concentrate more to give it a competitive game:

[pgn]1. e4c52. Bc4Nf63. Nc3e64. Nf3a65. O-OBe76. d3Nc67. Be3O-O8. Qe2d59. exd5exd510. Bxd5Nxd511. Nxd5Qxd512. Rfd1Rd813. Rd2Bd614. c4Qh515. h3Bxh316. g3Bg417. Kg2Ne518. Rh1Bxf3+[/pgn]


Edit: just uncovered a bug: the PGN output isn't usable at this site.
Writing is the antidote to confusion.
It's not "how smart you are", it's "how are you smart".
Your brain doesn't work the way you want, so train it!
Post Reply