lichess.org
Donate

Understanding engines evaluation.

@Paco67

Let's call the starting position A. Then we go to B, and then to C.

At A, there are lots of possibilities to consider. There's B. And then there's also a bunch of other lines: B2, B3, B4, B5, etc. For each of these lines, the engine needs to look at the next possibility. B followed by C, B followed by C2, B:C3, B:C4, etc. Then B2:C1, B2:C2, B2:C3, etc. That's a lot of calculations.

Now, let's evaluate B. The computer can just look at B followed by C, B:C2, etc. It doesn't need to also look at all the B2, B3, etc positions that may have happened with different play. So now it can look further down the chain.

The engine can only search so far ahead. This is called the "horizon effect" in AI. (Your English is much better than any other language I speak. You're doing great. Maybe this would make more sense to you, though, if you googled things like the horizon effect and were able to read them in your native language?)

Some engines, like Stockfish, compensate for this by combining brute force calculations with knowledge specifically created by chess experts. Some engines, like Alpha Zero and Leela Chess Zero, become stronger by playing or analyzing millions of games. The moves and the moves that lead to patterns it recognizes are reinforced when the result of the game is a win. With enough training material, the moves that started out as quasi-random become stronger and stronger.

There isn't just a single way of evaluating a position and giving it a numerical value. If you ask the engine to recalculate further down the line, you'll get different results. Depending on the complexity of the position, that evaluation may change radically if the engine is allowed to find a new threat it didn't see previously.

Does that help any more?
@ericmsd "The engine can only search so far ahead. This is called the "horizon effect" in AI."

That is the explanation. "horizon effect"

I am tremendously grateful, thank you very much @ericmsd

The point is that the modules after performing an evaluation give a numerical value. It does not matter if it is the absolute truth or it is not, that does not matter. What matters is that this value must always be the same under the same conditions.

If I put a position in the editor of the lichess board and I ask it to evaluate it, with fixed conditions and with the same computer and for the same time, the number value will always be the same.

Thanks. Thanks.
@Paco67

"If I put a position in the editor of the lichess board and I ask it to evaluate it, with fixed conditions and with the same computer and for the same time, the number value will always be the same."

I'm not sure current engines are always deterministic. I'm fairly confident that was true before AlphaZero, but my understanding is that AlphaZero and Leela Chess Zero use a Monte Carlo Tree Search, so they would tend to be more stochastic.

Since Stockfish has added a neural net, I don't know if it is entirely deterministic any more.

I was curious, so I did a search and found this:

en.chessbase.com/post/monte-carlo-instead-of-alpha-beta

That said, I suspect that the numeric evaluation will probably only differ by less than a rounding error, so what I just said is more theoretical than practical. :)
@ericmsd

Monte Carlo
Suppose we have 1000 people with hats in a closed room. The hats are colored (red, green, blue, ..., etc). We have to count how many red hats are in the room in just 5 minutes. At this time we can only check the color of 100 hats. After this check we make a prediction based on the result obtained.

In a first attempt of 5 minutes we check that there are 15 red hats among the 100 checked, then the prediction will be that there will be 150 red hats in total.

In a second attempt of 5 minutes we check that there are 17 red hats among the 100 checked, then the prediction will be that there will be 170 red hats in total.

Final Result depend on testing results.

Alpha-Beta

Suppose we have 1000 people with hats in an orderly line on a street. The hats are colored (red, green, blue, ..., etc). We have to count how many red hats are in line in just 5 minutes. At this time we can only check the color of 100 hats. After this check we make a prediction based on the result obtained.

In a first attempt of 5 minutes we check that there are 15 red hats among the first 100 checked, then the prediction will be that there will be 150 red hats in total.

In a second attempt of 5 minutes we check that there are 15 red hats among the first 100 checked, then the prediction will be that there will be 150 red hats in total.

Final Result is always the same.

Is this what you are saying?

This topic has been archived and can no longer be replied to.