A Cat Algorithm for Sand Piles