|
Algorithm 1 Hierarchical Reinforcement Learning |
-
1:
Initialize experience replay memories and the exploration probability and for the high-level and low-level policies, respectively.
-
2:
Initialize parameters for the online networks and for the target networks.
-
3:
For i = 1, num_episodes do
-
4:
Initialize the navigation and get the start state s.
-
5:
While s is not teriminal do
-
6:
-
7:
-
8:
With probability select a random subgoal g from the PC-GWR nodes
-
9:
Otherwise select
-
10:
while not (s is terminal or goal g is reached) do
-
11:
With probability select a random action a
-
12:
Otherwise select
-
13:
Execute a and obtain the next state and extrinsic reward from the environment
-
14:
Obtain the intrinsic reward
-
15:
Store transition in
-
16:
Sample random mini-batches from
-
17:
Update according to Equation (7)
-
18:
-
19:
-
20:
end while
-
21:
Store transition in
-
22:
Sample random mini-batches from
-
23:
Update according to Equation (6)
-
24:
Every C steps copy to and to
-
25:
end while
-
26:
Anneal and adaptively
-
27:
end for
|