In an emergency situation, the evacuation of a large crowd from a complex building can become slow or even dangerous without a working evacuation plan. The use of rescue guides that lead the crowd out of the building can improve the evacuation efficiency. An important issue is how to choose the number, positions, and exit assignments of these guides to minimize the evacuation time of the crowd. Here, we model the evacuating crowd as a multi-agent system with the social force model and simple interaction rules for guides and their followers. We formulate the problem of minimizing the evacuation time using rescue guides as a stochastic control problem. Then, we solve it with a procedure combining numerical simulation and a genetic algorithm (GA). The GA iteratively searches for the optimal evacuation plan, while numerical simulations evaluate the evacuation time of the plans. We apply the procedure on a test case and on an evacuation of a fictional conference building. The procedure is able to solve the number of guides, their initial positions and exit assignments in a single although complicated optimization. The attained results show that the procedure converges to an optimal evacuation plan, which minimizes the evacuation time and mitigates congestion and the effect of random deviations in agents’ motion.