How paddlepaddle/parl works
PARL is a reinforcement-learning framework: users define models, algorithms, and agents, then train agents against environments; its algorithm catalog spans multiple backends. The README also documents optional distributed execution through remote actors, and the tree includes a Waymax autonomous-driving training application and a C++ evolution-strategies kit. Core abstraction and remote relationships below follow README statements; implementation links are limited to relationships visible in the supplied excerpts or SOURCE INDEX, so unsampled subsystems are shown without speculative call chains.
Main entry points: core Algorithm abstractions · worker.py Cluster worker · es_agent.cc Evolution agents · train.py Waymax training
Components 22
RL framework
- Agent abstractions
parl/core - Algorithm abstractions
parl/core - Model abstractions
parl/core/model_base.py - Fluid model
parl/core/fluid/model.py - Backend agents
parl/core/paddle/agent.py - Fluid layers
parl/core/fluid/layers/layer_wrappers.py
Algorithm catalog
- Fluid algorithms
parl/algorithms/fluid - Paddle algorithms
parl/algorithms/paddle - Torch algorithms
parl/algorithms/torch
Environments
- RL environments
parl/env
Distributed training
- Remote API
parl/remote/remote_decorator.py - Cluster client
parl/remote/client.py - Cluster worker
parl/remote/worker.py - Resource manager
parl/remote/worker_manager.py - Heartbeat service
parl/remote/grpc_heartbeat/heartbeat_server.py
Specialized training
- ES sampling
evo_kit/core/src/cached_gaussian_sampling.cc - ES optimizers
evo_kit/core/src/optimizer_factory.cc - Evolution agents
evo_kit/paddle/src/es_agent.cc - Waymax training
waymax_rl/train.py - Waymax vector env
waymax_rl/utils/env_wrapper.py - Runner builder
waymax_rl/utils/build_runner.py
Other components
- Developer
Connections 17
- Developer → Agent abstractions: defines agent
README.md - RL environments → Agent abstractions: supplies experience
README.md - Agent abstractions → Algorithm abstractions: bridges data
README.md - Algorithm abstractions → Model abstractions: updates parameters
README.md - Fluid model → Fluid layers: uses layers
parl/core/fluid/model.py - Fluid algorithms → Algorithm abstractions: backend algorithms
- Paddle algorithms → Algorithm abstractions: backend algorithms
parl/algorithms/paddle/cql.py - Torch algorithms → Algorithm abstractions: backend algorithms
parl/algorithms/torch/mappo.py - Developer → Remote API: decorates class
README.md - Remote API → Cluster client: connects client
- Cluster client → Cluster worker: submits jobs
- Cluster worker → Resource manager: reports resources
parl/remote/worker.py - Cluster worker → Heartbeat service: starts heartbeat
- Waymax training → Runner builder: builds runner
waymax_rl/train.py - Waymax training → Waymax vector env: configures environment
waymax_rl/train.py - Evolution agents → ES sampling: uses sampler
- Evolution agents → ES optimizers: uses optimizer