====== 03 Adversarial I ====== How to efficiently go towards a goal. How to search when someone is playing against us. - Exercises. - Recursive factorial implementation and analysis. - Learning about Reversi. ===== Efficient Goal Reaching ===== How to to optimize the number of trials by throwing eggs from a building! ==== Exercise I / Solving together ==== > {{page>courses:be5b33kui:internal:quizzes#Egg problem}} ===== Exercise II / Solving together ===== Gold coins! Mine! How to maximize rewards and scam your colleagues thanks to "game theory", "democracy", and weight lifting! > {{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:semtasks:02_reversi:start|here]]). * Launch the game. * Create your own player.