r/ComputerChess • • Mar 07 '20

About the Lichess analysis engine

I noticed that there is a substantial difference between the stockfish with 1 variation enabled vs 5 in Lichess. Which is more accurate and in general what is the difference?

9 Upvotes

8 comments sorted by

2

u/tsojtsojtsoj Mar 07 '20

With one variation you have the stockfish version that is the strongest playing engine. This means that the move and evaluation it gives are as accurate as they get when using stockfish.

If you enable 5 variations, stockfish will sacrifice some compute power to also give more accurate suggestions for other moves (five other variations in your example).

3

u/mansoura60 Mar 08 '20

Thx for responding, But in order to calculate the single line (the best one), I think it needs to evaluate the other lines too no? (to determine if they are bad if that makes sense)

5

u/tsojtsojtsoj Mar 08 '20

Yes, you are partially right. The program has to evaluate all other lines, too.

But for example, if you found a good variation where you win a pawn, you only need to know that every other line is not better than winning a pawn. You don't need to know exactly how many exchanges worse another move is if you will play another move anyway.

This idea speeds up the calculations quite a bit, the algorithm that uses this idea that also got implemented in stockfish is called alpha-beta algorithm: https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning

If you enable multi-variation mode you're telling stockfish to also calculate the exact score for the five (or six, seven, how many you want) best moves so it can't use the linked alpha-beta algorithm to its full extend.

3

u/WikiTextBot Mar 08 '20

Alpha–beta pruning

Alpha–beta pruning is a search algorithm that seeks to decrease the number of nodes that are evaluated by the minimax algorithm in its search tree. It is an adversarial search algorithm used commonly for machine playing of two-player games (Tic-tac-toe, Chess, Go, etc.). It stops evaluating a move when at least one possibility has been found that proves the move to be worse than a previously examined move. Such moves need not be evaluated further.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source ] Downvote to remove | v0.28

1

u/ZZ9ZA Mar 08 '20

Calculating one line 20’moves deep cvs 5 18 Moves deep

2

u/Spill_the_Tea Mar 08 '20

I think you are referring to MultiPV mode of uci engines. Any alpha-beta chess engine (including stockfish) will be stronger looking at a single variation. The reason? Is because MultiPV mode sacrifices depth for breadth of search (i.e. it is now calculating 5 times the work, which takes longer to reach the same search depth).

​

Please note, however, that this idea may not apply to Neural Network Engines such as Lc0.

1

u/[deleted] May 07 '20

Imo seeing more lines will be way better for our development than getting a more accurate evalutation.