Inthispaper,weanalyzethedisadvantageofcommongeneratingtestpaperalgorithms,animprovedParticleSwarmOptimizationisproposedandusedinAuto-generatingTestPaperAlgorithm.Wedesignthemathematicalmodelofauto-generatingtestpaperalgorithmandimprovedthetraditionalPSOinert