smarts.core.agent module

class smarts.core.agent.Agent[source]

The base class for agents

abstract act(obs, **configs)[source]

The agent action. See documentation on observations, AgentSpec, and AgentInterface.

Expects an adapted observation and returns a raw action.

classmethod from_function(agent_function: Callable[[Any], Any]) Agent[source]

A utility function to create an agent from a lambda or other callable object.

keep_lane_agent = Agent.from_function(lambda obs: "keep_lane")
smarts.core.agent.AgentSpec(*args, **kwargs)

Deprecated version of AgentSpec, see smarts.zoo.agent_spec

class smarts.core.agent.FunctionAgent(agent_function)[source]

An agent generated from a function.

act(obs, **configs)[source]

The agent action. See documentation on observations, AgentSpec, and AgentInterface.

Expects an adapted observation and returns a raw action.

smarts.core.agent.deprecated_agent_spec(*args, **kwargs)[source]

Deprecated version of AgentSpec, see smarts.zoo.agent_spec