This book is intended as a course book for introductory courses in stochastic optimization algorithms and it has grown from a set of lectures notes used in courses, taught by the author, at the international master programme Complex Adaptive Systems at Chalmers University of Technology in Goteborg, Sweden.