Is there a database of endgame positions with known perfect play? Perfect play as in, it leads to checkmate in the least moves possible. Not just forced mates.
Yes, it is call Lomonosov table : link

It is all the positions with 7 or less pieces and the whole answer is known.