My controlled object is an object with three inputs and three outputs, I now use three parallel reinforcement learning agents to control these three channels, such a scheme is
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
My controlled object is an object with three inputs and three outputs, I now use three parallel reinforcement learning agents to control these three channels, such a scheme is feasible? I would be very grateful for your answer.
0 Kommentare
Antworten (1)
Venu
am 12 Dez. 2023
You can perform parallel computing for multiple agents in the context of using three parallel reinforcement learning agents to control these three channels.
You can refer to the below documentation and also examples provided in this documentation.
https://www.mathworks.com/help/reinforcement-learning/ug/train-agents-using-parallel-computing-and-gpu.html#d126e14864
Here's how you can achieve parallel training of multiple agents based on the above documentation:
1. Create a Parallel Pool: To start, you can create a parallel pool of workers using the parpool function. This allows you to specify the number of workers (N) for your parallel pool.
pool = parpool(N);
2. Configure Parallel Training: When training your agents using multiple processes, you need to pass an "rlTrainingOptions" object to the train function. In this object, set the "UseParallel" property to "true" to enable parallel computing for training.
trainingOptions = rlTrainingOptions('UseParallel', true);
3. Experience-Based Parallelization: In this mode, workers simulate the agent within their copy of the environment and send experience data back to the client. The client then computes the gradients from experiences, updates the agent parameters, and sends the updated parameters back to the workers.
4. Asynchronous and Synchronous Training: Asynchronous training allows the client agent to calculate gradients and update agent parameters without waiting for experiences from all the workers. Synchronous training, on the other hand, waits to receive experiences from all workers and then calculates gradients from all these experiences.
trainOpts.ParallelizationOptions.Mode = "async";
Hope this helps!
3 Kommentare
Siehe auch
Kategorien
Mehr zu Training and Simulation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!