Choose randomly between two functions
3 views (last 30 days)
I'm implementing a Double Q-Learning Algorithm to the pendulum-v0. I'm looking at the pseudocode and there's one part of the algorithm which I'm not sure how to write.
If you see on line 8, it states:
With Pr = 0.5:
Alternatively the choice between Q_a and Q_b can be random. How can I implement this in my code so that for each episode either Q_a or Q_b are selected and run?
Thank you in advance!