Optimal ending

From IFWiki

In a game with multiple endings, that ending which yields the highest score (or that otherwise signifies the "best" outcome).

For example, a western-themed game might involve three main goals: winning the girl, the gold, and the horses. A player who achieves any one of these goals might be considered to have won, but the optimal ending may require the player to win the girl, the gold, and the horses. The player might be permitted to end the game prematurely, by leaving town without accomplishing any of the goals—but such an ending would hardly be optimal.