Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defn- eval-next-score-of
"Perform a last minimax step on the next scores following the turn
* Allows to see one level deeper for simple scoring strategies
* While being fast (the transition does not need to be followed)"
[ai {:keys [scores] :as turn} players]
(minimax/minimax-step ai turn
(fn [_ transition]
(let [scores (scores/update-scores scores transition)]
(apply + (map #(get scores %) players)))
)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment