# HG changeset patch # User Robert McIntyre # Date 1333648770 18000 # Node ID fe6fd2323264b88c42b16f330c4179255705667f # Parent 8484e6f6db2c0774d6e513c1cefe9b702e73eaf8 corrected compilation bugs diff -r 8484e6f6db2c -r fe6fd2323264 clojure/com/aurellem/gb/pokemon.clj --- a/clojure/com/aurellem/gb/pokemon.clj Wed Apr 04 14:55:43 2012 -0500 +++ b/clojure/com/aurellem/gb/pokemon.clj Thu Apr 05 12:59:30 2012 -0500 @@ -389,11 +389,11 @@ (for [move moves] (cond (keyword? move) - [move {:current-pp (max-pp move 0) :pp-ups 0}] + [move {:current-pp (max-pp move 3) :pp-ups 3}] (vector? move) [(first move) - (merge {:current-pp (max-pp (first move) 0) - :pp-ups 0} (second move))])))))) + (merge {:current-pp (max-pp (first move) 3) + :pp-ups 3} (second move))])))))) ;; The game stores the pokemon's type redundantly ;; along with the species. If it's not specified ;; then it should default to that species default type. diff -r 8484e6f6db2c -r fe6fd2323264 clojure/com/aurellem/run/bootstrap_0.clj --- a/clojure/com/aurellem/run/bootstrap_0.clj Wed Apr 04 14:55:43 2012 -0500 +++ b/clojure/com/aurellem/run/bootstrap_0.clj Thu Apr 05 12:59:30 2012 -0500 @@ -348,9 +348,9 @@ (defn list-offset ([^SaveState state] (let [mem (memory state)] - (+ (aget mem item-screen-offset-address) - (aget mem item-cursor-offset-address)))) - ([] (item-offset @current-state))) + (+ (aget mem list-screen-offset-address) + (aget mem list-cursor-offset-address)))) + ([] (list-offset @current-state))) diff -r 8484e6f6db2c -r fe6fd2323264 clojure/com/aurellem/run/util.clj --- a/clojure/com/aurellem/run/util.clj Wed Apr 04 14:55:43 2012 -0500 +++ b/clojure/com/aurellem/run/util.clj Thu Apr 05 12:59:30 2012 -0500 @@ -9,6 +9,11 @@ [↑ ↓ ← →] +(defn do-nothing [n script] + (->> script + (play-moves + (repeat n [])))) + (defn first-difference [base alt difference-metric [moves root :as script]] (loop [branch-point root @@ -150,11 +155,6 @@ (do-nothing 150) (play-moves [[:b]])))) -(defn do-nothing [n script] - (->> script - (play-moves - (repeat n [])))) - (defn delayed-improbability-search "insert blank frames before calling script-fn until metric returns true." diff -r 8484e6f6db2c -r fe6fd2323264 save-states/current-save.sav Binary file save-states/current-save.sav has changed