The firefly algorithm,which is always applied to optimize in continuous space,is extended to assembly sequence planning field.To solve the problem of assembly sequence planning,all sorts of relevant operations of firefly algorithm are redefined,then the discrete firefly algorithm is proposed.To improve the inputting efficiency of the interference matrix,the decimal interference matrix of assembly is created.The stability of sub-assembly,the frequency of assembly direction changes and the frequency of assembly tool changes are taken into account in the fitness function in this paper.To create better fitness function,a better method of quantizing the stability of assembly sequence and a more rational solving scheme of the frequency of assembly tool changes are proposed in this paper.The characteristics of firefly algorithm are showed via an experiment of a typical assembly which contains 19 parts.The experiment proved that firefly algorithm is feasible and reliable.At the same time,the efficiency of firefly algorithm is compared with the efficiency of genetic algorithm which is applied most frequently in assembly sequence planning field.The results of experiment show that the firefly algorithm is more efficient than genetic algorithm.