by thom · 6y ago · 0 comments
Genesereth and Kochenderfer also have books on the subject; Kochenderfer's is extremely good (I haven't read all of Genesereth's).
[2] https://web.stanford.edu/class/aa228/cgi-bin/wp/ and https://web.stanford.edu/class/aa229/cgi-bin/wp/
0. A function A(s) to generate actions (moves) A given a state s:
1. The state evaluation function v(s) to distinguish good from bad states. I would start by using only piece value, then add mobility, piece-field values, ... You can find a few simple elements of such a function here: http://manual.freeshell.org/gnuchess4/HEURISTICS
With this you can generate s'=as (Successor state is action a applied to state s) and choose the action a=argmax(v(s))
2. A simple minimax implementation that searches the possible moves https://en.wikipedia.org/wiki/Minimax
From there you start optimizing your both by adding additional features to the evaluation function and improving your search using pruning and caching
Now finding heuristics there given only the game description is a completely different set of problem but for quite a few Chess-like games it boils down to valuing pieces (proving that something is a piece is a problem by itself), positions and combinations thereof which again all are derived of "mobility", i.e., the number of possible moves in a given situation.
In that sense, piece value is a mere "maximum mobility" indicator per piece. Positioning is a "real mobility indicator" but not only affecting your own mobility but also reducing your opponents. Check is then a mere reduction of your opponents mobility, promotion is a great enhancement of your piece value and castling a way of reducing the chance of "immobilizing your position" via check.
TLDR: Machine Learning aside, you could also deduce all Chess heuristics from first principles.