I have tried it, but this problem occurs.
**expectedValue = (self.gamma * nextValue) + reward**

**  File “/home/tommy/anaconda2/lib/python2.7/site-packages/torch/autograd/variable.py”, line 676, in add**
**    return self.add(other)**
**  File “/home/tommy/anaconda2/lib/python2.7/site-packages/torch/autograd/variable.py”, line 286, in add**
**    return self._add(other, False)**
**  File “/home/tommy/anaconda2/lib/python2.7/site-packages/torch/autograd/variable.py”, line 282, in _add**
**    assert not torch.is_tensor(other)**
AssertionError