Skip to content

Commit

Permalink
add Building Your Own Agent
Browse files Browse the repository at this point in the history
  • Loading branch information
cpnota committed Jan 16, 2020
1 parent c09eb8c commit e83250e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/source/guide/creating_agent.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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 <https://github.com/cpnota/all-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:

1. An ``agent.py`` file containing the high-level implementation of the ``Agent``.
2. A ``model.py`` file containing the PyTorch models appropriate for your chosen domain.
3. A ``preset.py`` file that composes your ``Agent`` using the appropriate model and other objects.
4. A ``main.py`` or similar file that runs your agent and any ``autonomous-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.
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This documentation is under construction!

guide/getting_started
guide/basic_concepts
guide/creating_agent

.. toctree::
:maxdepth: 2
Expand Down

0 comments on commit e83250e

Please sign in to comment.