Skip to content

Transitions

Deterministic transition function. It selects the action from the set of actions and applies it to the state.

Parameters:

Name Type Description Default
state State

The current state of the game.

required
action Array

The action to be taken.

required
actions_set Tuple[Callable[[State], State]

A set of actions that can be taken.

required

Returns:

Name Type Description
State State

The new state of the game.

Stochastic transition function. It selects the action from the set of actions and applies it to the state, and updates entities that have stochastic transitions, such as balls.

Parameters:

Name Type Description Default
state State

The current state of the game.

required
action Array

The action to be taken.

required
actions_set Tuple[Callable[[State], State]

A set of actions that can be taken.

required

Returns:

Name Type Description
State State

The new state of the game.

Update the position of the balls in the game. Balls move in a random direction if they can, otherwise they stay in place.

Parameters:

Name Type Description Default
state State

The current state of the game.

required

Returns:

Name Type Description
State State

The new state of the game.