egttools.analytical.utils.find_roots_and_stability¶
- find_roots_and_stability(gradient_function, nb_strategies, nb_initial_random_points=100, atol=1e-08, atol_neg=1e-08, atol_pos=1e-08, atol_zero=1e-08, tol_close_points=0.001, method='hybr')[source]¶
Find fixed points of the gradient function and determine their stability.
- Parameters:
gradient_function (Callable) – Function computing the gradient vector for given frequencies.
nb_strategies (int) – Number of strategies in the game.
nb_initial_random_points (int, optional) – Number of initial random points sampled from the simplex, by default 100.
atol (float, optional) – Tolerance for convergence of root finding.
atol_neg (float) – Threshold for negative eigenvalues to consider stable direction.
atol_pos (float) – Threshold for positive eigenvalues to consider unstable direction.
atol_zero (float) – Threshold for eigenvalues close to zero.
tol_close_points (float) – Tolerance to merge close fixed points.
method (str) – Root-finding method to use (e.g. ‘hybr’, ‘lm’).
- Returns:
A list of fixed points and their associated stability categories.
- Return type:
Tuple[List[numpy.ndarray], List[int]]