Azzera filtri
Azzera filtri

AbstractPolicy.m debug warning

1 visualizzazione (ultimi 30 giorni)
kloner
kloner il 2 Lug 2021
Modificato: kloner il 7 Lug 2021
Hi there,
Could someone please explain what the following debug warning in AbstractPolicy.m means?
% DEBUG: limit to scalar policies only. To step multiple
% policies caller may use loops.
assert(isscalar(this));

Risposte (2)

Yongjian Feng
Yongjian Feng il 2 Lug 2021
Hello kloner,
Basically it means that 'this' can not be an array. It must be a scaler. As explained in the comment, if you have an array, then just loop through the array and call the function for each element in the array.
Thanks,
Yongjian
  2 Commenti
kloner
kloner il 2 Lug 2021
Modificato: kloner il 2 Lug 2021
Dear Yongjian,
This explanation does not make a lot of sense to me as "this" refers to an rlQAgent (in the step method). I only have one agent, so how could I be failing on this error?
Thanks very much for the help.
Yongjian Feng
Yongjian Feng il 2 Lug 2021
What is an riQAgent?
You can also do these to narrow it down:
  1. If you run this from the debugger, set a break point there, and type isscalar(this) in the command line window.
  2. type class(this) to make sure it is indeed riQAgent.
  3. type which isscalar to check if it is the built-in isscalar being called.

Accedi per commentare.


kloner
kloner il 4 Lug 2021
Dear Yongjian,
An rlQAgent is a MATLAB-provided Reinforcement Learning agent, as described here: https://www.mathworks.com/help/reinforcement-learning/ref/rlqagent.html.
Apologies for any confusion: I thought that the context would be clear based on the information I originally submitted. I hope that this clarification provides sufficient information to explain the Debug message as originally alluded to. Thanks.
  3 Commenti
kloner
kloner il 6 Lug 2021
Modificato: kloner il 7 Lug 2021
Dear Yongjian,
I specifically hoping that someone could explain what a debug message found within AbstractPolicy.m, which is a file created by the MATLAB core team, meant. The warning does not appear when I call the file but is located specifically within the file itself.
Yongjian Feng
Yongjian Feng il 7 Lug 2021
No attachments here. Can you double check please?

Accedi per commentare.

Categorie

Scopri di più su Interpolation in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by