Added collision check in target probabilities

Also fixed the next state of the target given an action code.