- π· Worker, a worker creates a task to run an experiment in background. It periodically sends out transitions between agent and environment, and fetches latest parameter.
- π’ WorkerProxy, a worker proxy collects messages from/to workers on the same node so that some message data (model params) can be shared accross different workers.
- πΏ TrajectoryManager, a trajectory manager is a wrapper around an
AbstractTrajectory. It takes in a bulk of transitions and samples a batch of training data in respond to rquests. - π‘ Trainer, a trainer is a wrapper around an
AbstractPolicy, it does nothing but to update its internal parameters when received a batch of training data and periodically broadcast its latest parameters. - β±οΈ Orchestrator, an orchestrator is in charge of controlling the start, stop and the speed of communications between the above components.
Note that:
- We adopt the actor model here. Each instance of the above components is an actor. Only messages are passing between them.
- A node is a process in Julia. Different nodes can be on one machine or accross different machines.
- Tasks in different workers are initiated with
Threads.@spawn. There's no direct communication between them by design. - In single node environment (
WorkerNodeandMainNodeare the same one), the WorkerProxy can be removed and workers communicate with Orchestrator directly.
- 1οΈβ£ (π· β π’)
InsertTransitionMsg, contains the local transitions between agent and environment in an experiment. - 2οΈβ£ (π’ β β±οΈ)
InsertTransitionMsgfrom different workers. - 3οΈβ£ (β±οΈ β πΏ)
InsertTransitionMsgandSampleBatchMsg(which contains the address of Trainer). - 4οΈβ£ (πΏ β π‘)
BatchTrainingDataMsg - 5οΈβ£ (π‘ β πΏ)
UpdatePriorityMsg, only necessary in prioritized experience replay related algorithms. - 6οΈβ£ (π‘ β β±οΈ)
LoadParamsMsg, contains the latest parameters of the policy. - 7οΈβ£ (β±οΈ β π’)
LoadParamsMsg - 8οΈβ£ (π’ β π·)
LoadParamsMsg
