tensortrade.agents.agent module

class tensortrade.agents.agent.Agent[source]

Bases: tensortrade.base.core.Identifiable

get_action(state, **kwargs)[source]

Get an action for a specific state in the environment.

Return type:int
restore(path, **kwargs)[source]

Restore the agent from the file specified in path.

save(path, **kwargs)[source]

Save the agent to the directory specified in path.

train(n_steps=None, n_episodes=10000, save_every=None, save_path=None, callback=None, **kwargs)[source]

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

Return type:float