madupite.createStageCostMatrix#

madupite.createStageCostMatrix(*, comm: int = 0, name: str = '', numStates: int, numActions: int, func: collections.abc.Callable[[int, int], float]) madupite._madupite_impl.Matrix#

Creates a stage cost matrix for a Markov Decision Process (MDP).

This function constructs a matrix that represents the cost associated with each state-action pair in an MDP.

Parameters#

commint, optional

The communicator identifier for parallel computation.

namestr

The name of the stage cost matrix, used for identification within the MDP environment.

numStatesint

The total number of states in the Markov Decision Process.

numActionsint

The total number of possible actions in the Markov Decision Process.

funcCallable[[int, int], float]

A callable function that takes in two arguments: a state index and an action index. It returns a float representing the cost associated with that state-action pair.

Returns#

madupite.madupite.Matrix

A matrix object representing the stage cost matrix.