deep-rl-class
deep-rl-class copied to clipboard
unit2-record_video-logical operator precedence
Hi, In "unit2.ipynb", function "record_video", it seems like there is an issue with "not" and "or" logical operators precedence in the following "while" expression: "while not terminated or truncated" The logical expression "terminated or truncated" should be enclosed in parentheses, otherwise for terminated = 0 and truncated = 1 the logical expression "not terminated or truncated" will not yield the False value. So: "while not terminated or truncated" -> "while not (terminated or truncated)"
The current version (without parentheses) would be true if "or" had higher precedence than "not", while the opposite is true, i.e., "not">"or".