Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active March 25, 2017 20:22
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/169bc404437a682b14e8c6195147949a to your computer and use it in GitHub Desktop.
Save deque-blog/169bc404437a682b14e8c6195147949a to your computer and use it in GitHub Desktop.
(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