Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defn optimize-own-choices-ai
"Create an AI strategy to optmize the AI choices: avoid being trapped with no moves left"
[player]
(reify minimax/AIStrategy
(eval-turn [_ turn]
(count (get (transition/all-transitions (:board turn)) player)))
(maximizing? [_ turn] (= (:player turn) player))
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment