Closed mmcelikok closed 2 years ago
Thanks for reaching out!
As a temporary solution, I've changed the value to a large number. We'll figure a better solution for this soon.
Thanks for reaching out!
As a temporary solution, I've changed the value to a large number. We'll figure a better solution for this soon.
It actually has a simpler solution than I thought. The issue is due to the next line actually:
return gym.spaces.Box(high * 0, high, dtype=np.float32)
The 0*high is the problem. This solves it:
high = np.ones(obs_shape) * float("inf")
low = np.zeros(obs_shape)
return gym.spaces.Box(low, high, dtype=np.float32)
Ah, I see, you're right that this is much nicer 😅 Thanks so much for your response!
https://github.com/HumanCompatibleAI/overcooked_ai/blob/bdbf0232adde1412db87975d0ec2357093775ef4/src/overcooked_ai_py/mdp/overcooked_env.py#L549
This line was added to fix the "soup_cooking_time" issue. But now it returns: "RuntimeWarning: invalid value encountered in multiply gym.spaces.Box(high * 0, high, dtype=np.float32)".
Simple printing shows that variable high is an array of Infs, and thus high * 0 becomes an array of NaNs.