You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Train.lua, there is one bug. At line 82, the code is as follows:
local target = model:forward(memoryInput.inputState)
--Gives us Q_sa, the max q for the next state.
local nextStateMaxQ = torch.max(model:forward(memoryInput.nextState), 1)[1]
As you can see, we call model:forward two times.
But after second call of model:forward, target tensor is also changed.
I don't know whether it's a bug of Torch or not.
To learn correctly, you should change above code at line 82 as follows:
local target = model:forward(memoryInput.inputState):clone()
After that when we learn Train.lua, we could see err is diminishing and WinCount is increasing more rapidly.
Anyway, I'd like to thank you for your endeavor. I learned a lot about RL from your code.
The text was updated successfully, but these errors were encountered:
In Train.lua, there is one bug. At line 82, the code is as follows:
local target = model:forward(memoryInput.inputState)
As you can see, we call model:forward two times.
But after second call of model:forward, target tensor is also changed.
I don't know whether it's a bug of Torch or not.
To learn correctly, you should change above code at line 82 as follows:
local target = model:forward(memoryInput.inputState):clone()
After that when we learn Train.lua, we could see err is diminishing and WinCount is increasing more rapidly.
Anyway, I'd like to thank you for your endeavor. I learned a lot about RL from your code.
The text was updated successfully, but these errors were encountered: