anchor.diff:                             (svref *unrelated-card-masks* i))
                      masks))))))
   
  -(deftype state-cache ()
  +(defstruct state-cache
     "SUCCESSOR-MASKS, H-COST, and UNWINNABLE-MASKS for a given PYRAMID-FLAGS."
  -  '(simple-vector 3))
  -
  +  successor-masks
  +  h-cost
  +  unwinnable-masks)
  +  
   (defun make-state-caches (deck)
     "Precalculate all the data we need to speed up processing for each state.
   The result is a hash table indexed by one of 1430 PYRAMID-FLAGS, and the hash
  
positive.code:   "Return an estimate of how many steps to clear all 28 pyramid cards."
    (declare (optimize speed (safety 0))
             (type state-cache state-cache))
    (svref state-cache 1))
  
  (declaim (inline state-unwinnable-p))
  (defun state-unwinnable-p (state state-cache)
  
negative.code:          (stock-index (state-stock-index state))
           (cycle (state-cycle state))
           (waste-index (state-waste-index deck-flags stock-index))
           (successor-masks (the successor-masks
                                 (state-cache-successor-masks state-cache)))
           (successors ()))
      (if (stock-empty-p stock-index)
          (when (/= cycle 3)
  