A novel immune algorithm suitable for dynamic environments (AIDE) was proposed based on a biological immune response principle.The dynamic process of artificial immune response with operators such as immune cloning,multi-scale variation and gradient-based diversity was modeled.Because the immune cloning operator was derived from a stimulation and suppression effect between antibodies and antigens,a sigmoid model that can clearly describe clonal proliferation was proposed.In addition,with the introduction of multiple populations and multi-scale variation,the algorithm can well maintain the population diversity during the dynamic searching process.Unlike traditional artificial immune algorithms,which require randomly generated cells added to the current population to explore its fitness landscape,AIDE uses a gradient-based diversity operator to speed up the optimization in the dynamic environments.Several reported algorithms were compared with AIDE by using Moving Peaks Benchmarks.Preliminary experiments show that AIDE can maintain high population diversity during the search process,simultaneously can speed up the optimization.Thus,AIDE is useful for the optimization of dynamic environments.