The original chicken swarm optimization algorithm converges slowly and easily falls into the local optimum. To overcome this issue, this paper proposes a chicken swarm optimization algorithm based on stimulus-response mechanism from the perspective of exploration-exploitation balance. Firstly, two search equations focusing on exploration and exploitation respectively are designed for roosters. Secondly, the stimulus and threshold of performing different search equations are designed according to population aggregation degree and average improvement degree. Finally, roosters play a leading role and guide the chickens to complete the exploration and exploitation under the stimulus-response mechanism. The experimental results on benchmark functions and survival risk prediction of esophageal cancer show the high efficiency of the proposed algorithm, when compared with other improved chicken swarm optimization algorithms, particle swarm optimization algorithms and artificial bee colony algorithms.