Settings

Theme

Show HN: Probabilistic Chess

marc.ai

2 points by marcsto2 a year ago · 0 comments · 2 min read

Reader

A fun new variant of chess that adds probabilities into the mix. The rules are simple:

* Each square on the board has a probability of successfully moving to it. * A happy-face dice roll means the move was successful. Otherwise, the move isn't played and it's the opponent's turn to play. * You win by capturing the opponent's king.

For example, if you attempt to move a pawn from e2 to e4 and e4 has a 60% success probability, you will see a dice roll animation. The dice will have a 60% chance of landing on a happy face and a 40% chance of landing on a sad face. If it lands on a happy face, the move succeeds. If it lands on a sad face, the move fails, the pawn returns to e2, and it's now the opponent’s turn.

There are some interesting changes to chess that comes from having move probabilities: * Checkmate does not win the game; capturing the king does since there's no guarantee that capturing the king will succeed. * You can make moves while your king is in check. * You can make moves that put your king in check. This is a gamble but it can make sense if the king is on a low probability square.

AI Opponent I tried a few different approaches. The best one so far is a probability-aware alpha-beta search which uses a combination of expectation maximization and stockfish to play. Everything is implemented in client-side Javascript and WebAssembly.

I put more details on how it works in this blog post: https://marc.ai/probabilistic-chess.html

Developing Probabilistic Chess has been a lot of fun. My dad and I have spent over 30 years working on programming projects together and a big part of that was focused on ML and applying it to chess so building a new variant of chess together has been great.

I'd love some feedback on this game.

This was inspired by Cameron Sun's excellent probabilistic tic tac toe that he posted on HN recently.

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection