The Nash algorithms have always returned simply a list of computed profiles. This standardisation ultimately dates back to algorithms being classes deriving from a base class, so a generic Solve signature was enforced.
A better and more modern design will be for each method to return a suitable Result object, which contains not just the computed equilibria (or other quantities) but, possibly, details on the operation of the algorithm and/or any error or warning conditions.
In particular the shape of the return value no longer needs to be a list. Some methods are only ever going to return a single profile, so returning a list is somewhat misleading; a std::optional would work (to allow for the possibility of an error return with a null profile. Likewise other methods may have more structured output (e.g. cliques for two-player games expressing convex sets of profiles).
The Nash algorithms have always returned simply a list of computed profiles. This standardisation ultimately dates back to algorithms being classes deriving from a base class, so a generic
Solvesignature was enforced.A better and more modern design will be for each method to return a suitable
Resultobject, which contains not just the computed equilibria (or other quantities) but, possibly, details on the operation of the algorithm and/or any error or warning conditions.In particular the shape of the return value no longer needs to be a list. Some methods are only ever going to return a single profile, so returning a list is somewhat misleading; a
std::optionalwould work (to allow for the possibility of an error return with a null profile. Likewise other methods may have more structured output (e.g. cliques for two-player games expressing convex sets of profiles).