         (if (not= \w (get-tile current-map new-pos))
           [current-map new-pos score]
           [current-map pos (- score action-penalty)]))
+      \x
+      (do
+        (def new-pos (add-vec pos (rand-nth (take 4 dir-vects))))
+        (if (not= \w (get-tile current-map new-pos))
+          [current-map new-pos score]
+          [current-map pos (- score action-penalty)]))
       \p
       (do
         (if (= \g (get-tile current-map pos))

(defn rand-dna []
  "Initializes a vector of random DNA."
  (defn rand-gene []
    (nth actions (rand-int (count actions))))
  (vec (repeatedly (** (count tiles) (count actions)) rand-gene)))

(defn cross [a b]
  "Crosses two vectors of DNA."



(def map-size 20) ; Size of the map used for robot simulation.
(def gold-prob 20) ; Probability in 100 that a tile contains gold.
(def simul-steps 100) ; Steps to allow the robot to make in a simulation.
(def tiles [\w \p \g]) ; Tiles that populate the map: wall, path, and gold.
(def actions [\u \d \l \r \x \p]) ; Actions the robot can take: up, down, left, right, pick up.
(def dir-vects ['(0 -1) '(0 1) '(-1 0) '(1 0) '(0 0)]) ; Direction vectors, corresponding to the actions.

(def mutation-prob 10) ; Probability in 100 that a gene will mutate.
(def action-penalty 5) ; How many points robot loses when hitting the wall or picking up when it shouldn't.
(def gold-value 10) ; How many points picking up gold is worth.

