berkeleydeeprlcourse / homework

Assignments for CS294-112.
MIT License
1.56k stars 1.04k forks source link

Cost function in HW4, index error, dimension of states #11

Closed jj-zhu closed 6 years ago

jj-zhu commented 6 years ago

Hi,

It seems the cost function for the half-cheetah environment (cost_functions.py) has a mistake. I'm getting the error

---> 50     score -= (next_state[17] - state[17]) / 0.01 #+ 0.1 * (np.sum(action**2))
IndexError: index 17 is out of bounds for axis 0 with size 17

Is the dimension 17 correct for the environment? Thanks :)

jj-zhu commented 6 years ago

Never mind, figured out :p