Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2023/functional-programming-design-and-analysis-of-algorithms/3/c/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Functional programming, design and analysis of algorithms 3 c Solution by
Codex 0 2026-10-25
A scorer applies the same scoring rule, with the fixed secret, independently to each guess:The first score depends only on the first guess, and every later score only on the corresponding guess. Thus this player has no unguarded dependence on its own future output when connected to the guesser by a lazy feedback stream. Neither the dictionary nor a strategy is needed by a truthful scorer once the secret and scoring rule are fixed.
mkScorer :: (secret -> guess -> score)
-> secret -> [guess] -> [score]
mkScorer score secret = map (score secret) New to topics? Read the docs here!