   (let [converted-filter #(= looser (:looser %))
         all-moves (get-in game [:moves player])]
     (transduce
-      (map #(move-strength converted-filter %))
+      (map #(move-strength (:cells-strength game) converted-filter %))
       max all-moves)))
 
 (defn best-move

;; ARTIFICIAL INTELLIGENCE
;; -----------------------------------------

(defn fast-max-key
  "Fast max key that avoids recomputing things several times"
  [key-fn coll]
  (apply max-key (memoize key-fn) coll))

(defn move-strength
  "Compute the strength of a move, based on the converted cells"
  [converted-filter [move converted]]
  (transduce
    (comp
      (filter converted-filter)

(def players [:blue :red :green])
(def directions [[-1 0] [1 0] [0 -1] [0 1] [-1 1] [1 1] [-1 -1] [1 -1]])


;; -----------------------------------------
;; UTILS
;; -----------------------------------------

(defn fast-max-key
  "Fast max key that avoids recomputing things several times"
  [key-fn coll]
  (apply max-key (memoize key-fn) coll))

(def all-positions
  (vec
    (for [x (range board-width)
          y (range board-height)]
      [x y])))

(defn coord-neighbors
  "All neighbors of a given coordinate"
  [[x y]]
  (map (fn [[dx dy]] [(+ x dx) (+ y dy)]) directions))

;; -----------------------------------------
;; INIT THE BOARD
;; -----------------------------------------

(def empty-board
  (let [column (vec (repeat board-height :empty))]
    (vec (repeat board-width column))))

(defn draw-slices
  "Draw n * m slices from the collection"
