We present to readers a book covering selected methods of artificial intelligence (AI), intended for students of computer science and related programmes at universities. We believe, however, that it may also prove useful to anyone interested in the subject of AI. Artificial intelligence is currently one of the most rapidly developing technologies, with the potential to exert a transformative influence on the organisation and functioning of both society as a whole and of individual people. A few examples will illustrate this point. We can already observe the impact of AI on the economy, and in particular on industrial production, where the so-called Industry 4.0, based on extensive robotisation, is replacing traditional forms of manufacturing. We note the growing influence of AI on the service sector, in which an increasing number of tasks are carried out by intelligent software. AI exerts a strong influence on business, markets, and consumers through the use of advanced analytical methods, and it has a visible impact on politics, where the profiling of voters’ preferences has become a permanent feature of political activity. AI offers effective means of monitoring the environment and people — for example, through Internet of Things devices — and is used for continuous health monitoring and care for the elderly. In addition to these examples, applications of artificial intelligence are playing an ever greater role in the entertainment industry, for instance in computer games, and in communication via social media in the broad sense. The nature and innovative potential of artificial intelligence are unprecedented in comparison with other technologies and inventions of the past, such as electricity, the automobile, or the radio. This follows from the fact that the essence of AI is the simulation of certain features of human intelligence. AI is capable of exploiting the enormous computational power available in modern computers, making it possible to analyse very large datasets in acceptable time, to discover patterns and rules, and consequently to support decision-making processes. AI is a powerful tool for gaining advantage in key domains. It is precisely for this reason that governments regard artificial intelligence as a powerful lever of development, incorporating AI research and education into their economic and social plans and allocating substantial financial and organisational resources to this end. The individual chapters are authored by faculty members of the Faculty of Electronics and Information Technology at Warsaw University of Technology, who are actively engaged in the development of artificial intelligence. In planning the scope and content of the book, the authors selected from the broad range of available methods and topics those they consider particularly important and applicable across the entire field of AI, including within other methods not discussed here. The first chapter provides information on the history, nature, and applications of artificial intelligence. The second chapter addresses the problem of searching state spaces for solutions to a given problem — a topic fundamental not only to artificial intelligence — together with a discussion of optimisation methods that identify the best solution with respect to a chosen criterion. The subject of the following chapter is machine learning. The fourth chapter is devoted to artificial neural network architectures, including deep networks. The fifth chapter presents and discusses the mutual relationships between ethics and artificial intelligence, with particular emphasis on the necessity of presenting the outputs of AI systems in a manner comprehensible to humans. Each chapter is accompanied by a bibliographic note providing references for further study. The book may serve as a textbook and teaching aid for courses in AI, as well as a reference for the methods and algorithms presented therein. We assume that the reader has a basic knowledge of computer science: familiarity with how data are represented in digital form, the ability to read pseudocode, and competence in structured programming. The authors explain the presented methods in an intuitive manner while maintaining rigour, making use of examples and providing algorithms. In writing the book, the authors encountered — as is common in rapidly developing fields — numerous terminological challenges. Where multiple competing Polish terms exist or where no established Polish term is available, the authors have proposed their own or commonly used terms from their profesional community, with the corresponding English equivalents given in parentheses; English traditionally serves as the lingua franca of computer science. The editors wish to thank the authors of all chapters for their fruitful collaboration during the preparation of the book. We thank Prof. Henryk Rybiński and Prof. Janusz Sosnowski for sharing their opinions, comments, and suggestions with the authors. We also thank Prof. Janusz Kacprzyk and Prof. Jacek Koronacki for their thorough and constructive editorial reviews. We thank the staff of the Warsaw University of Technology Press for their excellent cooperation. We also thank MSc Eng. Katarzyna Nałęcz- Charkiewicz for her careful reading of the text and for identifying inaccuracies. Our students — Patryk Będkowski, Łukasz Jaremko, Michał Kozak, Bartosz Latosek, Mikołaj Olejnik, Jakub Sprawka, Kamil Strójwąs, Łukasz Szarejko, and Jakub Wolski — read a preliminary version of the book and provided us with their comments, for which we are grateful. Warsaw, March 2022