index.rst 3.2 KB
Newer Older
L
LI Yunxiang 已提交
1 2 3 4 5
.. PARL_docs documentation master file, created by
   sphinx-quickstart on Mon Apr 22 11:12:25 2019.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

6
*PARL is a flexible, distributed and object-oriented programming reinforcement learning framework.*
L
LI Yunxiang 已提交
7 8 9

Features
----------------
10 11 12 13 14 15 16 17 18 19 20 21 22 23
+------------------------------------------+---------------------------------------+
| **Object Oriented Programming**          | **Distributed Training**              |
+------------------------------------------+---------------------------------------+
|.. code-block:: python                    |.. code-block:: python                 |
|                                          |                                       |
|                                          |  # Absolute multi-thread programming  |
|   class MLPModel(parl.Model):            |  # witout the GIL limitation          |
|     def __init__(self, act_dim):         |                                       |
|       self.fc1 = layers.fc(size=10)      |  @parl.remote_class                   |
|       self.fc2 = layers.fc(size=act_dim) |  class HelloWorld(object):            |
|                                          |      def sum(self, a, b):             |
|     def forward(self, obs):              |          return a + b                 |
|       out = self.fc1(obs)                |                                       |
|       out = self.fc2(out)                |  parl.connect('localhost:8003')       |
24
|       return out                         |  obj = HelloWorld()                   |
25 26 27 28 29 30 31 32 33 34 35
|                                          |  ans = obj.sum(a, b)                  |
|   model = MLPModel()                     |                                       |
|   target_model = copy.deepcopy(model)    |                                       |
+------------------------------------------+---------------------------------------+

Abstractions
----------------
.. image:: ../.github/abstractions.png
  :align: center
  :width: 400px

36
| PARL aims to build an **agent** for training algorithms to perform complex tasks.
37 38 39 40 41 42 43
| The main abstractions introduced by PARL that are used to build an agent recursively are the following:

* **Model** is abstracted to construct the forward network which defines a policy network or critic network given state as input.

* **Algorithm** describes the mechanism to update parameters in the *model* and often contains at least one model.

* **Agent**, a data bridge between the *environment* and the *algorithm*, is responsible for data I/O with the outside environment and describes data preprocessing before feeding data into the training process.
L
LI Yunxiang 已提交
44 45

.. toctree::
B
Bo Zhou 已提交
46 47
    :maxdepth: 1
    :caption: Installation
L
LI Yunxiang 已提交
48 49 50 51

   installation.rst

.. toctree::
B
Bo Zhou 已提交
52 53
    :maxdepth: 1
    :caption: Features
L
LI Yunxiang 已提交
54

B
Bo Zhou 已提交
55
    features.rst
L
LI Yunxiang 已提交
56 57

.. toctree::
B
Bo Zhou 已提交
58 59 60 61
    :maxdepth: 1
    :caption: Tutorial

    getting_started.rst
L
LI Yunxiang 已提交
62
    new_alg.rst
B
Bo Zhou 已提交
63 64 65 66

.. toctree::
    :maxdepth: 2
    :caption: Parallel Training
L
LI Yunxiang 已提交
67

68
    parallel_training/overview.rst
B
Bo Zhou 已提交
69 70
    parallel_training/setup.rst
    parallel_training/recommended_practice.rst
L
LI Yunxiang 已提交
71 72 73 74 75 76 77 78 79 80 81

.. toctree::
   :maxdepth: 1
   :caption: High-quality Implementations

   implementations.rst

.. toctree::
   :maxdepth: 1
   :caption: APIs

B
Bo Zhou 已提交
82 83 84
   model.rst
   algorithm.rst
   agent.rst