Engine depth during endgame

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Peperoni
Posts: 72
Joined: Sun Nov 01, 2020 5:27 pm
Full name: Richard Porti

Engine depth during endgame

Post by Peperoni »

Hello,

I have noticed that forcing engines to play against each other with a given depth, during engames, they reach very fast the depth (so play very fast) even if there are a lot of moves to consider (for humans), is there a reason why?
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Engine depth during endgame

Post by Dann Corbit »

When the board is sparse there are not nearly so many moves to compute.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
Ajedrecista
Posts: 1968
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Engine depth during endgame.

Post by Ajedrecista »

Hello Richard:

I agree with Dann. Just to bring some numbers into the scene, perft can be useful as well as the number of unique positions. Please imagine the starting position with well-known numbers:

Code: Select all

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

Plies     Perft(Plies)     Positions(Plies)
  0                  1                    1
  1                 20                   20
  2                400                  400
  3              8,902                5,362
  4            197,281               72,078
  5          4,865,609              822,518
  6        119,060,324            9,417,683
  7      3,195,901,860           96,400,335
  8     84,998,978,956          988,192,872
Then imagine the same with the longest loss of the side with more pawns in KQPPvKQP endgame:

https://syzygy-tables.info/?fen=8/8/P7/ ... _w_-_-_0_1

Code: Select all

8/8/P7/1q6/4P3/6Q1/p7/k4K2 w - - 0 1

Plies     Perft(Plies)     Positions(Plies)
  0                  1                    1
  1                  5                    5
  2                122                  122
  3              2,777                2,478
  4             53,927               13,905
  5          1,163,367               79,735
  6         23,058,437              376,367
  7        489,451,797            1,353,023
  8      9,984,707,331            7,135,215
The values of the KQPPvKQP endgame were calculated with JetChess perft counter. It depends on the endgame, but branching factors are key in the explanation. Those numbers are not meant to be understood as an axiom since usual engines do not perform brute force analysis (i.e. searching all the nodes). Engines prune but they prune in both positions and the search tree is usually narrower with less pieces on the board, hence searching deeper in the same amount of time.

Regards from Spain.

Ajedrecista.
Peperoni
Posts: 72
Joined: Sun Nov 01, 2020 5:27 pm
Full name: Richard Porti

Re: Engine depth during endgame

Post by Peperoni »

Very useful information, thank you to both of you ;-)