摘要
遗传算法是一种通用的自适应搜索算法。它给测试用例自动生成问题带来了新的解决思路。但是传统的遗传算法应用于测试用例自动生成,重组、突变的随机性容易使种群中多样性遭到破坏,使得算法搜索空间减小,从而导致算法错误地收敛到局部最优值。而且盲目的随机重组和突变又使得搜索的效率非常低。本文介绍一种改进方法,引进突变控制策略和优化解控制策略,可有效提高遗传算法的搜索能力和获取最优解的性能。
Genetic algorithm is currently an adaptive searching algorithm which gives a new solution to generate test cases. However, when it is used to generate test cases, the randomness of recombination and mutation makes the diversity of the population easily destroyed and leads to the search space getting smaller, finally results in the algorithm finding a wrong local optimum. Moreover, recombining and mutating freely makes the searching efficiency very low. This paper introduces an improved method, with a mutation control strategy and an optimal control strategy added, which effectively improves the searching capability and gets optimal solution capability of the algorithm.
出处
《计算机与现代化》
2012年第1期49-52,共4页
Computer and Modernization
关键词
遗传算法
测试用例
突变控制策略
优化解控制策略
最优解
genetic algorithm
test case
mutation control strategy
optimal control strategy
optimal solution