Skip to main content
. 2025 Jul 17;10(7):469. doi: 10.3390/biomimetics10070469
Algorithm 1 Visuomotor Control for Humanoid Loco-manipulation Tasks
Require: batch size M, trajectory length N, number of actors K, replay size R, exploration
      constant ϵ, initial learning rates α0 and β0
Learner
  1: Initialize visual encoder weights v, which is shared by actor and critic networks (θ,w)
  2: Initialize the remaining network weights (θ,w) at random
  3: Initialize target weights θ′,w′←(θ,w)
  4: Launch K actors and replicate network weights (θ,w) to each actor
  5: for  t=1,…,T do
  6:       Sample M transitions si:i+N,ai:i+N−1,ri:i+N−1 of length N from replay with priority pi
  7:       Construct the target distributions Yi=∑n=0N−1γnri+n+γNZw′si+N,πθ′si+N
  8:       Compute the actor and critic updates
         δθ=1M∑i∇θπθsiE∇aZwsi,aa=πθsi
         δw=1M∑i∇wRpi−1dYi,Zwsi,ai
  9:       Update network parameters θ←θ+αtδθ,w←w+βtδw
10:       If t=0modttarget, update the target networks θ′,w′←(θ,w)
11:       If t=0modtactors, replicate network weights to the actors
12: end for
13: return policy parameters θ
Actor
  1: repeat
  2:     wait until current movement step finishes
  3:     Sample action a=πθ(s)+ϵN(0,1)
  4:     Esecute action a, observe reward r and state s′, which includes an one-hot vector
      representing current FSM state
  5:     Calculate priority p using Equation (6)
  6:     Store s,a,r,s′,p in replay
  7: until Learner finishes