====== 04 Adversarial I ====== How to search when someone is playing against us. - Quizzes. - Recursive factorial implementation and analysis. - Learning about Reversi. ===== Quiz for bonus points ===== * Resolve the questions in the given heuristic exercise. * 0.5 points * Submit your solution to [[https://cw.felk.cvut.cz/brute/|BRUTE]] **lab04quiz** by March 8, midnight. * Format: text file, photo of your solution on paper, pdf - what is convenient for you. * Solution will be discussed on the next lab. * Quiz assignment: [Students with their family name starting from A to L (included) have to solve and upload {{ :courses:be5b33kui:labs:weekly:Heuristics_A_eng.pdf |subject A}} , while students with family name from M to Z have to solve and upload {{ :courses:be5b33kui:labs:weekly:Heuristics_B_eng.pdf |subject B}}]. > {{page>courses:be5b33kui:internal:quizzes#Heuristics exercise}} ===== Quiz II / Solving together during interactive lab===== > {{page>courses:be5b33kui:internal:quizzes#Gold miners}} ===== Fibonacci Sequence ===== Program the recursive calculation of the Fibonacci sequence: $f(n) = f(n-1) + f(n-2)$. Analyze the number of function calls and plunge depths. ++++ Tree call: | {{ :courses:b3b33kui:internal:cviceni:fib.png?400 |}} ++++ ++++ Demo code: | Only for teachers: https://gitlab.fel.cvut.cz/kui-course/kui-misc/blob/master/fibonacci.py ++++ ===== Reversi: 2nd assigment ===== * Download and get familiar with reversi (see [[courses:be5b33kui:labs:reversi:start|here]]). * Launch the game. * Create your own player.