7.3.4.1. Custom Games
Prerequisites
To set up a player, coalition, and competition, please refer to player, coalition, and competition page.
To set up a payoff function or matrix, please refer to payoff page.
To set up a solver, please refer to solvers page.
Setup a Custom Game
If you already know how to set up coalition/competition, payoff funtion/matrix, and solver. Then, setting up a custom game in MLPro-GT-Native is very simple, where you only need to bring everything together in one method, as follows:
from mlpro.gt.native.basics import * class MyGame(GTGame): C_NAME = 'MyGame' def _setup(self, p_mode, p_ada:bool, p_visualize:bool, p_logging) -> Model: # Setup strategy space ... # Setup a solver, e.g. Random Solver ... # Setup a set of players ... # Setup a set of coalitions ... # Setup a competition (if required) ... # Setup the payoff matrix or function self._payoff = ... return Model