# What is the definition of a heuristic function in the BayesChess paper?

I am reading BayesChess: A computer chess program based on Bayesian networks (Fernandez, Salmeron; 2008)

It is a chess-playing engine using Bayesian networks. The following is mentioned about the heuristic function in section 3.

Here the heuristic is defined in terms of 838 parameters.

There are 5 parameters indicating the value of each piece (pawn, queen, rook, knight, and bishop -the king is not evaluated, as it must always be on the board), 1 parameter for controlling whether the king is under check, 64 parameters for evaluating the location of each piece on each square on the board (i.e., a total of 786 parameters, corresponding to 64 squares × 6 pieces each colour × 2 colours) and finally 64 more parameters that are used to evaluate the position of the king on the board during the endgame.

The above sentence contains the parameters used by the heuristic function. But I didn't find the actual definition. What is the actual definition of the heuristic function?

By far the most common form of heuristic evaluation functions for Chess-playing (or, really, any game-playing) agents are simple linear functions. At least when we're talking about handcrafted features that's the case, of course all the hype with Deep Neural Networks in more recent years is different. So, when it's not specified in a paper like this exactly what their heuristic evaluation function looks like, you can relatively safely assume it's just a linear function.

With linear function, I mean that you have vectors of features $$\boldsymbol{\phi}(s)$$ for your states $$s$$, and a vector of weights $$\boldsymbol{\theta}$$, and the evaluation $$f(s)$$ of a state $$s$$ is simply given by the dot product (summing up all the multiplications of feature values with their corresponding weights):

$$f(s) = \boldsymbol{\phi}(s)^{\top} \boldsymbol{\theta} = \sum_i \phi_i(s) \times \theta_i(s),$$

where the subscript $$i$$ indicates taking the $$i^{th}$$ element of a vector.

Heuristics can be understood aas rules. Typically heuristics are thought of as problem-specific strategies. Expert systems were an early form of AI that utilized rules-based decisions. In a game-playing context, heuristics can be pure strategies.

A heuristic function would be one that includes a some predefined decision rules. Russell and Norvig have a nice chapter on informed (heuristic) search strategies.

Heuristic functions are the most common form in which additional knowledge of the problem is imparted to the search algorithm.
Artificial Intelligence: A Modern Approach; 3.5 pdf

h(n) as opposed to f(n) or g(n)

Heuristic just means that it is hand constructed by a human. Suppose you have the value of each piece given an initial value. That is a heuristic because it was just defined by a human. But if the bayesian process is going to modify that initial value given by the human that would be a non-heuristic thing.

So there is no function definition to search for except to find what the initial parameters given by the human are.

• but in the last paragraph of page 5, it was mentioned as a heuristic function Feb 2 '19 at 10:46