"The New Prime" is a science fiction novelette by American writer Jack Vance, first published in the February 1951 issue of Worlds Beyond as "Brain of the Galaxy".
Then the scene shifts to a soldier leading his men in a battle against huge insectoid aliens.
Next, the retainer to a lord must race against the clock to find a legal document in a crumbling city to save his master from being executed.
It turns out that each of these situations is one of a series of virtual reality tests devised by the Prime, the current leader of the galaxy, to evaluate candidates for his successor.
The Elders, however, feel that the nature of the tests shed light on his deficiencies, and that other, more empathetic qualities are of greater importance.