Random

A random agent that samples actions uniformly at random from the action space.

Useful for establishing baseline performance and testing environments.

This is a non-learning agent: the update() function does nothing.

class myriad.agents.classical.random.AgentParams(action_space)[source]

Bases: object

Static parameters for the random agent.

Variables:

action_space (myriad.core.spaces.Space) – Action space to sample from.

action_space: Space
__init__(action_space)
replace(**updates)

Returns a new object replacing the specified fields with new values.

class myriad.agents.classical.random.AgentState[source]

Bases: object

State of the random agent.

The random agent is stateless, so this is an empty dataclass.

__init__()
replace(**updates)

Returns a new object replacing the specified fields with new values.

myriad.agents.classical.random.make_agent(action_space)[source]

Factory function to create a random agent.

Parameters:

action_space (Space) – Action space to sample from (supports any Space type).

Returns:

Agent instance with random policy.

Return type:

Agent[AgentState, AgentParams, Observation]