Optimal Simulation of Sandcastle Life in Dynamic Environment Based on Stability Principle. (13th October 2020)