Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/c18ad68017c197e4358eb9482499514c to your computer and use it in GitHub Desktop.
Save deque-blog/c18ad68017c197e4358eb9482499514c to your computer and use it in GitHub Desktop.
(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