egttools.plotting.simplified.find_roots¶
- find_roots(gradient_function, nb_strategies, nb_initial_random_points=3, atol=1e-07, tol_close_points=0.0001, method='hybr')[source]¶
Search for the roots (stationary points) of the given gradient function on the unit simplex.
- Parameters:
gradient_function (
Callable[[NDArray[double]],NDArray[double]]) – Function returning the gradient of selection given a population state.nb_strategies (
int) – Number of strategies/types present in the population.nb_initial_random_points (
int) – Number of additional random starting points on the simplex (besides the simplex vertices), by default 3.atol (
float) – Absolute tolerance for determining if a point lies in the unit simplex, by default 1e-7.tol_close_points (
float) – Tolerance for considering two stationary points as identical, by default 1e-4.method (
str) – Root-finding method to use (passed to scipy.optimize.root), by default “hybr”.
- Returns:
A list of stationary points (roots) found, where each point is a 1D NumPy array of shape (nb_strategies,).
- Return type: