* add readme.md of a2c and modify the parl version of aplhazero * add readme.md of a2c * modify readme * modify readme * modify readme.md * modify the image of readme * modify the size image of readme
|2 months ago|
|.github||1 year ago|
|.teamcity||3 months ago|
|benchmark||2 months ago|
|docs||2 months ago|
|evo_kit||9 months ago|
|examples||2 months ago|
|papers||2 months ago|
|parl||2 months ago|
|.copyright.hook||1 year ago|
|.gitignore||2 years ago|
|.pre-commit-config.yaml||2 years ago|
|.readthedocs.yml||1 year ago|
|.travis.yml||1 year ago|
|CMakeLists.txt||3 months ago|
|LICENSE||3 years ago|
|MANIFEST.in||1 year ago|
|README.cn.md||5 months ago|
|README.md||5 months ago|
|setup.py||6 months ago|
PARL is a flexible and high-efficient reinforcement learning framework.
Reproducible. We provide algorithms that stably reproduce the result of many influential reinforcement learning algorithms.
Large Scale. Ability to support high-performance parallelization of training with thousands of CPUs and multi-GPUs.
Reusable. Algorithms provided in the repository could be directly adapted to a new task by defining a forward network and training mechanism will be built automatically.
Extensible. Build new algorithms quickly by inheriting the abstract class in the framework.
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
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.
PARL provides a compact API for distributed training, allowing users to transfer the code into a parallelized version by simply adding a decorator. For more information about our APIs for parallel training, please visit our documentation.
Here is a
Hello World example to demonstrate how easy it is to leverage outer computation resources.
#============Agent.py================= @parl.remote_class class Agent(object): def say_hello(self): print("Hello World!") def sum(self, a, b): return a+b parl.connect('localhost:8037') agent = Agent() agent.say_hello() ans = agent.sum(1,5) # it runs remotely, without consuming any local computation resources
Two steps to use outer computation resources:
parl.remote_classto decorate a class at first, after which it is transferred to be a new class that can run in other CPUs or machines.
parl.connectto initialize parallel communication before creating an object. Calling any function of the objects does not consume local computation resources since they are executed elsewhere.
For users, they can write code in a simple way, just like writing multi-thread code, but with actors consuming remote resources. We have also provided examples of parallized algorithms like IMPALA, A2C and GA3C. For more details in usage please refer to these examples.
pip install parl