action selection
added if-else for egreedy and softmax