Closed porterjenkins closed 6 years ago
` try: gain = 1 / (1 + math.exp(- F_next + F_cur)) except OverflowError:
gain = math.exp(F_next + F_cur)/(1 + math.exp(F_next + F_cur))`
I think I have a decent solution for this. See commit 3b5581e9c171da640b0d7ec8e9d84c6331cdc10c when you can.
When we run q_learning.py, we are getting an error when we compute the gain (presumably the change in the energy function F). This occurs at line 210 of q_learning.py:
gain = 1 / (1 + math.exp(- F_next + F_cur))