To learn Elm (and to learn more about chess engine implementations) I wrote a pure client-side chess engine and game. https://github.com/darrensiegel/elm-chess
You can play it live here: https://elm-chess.com/
31–40 of 44 posts
To learn Elm (and to learn more about chess engine implementations) I wrote a pure client-side chess engine and game. https://github.com/darrensiegel/elm-chess
You can play it live here: https://elm-chess.com/
I'm very interested in the values assigned to pieces. Does anyone know the source or reasoning behind the table in step 2? How are pieces relative values calculated? What's to say a pawn is 1/3 of a rook or a knight? And why is the king 900, not simply the total value of all other pieces or slightly more? 8 pawns (10 ea), 2 knights (30 ea), 2 rooks (30 ea) and a queen (90) totals 290 points. Why can't a king simply b…
Check out this chess programming wiki article [1] for a (still fairly hand-wavy) rationale for similar piece values, and the Wikipedia article on chess piece relative values [2] for a more in-depth look at various weightings. Some modern approaches use analysis of a huge corpus of master games to come up with piece values, but many of the systems are based on intuition and empirical evidence. [1] https://chessprogram…
To follow on though, shoukdn't it technically be the case that piece values should in theory fluctuate based on current situation.
For instance, my castle is worth zero to me if I'm throwing it so I can get you in check.
Will I know modern chess engines take this stuff into account. Mostly just a random thought.
I'm very interested in the values assigned to pieces. Does anyone know the source or reasoning behind the table in step 2? How are pieces relative values calculated? What's to say a pawn is 1/3 of a rook or a knight? And why is the king 900, not simply the total value of all other pieces or slightly more? 8 pawns (10 ea), 2 knights (30 ea), 2 rooks (30 ea) and a queen (90) totals 290 points. Why can't a king simply b…
Check out this chess programming wiki article [1] for a (still fairly hand-wavy) rationale for similar piece values, and the Wikipedia article on chess piece relative values [2] for a more in-depth look at various weightings. Some modern approaches use analysis of a huge corpus of master games to come up with piece values, but many of the systems are based on intuition and empirical evidence. [1] https://chessprogram…
To follow on though, shoukdn't it technically be the case that piece values should in theory fluctuate based on current situation.
For instance, my castle is worth zero to me if I'm throwing it so I can get you in check.
Will I know modern chess engines take this stuff into account. Mostly just a random thought.
My feeling is that for serious AIs that need to perform huge tree evaluations (whether classical alpha-beta or something closer to monte-carlo minimum regret searches) there's several orders of magnitudes of optimization that can be performed, huge gains from subtle tradeoffs (larger static memory allocations, memory caching strategies, etc) and deep heuristics that can lead to pruning search spaces by huge percentages.
Highly tuned implementations such as these - or the graphics visualizations from the demo scene - have always fascinated me as an art form.
In practice, for most practical purposes, the industry seems to value more code for more features over the incredible feats of superimplementation.
Would anyone besides me like to step forward and admit they cannot even beat an opponent that makes random moves?
http://www.notesfromandy.com/2016/09/27/chessfidget/
That got boring, so I added very weak AI by connecting to the chess engine that comes preinstalled on macOS (inside Chess.app).
Would anyone besides me like to step forward and admit they cannot even beat an opponent that makes random moves?
I'm not quite that bad at chess, but bad enough that I wrote a chess game that plays random moves so I could always beat it: http://www.notesfromandy.com/2016/09/27/chessfidget/ That got boring, so I added very weak AI by connecting to the chess engine that comes preinstalled on macOS (inside Chess.app).
Can you elaborate on this please? The presentation at your link doesn't say.
Earlier quoted context omitted.
Check out this chess programming wiki article [1] for a (still fairly hand-wavy) rationale for similar piece values, and the Wikipedia article on chess piece relative values [2] for a more in-depth look at various weightings. Some modern approaches use analysis of a huge corpus of master games to come up with piece values, but many of the systems are based on intuition and empirical evidence. [1] https://chessprogram…
Good parent question and interesting links, thanks, will take a look. To follow on though, shoukdn't it technically be the case that piece values should in theory fluctuate based on current situation. For instance, my castle is worth zero to me if I'm throwing it so I can get you in check. Will I know modern chess engines take this stuff into account. Mostly just a random thought.
The author touched this a little bit with adding the position adjustments
> my castle is worth zero to me if I'm throwing it so I can get you in check.
I know what you mean, but castling into or through check isn't a legal move and shouldn't show up in your list of possible moves.
Earlier quoted context omitted.
Check out this chess programming wiki article [1] for a (still fairly hand-wavy) rationale for similar piece values, and the Wikipedia article on chess piece relative values [2] for a more in-depth look at various weightings. Some modern approaches use analysis of a huge corpus of master games to come up with piece values, but many of the systems are based on intuition and empirical evidence. [1] https://chessprogram…
Good parent question and interesting links, thanks, will take a look. To follow on though, shoukdn't it technically be the case that piece values should in theory fluctuate based on current situation. For instance, my castle is worth zero to me if I'm throwing it so I can get you in check. Will I know modern chess engines take this stuff into account. Mostly just a random thought.
Yes. One common example is knights and bishops. Both are worth about 3 pawns, but knights are generally more useful in closed positions due to their ability to jump over pieces, while bishops are better in open positions since they can more attack and move long distances.
Earlier quoted context omitted.
Good parent question and interesting links, thanks, will take a look. To follow on though, shoukdn't it technically be the case that piece values should in theory fluctuate based on current situation. For instance, my castle is worth zero to me if I'm throwing it so I can get you in check. Will I know modern chess engines take this stuff into account. Mostly just a random thought.
> values should in theory fluctuate based on current situation The author touched this a little bit with adding the position adjustments > my castle is worth zero to me if I'm throwing it so I can get you in check. I know what you mean, but castling into or through check isn't a legal move and shouldn't show up in your list of possible moves.
Also now that I'm awake, read the article fully now.
Very cool, makes me want to try building one!