Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defn optimize-own-score-ai
"Create an AI strategy to optmize its own score: good late game play"
[player]
(reify minimax/AIStrategy
(eval-turn [this turn] (eval-next-score-of this turn [player]))
(maximizing? [_ turn] (= (:player turn) player))
))
(defn optmize-ai-scores-ai
"Create an AI strategy to optmize the AI scores: good cheat when the player wins"
[]
(reify minimax/AIStrategy
(eval-turn [this turn] (eval-next-score-of this turn [:red :green]))
(maximizing? [_ turn] (not= (:player turn) :blue))
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment