Building Your Own Agent
In the previous section, we discussed the basic components of the autonomous-learning-library
.
While the library contains a selection of preset agents, the primary goal of the library is to be a tool to build your own agents.
To this end, we have provided an example project containing a new model predictive control variant of DQN to demonstrate the flexibility of the library.
Briefly, when creating your own agent, you will generally have the following components:
An
agent.py
file containing the high-level implementation of theAgent
.A
model.py
file containing the PyTorch models appropriate for your chosen domain.A
preset.py
file that composes yourAgent
using the appropriate model and other objects.A
main.py
or similar file that runs your agent and anyautonomous-learning-library
presets you wish to compare against.
While it is not necessary to follow this structure, we believe it will generally guide you towards using the autonomous-learning-library
in the intended manner and ensure that your code is understandable to other users of the library.