A traditional challenge for artificial intelligence (AI) is the development of algorithms that can play games as well as possible; sometimes even better than humans! There are numerous reasons we might wish to have sophisticated agents built in our game such as to be able to test the ability of AI to solve problems that are complex for humans to solve, to equip games with believable AI agents, and to help us test the games we design and develop. AI in games, however, is not only about agents playing games well, or believably. It is also about algorithms that design (parts of) games autonomously or in collaboration with a designer. Further, AI can be used to understand the humans that are involved in the process of designing, testing and ultimately playing games. This lecture is dedicated to the aforementioned core uses of AI in and for games. After an introductory part that explains the background and key techniques used, I will introduce ways to use AI for playing games, for generating content, and for modelling players and designers.