egttools.analytical.utils.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], ndarray]) – 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, optional) – Number of additional random starting points on the simplex (besides the simplex vertices), by default 3.
atol (float, optional) – Absolute tolerance for determining if a point lies in the unit simplex, by default 1e-7.
tol_close_points (float, optional) – Tolerance for considering two stationary points as identical, by default 1e-4.
method (str, optional) – 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:
List[npt.NDArray[np.float64]]