changed random_move params in optimal_move method