Obstacle Avoidance and Trajectory Following Experiment with e-puck using Evolutionary Algorithms Boris Mocialov Heriot-Watt University Edinburgh, United Kingdom bm4@hw.ac.uk Nigar Mehraliyeva Heriot-Watt University Edinburgh, United Kingdom nm17@hw.ac.uk Alipasha Jamalli Heriot-Watt University Edinburgh, United Kingdom aj11@hw.ac.uk Abstract—This paper describes implementation and evaluation processes, results of experiments which have been done to achieve following the line and avoiding obstacles behavior for e-puck robot. Keywords—evalutionary robotics; behavior-based robotics; controller; neural network; fitness function I. INTRODUCTION This paper describes implementation and evaluation processes of e-puck robot controller and differences between behavior-based and evolutionary robotics approaches. The task of the robot is following the line on the ground all the time and avoiding obstacles while racing to finish the circuit as quick as possible. Evolutionary robotics techniques have been applied to evaluate the robot controller. And Robot controllers have been developed using Webots simulator software. II. IMPLEMENTATION AND EVOLUTION A. Implementation All simulations were run according to the following set up: Rank selection Mutate every gene with mutation probability and mutation deviation Two-point crossover Elite part: 10% Mutation probability: 10% Mutation deviation: 20% Population: 50 Generations: 1000 Multilayer perceptron neural network model is used to make decision for robot controller. The input layer consists of eleven neurons, which are corresponds to sensors (eight proximity sensors and three ground sensors) and output layer consists of two neurons according to wheel speed (right and left wheel speeds). As there is no standard way to determine the appropriate artificial neural network structure, different number of hidden layers with different number of neurons for each layer were experimented. A neural network structure without bias including single, two, three, four hidden layers, firstly, with five neurons in each hidden layer, then changing the number of neurons between two and ten in second hidden layer were tested. Sigmoid function was selected as activation function. During use of above mentioned neural network architectures the robot tended to go around the field at every evaluation, not coming back to the line after avoiding the first obstacle on its way. Even changes in the amount of hidden layers and the number of neurons for each layer doesn’t affect to performance. Another applied approach was based on splitting neural network into two parts, where one section will be responsible for the line following and another for obstacle avoidance. Either one or another sub-network will be active at a time depending on whether a robot is currently following a line or avoiding an obstacle. Sigmoid activation function was chosen to propagate signal that arrives to a node. To introduce more flexibility to the network, variable slope of the activation function had been chosen. The slope of every node had been evolved using the same genetic algorithm that was used for the evolution of the weights for the line following and another for obstacle avoidance. Either one or another sub-network will be active at a time depending on whether a robot is currently following a line or avoiding an obstacle. B. Evolution Different type of crossover operators like as: box crossover, line crossover, two-point crossover (all crossover operators with different probabilities) were tested. But the obtained e- puck robot behavior did not differ much with applying different type of crossover operators with different probabilities.