Fix numerical bug in softmax

- add stable version of calculating softmax
- add test, in which exponentiated reward is too huge and softmax
  results in nan
- add gaussian and constant reward function