tensortrade.agents.agent module

class tensortrade.agents.agent.Agent[source]

Bases: tensortrade.core.base.Identifiable

abstract get_action(state: numpy.ndarray, **kwargs)int[source]

Get an action for a specific state in the environment.

abstract restore(path: str, **kwargs)[source]

Restore the agent from the file specified in path.

abstract save(path: str, **kwargs)[source]

Save the agent to the directory specified in path.

abstract train(n_steps: int = None, n_episodes: int = 10000, save_every: int = None, save_path: str = None, callback: callable = None, **kwargs)float[source]

Train the agent in the environment and return the mean reward.