# HG changeset patch # User Robert McIntyre # Date 1333795346 18000 # Node ID abd1ca8a25ccd5fde5c12303d3bcd4e63e7d9031 # Parent 57f4c57d28978ca5a62e1a4c45181fefc4761227 fixed major bug with first-difference which was causing de-sync. diff -r 57f4c57d2897 -r abd1ca8a25cc clojure/com/aurellem/gb/vbm.clj --- a/clojure/com/aurellem/gb/vbm.clj Fri Apr 06 14:54:39 2012 -0500 +++ b/clojure/com/aurellem/gb/vbm.clj Sat Apr 07 05:42:26 2012 -0500 @@ -125,3 +125,7 @@ (.getCanonicalPath yellow-rom-image))) nil) +(defn test-moves [moves] + (write-moves! moves "temp") + (play-vbm (moves-filename "temp"))) + diff -r 57f4c57d2897 -r abd1ca8a25cc clojure/com/aurellem/run/title.clj --- a/clojure/com/aurellem/run/title.clj Fri Apr 06 14:54:39 2012 -0500 +++ b/clojure/com/aurellem/run/title.clj Sat Apr 07 05:42:26 2012 -0500 @@ -13,7 +13,7 @@ (first-difference [] [:a] AF) (first-difference [] [:start] AF)))) -(defn oak +(defn-memo oak ([] (oak (title))) ([script] (->> script @@ -77,8 +77,8 @@ [(read-moves "title-checkpoint") (read-state "title-checkpoint")]) -(defn test-intro [] - (play-vbm (moves-filename "title-checkpoint"))) +;;(defn test-intro [] +;; (play-vbm (moves-filename "title-checkpoint"))) ;; TODO might be able to glue these together more elegantly with monads diff -r 57f4c57d2897 -r abd1ca8a25cc clojure/com/aurellem/run/util.clj --- a/clojure/com/aurellem/run/util.clj Fri Apr 06 14:54:39 2012 -0500 +++ b/clojure/com/aurellem/run/util.clj Sat Apr 07 05:42:26 2012 -0500 @@ -17,7 +17,7 @@ (defn first-difference [base alt difference-metric [moves root :as script]] (loop [branch-point root - actions moves] + actions (vec moves)] (let [base-branch (step branch-point base) base-val (difference-metric base-branch) alt-branch (step branch-point alt) diff -r 57f4c57d2897 -r abd1ca8a25cc moves/temp.vbm Binary file moves/temp.vbm has changed diff -r 57f4c57d2897 -r abd1ca8a25cc moves/total-run.vbm Binary file moves/total-run.vbm has changed