How do I properly substitute rlRepresentation with rlValueRepresentation, rlQValueRepresentation, rlDetermin​isticActor​Representa​tion, and rlStochast​icActorRep​resentatio​n?

9 views (last 30 days)
I am using MATLAB r2020a where rlRepresentation is "not recommended." As a result, I am forced to substitute it with the criritics or actors in the following compatibility guide ( I tried replacing rlRepresentation with rlValueRepresentation, rlQValueRepresentation, rlDeterministicActorRepresentation, and rlStochasticActorRepresentation (though I left rlRepresentationOptions as is where it came up). They all resulted in errors, and rlValueRepresentation and rlStochasticActorRepresentation had the fewest (and the same) errors:
Error using rlStochasticActorRepresentation (line 93)
Too many input arguments.
Error in createDDPGNetworks (line 51)
critic = rlStochasticActorRepresentation (criticNetwork,criticOptions, ...
Since both this critic and actor have the same error, I think it might have something to do with rlRepresentationOptions since it gives properties to the actors or critics (as far as I understand).
For reference, I am trying to emulate this project ( in MATLAB r2020a.
Any help is appreciated.

Answers (3)

Emmanouil Tzorakoleftherakis
It would be helpful if you pasted the exact MATLAB code you are typing to see what the problem is. I suspect you simply changed the method name, which is why you get the error you are seeing. Have a look at the documentation page for the respective method you want to use (rlValueRepresentation etc) and make sure the order and number of arguments matches the doc.

Salma Khaled
Salma Khaled on 5 Aug 2021
  1. Create an actor using an rlDeterministicActorRepresentation object.
  2. Create a critic using an rlQValueRepresentation object

Giampiero Campa
Giampiero Campa on 6 Aug 2021
Edited: Giampiero Campa on 6 Aug 2021
The table in this page might help.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!