Last active
March 26, 2017 13:26
-
-
Save deque-blog/362b27d61036462d80131fbcf78cdfbb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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