Slope stability analysis of soil with a weak layer sandwiched between two strong layers is considered as a complex geotechnical problem. In this problem, the objective function is non-convex and discontinuous with the presence of multiple strong local minima. Classical optimization techniques fail to converge to a valid solution unless a proper initial trial is adopted. Even though many new optimization algorithms have emerged, they have not been applied to geotechnical problems yet. In the present study, some recent swarm intelligence algorithms are adopted for some complicated example of slope stability problems and benchmarked with the traditional particle swarm optimization algorithm. From the results, it seems the levy flight krill herd algorithm is the most efficient method over proposed algorithms for this kind of problem.