Mechatronics is the fusion of mechanics and electronics in the design of intelligent machines. This textbook is concerned with the concepts and techniques of artificial intelligence needed for the design of machines with advanced intelligent behaviour. It explores the topics of pattern recognition, neural networks, scheduling, reasoning, fuzzy logic, rule-based systems, machine learning, control and computer vision. This student guide shows how fifty years of research into artificial intelligence (AI) have borne fruit in the design of better and more intelligent machines. The twin objectives of the text are: to explain the theory of the mainstream ideas of AI and to show how these ideas can be applied in practical engineering situations.