Skip to content
DeepForgeby svx
All problems

Target Network Lag Effect

Problem

Compute the target network after a fixed number of soft updates while the online network stays fixed.

After n steps the target equals online + (target0 - online) * (1 - tau)^n. Return the resulting vector.

Hint

The target lags the online network by a geometric factor (1 - tau) per step.

Test cases

case 1
in: [[0,0],[10,20],0.1,1]
expected: [1,2]
case 2
in: [[0,0],[10,20],0.1,10]
expected: [6.513215598999999,13.026431197999997]
case 3
in: [[1,2],[1,2],0.5,5]
expected: [1,2]
Starter codePython
def target_network_lag(target, online, tau, steps):
    # Your code here
    pass

3 test cases · run your code against them in the editor