changeset 327:fe6fd2323264

corrected compilation bugs
author Robert McIntyre <rlm@mit.edu>
date Thu, 05 Apr 2012 12:59:30 -0500
parents 8484e6f6db2c
children 35960b03693f
files clojure/com/aurellem/gb/pokemon.clj clojure/com/aurellem/run/bootstrap_0.clj clojure/com/aurellem/run/util.clj save-states/current-save.sav
diffstat 4 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/gb/pokemon.clj	Wed Apr 04 14:55:43 2012 -0500
     1.2 +++ b/clojure/com/aurellem/gb/pokemon.clj	Thu Apr 05 12:59:30 2012 -0500
     1.3 @@ -389,11 +389,11 @@
     1.4                    (for [move moves]
     1.5                      (cond
     1.6                        (keyword? move)
     1.7 -                      [move {:current-pp (max-pp move 0) :pp-ups 0}]
     1.8 +                      [move {:current-pp (max-pp move 3) :pp-ups 3}]
     1.9                        (vector? move)
    1.10                        [(first move)
    1.11 -                       (merge {:current-pp (max-pp (first move) 0)
    1.12 -                               :pp-ups 0} (second move))]))))))
    1.13 +                       (merge {:current-pp (max-pp (first move) 3)
    1.14 +                               :pp-ups 3} (second move))]))))))
    1.15        ;; The game stores the pokemon's type redundantly
    1.16        ;; along with the species.  If it's not specified
    1.17        ;; then it should default to that species default type.
     2.1 --- a/clojure/com/aurellem/run/bootstrap_0.clj	Wed Apr 04 14:55:43 2012 -0500
     2.2 +++ b/clojure/com/aurellem/run/bootstrap_0.clj	Thu Apr 05 12:59:30 2012 -0500
     2.3 @@ -348,9 +348,9 @@
     2.4  (defn list-offset
     2.5    ([^SaveState state]
     2.6       (let [mem (memory state)]
     2.7 -       (+ (aget mem item-screen-offset-address)
     2.8 -          (aget mem item-cursor-offset-address))))
     2.9 -  ([] (item-offset @current-state)))
    2.10 +       (+ (aget mem list-screen-offset-address)
    2.11 +          (aget mem list-cursor-offset-address))))
    2.12 +  ([] (list-offset @current-state)))
    2.13  
    2.14  
    2.15  
     3.1 --- a/clojure/com/aurellem/run/util.clj	Wed Apr 04 14:55:43 2012 -0500
     3.2 +++ b/clojure/com/aurellem/run/util.clj	Thu Apr 05 12:59:30 2012 -0500
     3.3 @@ -9,6 +9,11 @@
     3.4  
     3.5  [↑ ↓ ← →]
     3.6  
     3.7 +(defn do-nothing [n script]
     3.8 +  (->> script
     3.9 +       (play-moves
    3.10 +        (repeat n []))))
    3.11 +
    3.12  (defn first-difference
    3.13    [base alt difference-metric [moves root :as script]]
    3.14    (loop [branch-point root
    3.15 @@ -150,11 +155,6 @@
    3.16        (do-nothing 150)
    3.17        (play-moves [[:b]]))))
    3.18  
    3.19 -(defn do-nothing [n script]
    3.20 -  (->> script
    3.21 -       (play-moves
    3.22 -        (repeat n []))))
    3.23 -
    3.24  (defn delayed-improbability-search
    3.25    "insert blank frames before calling script-fn until
    3.26     metric returns true."
     4.1 Binary file save-states/current-save.sav has changed