Greedy Policy

Ver. 1.0.1 (2024-01-18)

This module provides solver with greedy GT strategy. There are two variants, such as minimum greedy and maximum greedy.

class mlpro.gt.pool.native.solvers.greedypolicy.MaxGreedyPolicy(p_strategy_space: MSpace, p_id=None, p_visualize: bool = False, p_logging=True, **p_param)

Bases: GTSolver

A solver that generates actions for each dimension of the underlying strategy space based on the maximum greedy policy.

C_NAME = 'MaxGreedyPolicy'
_compute_strategy(p_payoff: GTPayoffMatrix) GTStrategy

A method to compute a strategy from the solver. This method needs to be redefined.

Parameters:

p_payoff (GTPayoffMatrix) – Payoff matrix of a specific player.

Returns:

The computed strategy.

Return type:

GTStrategy

_call_compute_strategy(p_payoff: GTPayoffMatrix) GTStrategy
class mlpro.gt.pool.native.solvers.greedypolicy.MinGreedyPolicy(p_strategy_space: MSpace, p_id=None, p_visualize: bool = False, p_logging=True, **p_param)

Bases: GTSolver

A solver that generates actions for each dimension of the underlying strategy space based on the minimum greedy policy.

C_NAME = 'MinGreedyPolicy'
_compute_strategy(p_payoff: GTPayoffMatrix) GTStrategy

A method to compute a strategy from the solver. This method needs to be redefined.

Parameters:

p_payoff (GTPayoffMatrix) – Payoff matrix of a specific player.

Returns:

The computed strategy.

Return type:

GTStrategy

_call_compute_strategy(p_payoff: GTPayoffMatrix) GTStrategy