Pradu wrote:hristo wrote:The basic concept is to represent the static position as an energy map of all the pieces on the board. Where the evaluation takes into account the potential energy for every piece, which is normally referred to as "the material", and the kinetic energy at the given moment.
An interesting aspect of this is that for instance the Kings have
attenuation field which is applied to the kinetic energy of the opponent's pieces. This makes it possible to "automatically" select attacking and defensive moves.
At any rate, I want to find an algorithm that leads to good moves without having to explicitly code in the so called "chess knowledge". It is just seems to be more fun that way.
Regards,
Hristo
This is a very interesting idea... indeed a breakthrough if you don't have to explicitly code chess knowledge and it's performance is as good as an eval with explicitly coded chess knowledge. Some questions though. How do you not explicitly code chess knowledge? Wouldn't whatever function you use to define potential energy and kinetic energy be the same thing as adding chess knowledge by the use of that function?
The functions that generate KE and PE take into account minimum amount of chess rules and a few assumptions, however none of those can be considered "chess knowledge", at least not in the way other programs are using this term.
The KE function(s) (logically speaking there are really just two of them, one for pawns and one for everything else) don't have any special cases with respect to positions or particular piece configurations, those functions require the current position only so the generated energy map can follow the rules of chess. There is no explicit knowledge about "doubled pawns", "rook on the 7th", "trapped bishop", "open line", etc. etc. The only aspects of the position that those functions are concerned with are:
1) Is a square occupied by a piece?
1.1) Is this opponent piece?
1.2) Is this own pawn?
This is it. No other information is extracted from the position during energy map generation.
The reason to use two different KE generation functions is that pawns "behave" drastically different from the other pieces and I couldn't figure out how to merge this behavior into one function.
Pradu wrote: Do you have something like KE + PE = 0 or something like KE + PE = Change in total energy in the system from a move?
I have tried both. Currently am using the KE+PE = Change in total E, not because it is inherently better, but because it is easier for me to understand.
Pradu wrote: If so what do you do to generate a score when the KE and PE of a position is known.
The easiest way of looking at it is that we have two sets of KE and PE:
For white: wKE + wPE = wTE
For black: bKE + bPE = bTE
and then try to maximize the TE for the side to move while minimizing the TE for the opponent. The ratio between wTE and bTE is what drives the final score.
In the case where the result from the position is known (say a "mate" is found) the return value that I'm using is +INFINITY. Although this is not necessary, since the ratio would be 1.0, i.e. the opponent has no Energy left.
Pradu wrote: Also what information is in the datastream for the FFT and what do you do with the (I'm guessing peak-power) frequencies obtained from power spectrum?
The energy maps is what drives the FFT. These maps are two dimensional (2D FFT) and provide information about energy distribution within the system and not just the peak, i.e. band-power is IMO more valuable than absolute peak-power.
As you can imagine at this point in the evaluation we are completely removed from any notion of "chess knowledge".
Pradu wrote:
Indeed it sounds like a very expensive eval if you have to generate a datastream for each position and do an FFT on it, but I guess one would need to do some testing to see if the quality of the knowledgeless eval is good enough to offset the loss in search depth.
I don't know if this is better than the "built in chess knowledge" approach, but the sheer novelty factor makes it more fun to experiment with. In fact, this approach might not lead to a better playing chess program.
There are many different ways to generate the Energy maps and even more ways to analyze them. For instance the FFTs are not necessary, but it is surely fun to see a spectrogram of a chess position.
Regards and Good morning,
Hristo