Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active March 26, 2017 13:37
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/210d6c66afd0f049baec2c1f643b83e6 to your computer and use it in GitHub Desktop.
Save deque-blog/210d6c66afd0f049baec2c1f643b83e6 to your computer and use it in GitHub Desktop.
(defn- high-level-ai
"High level AI: choose the right evaluation function to play"
[{:keys [player scores] :as turn}]
(cond
(human-player-winning? scores) (strategies/optmize-ai-scores-ai)
(in-late-game? scores) (strategies/optimize-own-score-ai player)
(limited-move-options? turn) (strategies/optimize-own-choices-ai player)
:else (strategies/optimize-own-score-ai player)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment