# Utilization of static evaluation functions in chess

Disclaimer: I'm very new to computer science & game programming

I'm having trouble with understanding how to implement a static evaluation function in chess. The logic seems simple like just apply a weight to each piece on the board and subtract the pieces from each side, but its much more complex than that isn't it? You'd have to calculate a method of analyzing the board and each of the MULTIPLE actions that are occurring on the board at the same time (ie. Castling, checking pawns are being lost, if you're in check etc etc).

Is there a relatively simple way of implementing a static evaluation function to a chess board to "see" whats going on at each stage?

Side Note: I understand that you could implement things like Minimax (with $\alpha - \beta$ pruning) searches onto the trees created via the static evaluation functions, so correct me if I'm wrong but whats going on is that $$f(Board) = c_1 * (thing 1) + c_2*(thing 2) + \cdots$$ but where do those $\cdots$ end??? And from there, we get a number which we put in our tree then implement the minimax algorithm, to figure out the best move forward?

Are there any resources for this type of thing that I could possibly read? Thank you.

• chessprogramming.wikispaces.com is a good resource for this. Try to see whether you can find your answer there and return with a more focused question if you can't. Generally, most chess algorithms use a variant of minimax with a static evaluation function. It is known that this function isn't ideal, but there are multiple tricks involved to make it reasonable. – Discrete lizard Feb 20 '18 at 5:51