Optimization Techniques for an Artificial Potential Fields Racing Car Controller
Total Page:16
File Type:pdf, Size:1020Kb
Master's Thesis Computer Science Thesis no: MCS-2013:19 December 2013 Optimization Techniques For an Artificial Potential Fields Racing Car Controller A Particle Swarm Optimization approach Nader Abdelrasoul School of Computing Blekinge institute of Technology SE – 371 79 Karlskrona i This thesis is submitted to the School of Computing at Blekinge Institute of Technology in partial fulfillment of the requirements for the degree of Master of Science in Computer Science. The thesis is equivalent to 20 weeks of full time studies. Contact Information: Author(s): Nader Abdelrasoul Address: Karlskrona, Sweden E-mail: [email protected] University advisor(s): Dr. Stefan Johansson School of Computing/Blekinge Institute of Technology School of Computing Blekinge Institute of Technology SE – 371 79 Karlskrona Sweden ii Table of Contents Abstract.................................................................................................................................................4 1 Introduction...................................................................................................................................... 1 1.1 Scope and Context ................................................................................................................... 1 1.2 Problem Definition................................................................................................................... 1 1.3 Aims and Objectives................................................................................................................. 2 1.4 Research Questions...................................................................................................................2 1.5 Approach .................................................................................................................................2 1.6 Contribution..............................................................................................................................3 1.7 Thesis Outline .......................................................................................................................... 3 2 Background.......................................................................................................................................4 2.2 Autonomous Vehicle Controllers.............................................................................................. 4 2.3 Artificial Potential Fields (APF)...............................................................................................5 2.4 Particle Swarm Optimization (PSO).........................................................................................5 2.5 TORCS Environment.................................................................................................................6 2.6 Related Work............................................................................................................................ 9 2.6.1 Robot and Vehicle Controllers.......................................................................................... 9 2.6.2 Controllers in Games...................................................................................................... 10 3 Research Methodology................................................................................................................... 11 3.1 Research Design.......................................................................................................................11 4 Modeling the Controller................................................................................................................. 12 4.1 Proposed Method.................................................................................................................... 12 4.2 Controller Design....................................................................................................................12 4.3 The Multi Agent System ........................................................................................................ 15 5 Experiments....................................................................................................................................19 5.1 Variables .................................................................................................................................19 5.2 Tracks......................................................................................................................................19 5.3 Opponents............................................................................................................................... 22 6 Results and Analysis.......................................................................................................................23 6.1 Results......................................................................................................................................23 6.1.1 Experiment 1................................................................................................................... 23 6.1.2 Experiment 2................................................................................................................... 27 6.2 Controller Evaluation..............................................................................................................30 iii 6.2.1 Experiment 1................................................................................................................... 30 6.2.2 Experiment 2................................................................................................................... 31 6.3 Discussion...............................................................................................................................32 6.3.1 Experiment 1.................................................................................................................... 32 6.3.2 Experiment 2.................................................................................................................... 33 6.4 Conclusions.............................................................................................................................34 6.5 Validity Threats.......................................................................................................................35 6.6 Future Work............................................................................................................................ 35 References.......................................................................................................................................... 36 iv ABSTRACT Context. Building autonomous racing car controllers is a growing field of computer science which has been receiving great attention lately. An approach named Artificial Potential Fields (APF) is used widely as a path finding and obstacle avoidance approach in robotics and vehicle motion controlling systems. The use of APF results in a collision free path, it can also be used to achieve other goals such as overtaking and maneuverability. Objectives. The aim of this thesis is to build an autonomous racing car controller that can achieve good performance in terms of speed, time, and damage level. To fulfill our aim we need to achieve optimality in the controller choices because racing requires the highest possible performance. Also, we need to build the controller using algorithms that does not result in high computational overhead. Methods. We used Particle Swarm Optimization (PSO) in combination with APF to achieve optimal car controlling. The Open Racing Car Simulator (TORCS) was used as a testbed for the proposed controller, we have conducted two experiments with different configuration each time to test the performance of our APF- PSO controller. Results. The obtained results showed that using the APF-PSO controller resulted in good performance compared to top performing controllers. Also, the results showed that the use of PSO proved to enhance the performance compared to using APF only. High performance has been proven in the solo driving and in racing competitions, with the exception of an increased level of damage, however, the level of damage was not very high and did not result in a controller shut down. Conclusions. Based on the obtained results we have concluded that the use of PSO with APF results in high performance while taking low computational cost. Keywords: Autonomous car controller, Artificial Potential Fields (APF), Particle Swarm Optimization (PSO), TORCS. v 1 INTRODUCTION 1.1 Scope and Context Car racing games are considered exciting to many people. Racing between different competitors makes each one of them eager to achieve better results and win the race to prove superiority in skills and tactics over other competitors. In a car racing game there is usually a human controlling the car during the race, however, it is possible to design an autonomous car controller that can substitute the human driver in carrying out the driving task. Autonomous racing car controllers are software programs designed to read sensor data from the racing environment as an input. The sensor input is processed by the controller according to a pre- defined model, the result is a set of movement instructions that are used to move the car during the race towards the final destination. There has been many attempts by researchers to build autonomous car racing controllers using Artificial Neural Networks [1], and genetic algorithms [2]. These approaches have some shortcomings including low performance, high computational