    push instruction. It also provides `:push-evaluate`."
   (g/graph
     :step-limit (utils/v->fnk 500)
-    :interpreter (fnk [push-bindings]
-                  (make-everything-interpreter :bindings (zipmap push-bindings (repeat nil))))
+    :interpreter interpreter
+    :instructions instructions
     :push-evaluate evaluate
     :->gene ->instruction
     seq/graph))

(ns search.graphs.push
  "Adds the ability to use the push interpreter to evaluate your programs."
  (:require [plumbing.graph :as g]
            [plumbing.core :refer [fnk]]
            [push.core :as push]
            [schema.core :as s]
            [push.interpreter.templates.one-with-everything :refer [make-everything-interpreter]]

            [search.utils :refer [defnk-fn] :as utils]
            [search.graphs.seq :as seq]))

(defnk instructions
  "Returns all the instructions for the interpreter"
  [interpreter]
  (push/known-instructions interpreter))

(defnk interpreter
  "Returns the push interpreter we should be using"
  [push-bindings]
  (make-everything-interpreter :bindings (zipmap push-bindings (repeat nil))))

(defnk-fn ->instruction :- s/Any
  "Returns a random push instruction from those defined in the `push-interpreter`
   and the bindings names.`"
  [interpreter instructions]
  []
  (let [bindings (push/binding-names interpreter)]
    (-> {instructions 5
         bindings (if (empty? bindings) 0 1)}
      clojure.data.generators/weighted
      clojure.data.generators/rand-nth)))
