Edit: I remember looking at BotHack at the time and being surprised at how extensively and elaborately hard-coded the strategy and evaluations were. This is definitely not machine learning!
(defn- read-book [game]
{:pre [(have game book #{:noncursed})]}
(if-not (invocation-complete? game)
(if-let [[slot _] (have game "Book of the Dead")]
(with-reason "reading the book"
(->Read slot)))))