class: center, middle # Artificial Intelligence ### Review --- class: medium # Exam * The exam will happen **next week** * Officially on the 14th of May * I will give you the exam on Monday, 11/5 during class hours * We will discuss the exam during the class, and then you have until Friday, 15/5 to finish it * Thursday's class will be a good opportunity for questions * The exam will be available on Mediacionvirtual! --- class: medium # Exam * Topics: Everything we have covered so far (Lecture 1 - 7, Introduction - Logic) * You can use the slides, videos, the book, etc. during the exam * Ask **me** if anything is unclear, not your classmates * The answers have to be **your own** --- # Lab 2 * We will also start Lab 2 **today** * Deadline: May 22, AoE * I suggest you start with it before the exam * MCTS will be part of the exam, and the implementation will help you understand it --- class: center, middle # Review: Intelligence --- # Question We talked about "Thinking Humanly" as one type of intelligence. Which other three types did we discuss? --- # Question What is the Turing Test? --- # Question What was the "AI Winter"? Why did it happen? --- # Question Define the PEAS for an agent playing Super Mario --- # Question Draw a decision tree for an enemy guard in a video game --- # Question Draw a finite state machine for a vacuum robot --- # Question Draw a behavior tree for firefighter robot --- class: center, middle # Review: Search --- # Question
Find a path from Graz to Innsbruck using Breadth-First Search -- Find a path from Graz to Innsbruck using Depth-First Search, when the neighbors are ordered *clockwise, starting north*. --- # Question
Find a path from Graz to Munich using Greedy Search with the following heuristic values: Bregenz: 101, Bruck: 203, Eisenstadt: 400, Graz: 301, Klagenfurt: 202, Lienz: 201, Linz: 200, Salzburg: 100, Vienna: 300 Find a path from Vienna to Munich using A*. --- # Question You and an opponent choose bits until two zeroes or two ones have been chosen in a row, or 5 digits have been chosen in total. If the resulting number is prime, you get that many points, otherwise you lose that many points. Draw the complete game tree for this game. What is your best first move? Example: You pick a 1, then you opponent picks a 0, then you pick a 0, and the game ends because 2 zeroes have been chosen in a row. The resulting number is 100b = 4, which is not prime, and you lose 4 points. --- # Question You and an opponent choose bits until two zeroes or two ones have been chosen in a row, or 5 digits have been chosen in total. If the resulting number is prime, you get that many points, otherwise you lose that many points. Draw the complete game tree for this game. What is your best first move? Example: You pick a 1, then you opponent picks a 0, then you pick a 0, and the game ends because 2 zeroes have been chosen in a row. The resulting number is 100b = 4, which is not prime, and you lose 4 points. --- # Question Which four steps make up Monte Carlo Tree Search? Briefly explain each of the four steps --- # Question In Monte Carlo Tree Search, during Action Selection, we discussed several methods how to choose actions. Name and briefly explain two of them. --- # Question You are playing a game of Rummikub: Tiles are shuffled on the table face down, you can play tiles in a sequence or as sets, and draw new, random tiles. You want to build an agent for this game that uses MCTS. How do you account for the randomization of the tiles? --- class: center, middle # Review: Logic --- # Question Given the interpretation $$ W = \\{b, d, e\\} $$ For each of the following formulas determine if W is a model for that formula: $$ a \rightarrow b \\\\ (a \vee d) \rightarrow (c \wedge e)\\\\ (a \rightarrow \neg a) \rightarrow (\neg a \rightarrow a) \\\\ d \rightarrow ((b \wedge (e \rightarrow a)) \rightarrow ((b \wedge d) \rightarrow a)) $$ --- # Question Define an interpretation W that is a model for all of these formulas: $$ \neg a \rightarrow \neg b\\\\ c \rightarrow a\\\\ ((c \vee \neg c) \rightarrow c)\\\\ a \rightarrow ((b \vee d) \wedge e)\\\\ b \rightarrow \neg c $$ --- # Question Given the interpretation $$ W = \\{\mathit{nat}(c), \mathit{real}(c), \mathit{complex}(c), \mathit{nat}(a), \mathit{nat}(b), \mathit{real}(b),\\\\ \mathit{sum}(a,a,a), \mathit{sum}(a,b,b), \mathit{sum}(a,c,c), \mathit{sum}(b,b,b), \mathit{sum}(b,c,c)\\} $$ For each of the following formulas determine if W is a model for that formula over the domain `\(D = \{a,b,c\}\)` $$ \forall x: \mathit{sum}(x,x,x)\\\\ \forall x: \mathit{nat}(x)\\\\ \forall x: \mathit{complex}(x) \rightarrow \forall y: \mathit{sum}(y,x,x)\\\\ \forall x: \mathit{complex}(x) \rightarrow (\mathit{real}(x) \wedge \mathit{nat}(x))\\\\ \exists x: \neg \mathit{nat}(x) \rightarrow (\mathit{real}(x) \vee \mathit{complex}(x))\\\\ \exists x: \mathit{sum}(x,x,x) \rightarrow (\exists y: \mathit{sum}(x,y,y) \rightarrow \mathit{real}(y)) $$ --- # Question Define an interpretation W over the domain `\(D= \{a,b,c,d,e\}\)`
that is a model for all of these formulas: $$ \mathit{zero}(a)\\\\ \mathit{nat}(a)\\\\ \mathit{last}(e)\\\\ \forall x: \mathit{last}(x) \vee \exists y: \mathit{succ}(x,y) \wedge \mathit{nat}(y)\\\\ \neg \exists x: \mathit{succ}(x,a)\\\\ (P(a) \wedge (\forall x: \forall y: (P(x) \wedge \mathit{succ}(x,y)) \rightarrow P(y))) \rightarrow \forall x: P(x)\\\\ P(a) $$ --- # Question Given the interpretation/state $$ s_0 = \\{ \mathit{at}(a,m), \mathit{at}(b,m), \mathit{at}(c,n) \\} $$ Apply the effect `\(e_1\)` to this state to obtain `\(s_1\)`, then apply the effect `\(e_2\)` to get `\(s_2\)`, and then apply the effect `\(e_1\)` **again** to get `\(s_3\)` $$ e_1 = \forall x: \forall y: \text{when}\quad(\exists z: (\mathit{at}(x,z) \wedge \mathit{at}(y,z)))\quad \mathit{seen}(x,y)\\\\ e_2 = (\forall x: \text{when}\quad \mathit{at}(a,x)\quad \neg \mathit{at}(a,x)) \wedge \mathit{at}(a,n) $$ Answer the following queries in `\(s_3\)`: Has b seen c? `\(\mathit{seen}(b,c)\)` Has b seen b? `\(\mathit{seen}(b,b)\)` Has a seen everyone? `\(\forall x: \mathit{seen}(a,x)\)`