Failure diagnosis in large and complex systems is a critical task. A discrete event system (DES) approach to the problem of failure diagnosis is presented in this paper. A classic solution to solve DES’s diagnosis is a stochastic Petri nets. Unfortunately, the solution of a stochastic Petri net is severely restricted by the size of its underlying Markov chain. On the other hand, it has been shown that foraging behavior of ant colonies can give rise to the shortest path, which will reduce the state explosion of stochastic Petri net. Therefore, a new model of stochastic Petri net, based on foraging behavior of real ant colonies is introduced in this paper. This model can contribute to the diagnosis, the performance analysis and design of supervisory control systems. Key words. Stochastic Petri nets, discrete-event systems, Ant Colony Optimization algorithm.