This paper deals with the problem of autonomous navigation of a mobile robot in an unknown2D environment to fully explore the environment as efficiently as possible. We assume a terrestrial mobilerobot equipped with a ranging sensor with a limited range and 360º field of view. The key part of theexploration process is formulated as the d-Watchman Route Problem which consists of two coupledtasks—candidate goals generation and finding an optimal path through a subset of goals—which aresolved in each exploration step. The latter has been defined as a constrained variant of the GeneralizedTraveling Salesman Problem and solved using an evolutionary algorithm. An evolutionary algorithmthat uses an indirect representation and the nearest neighbor based constructive procedure was proposedto solve this problem. Individuals evolved in this evolutionary algorithm do not directly code thesolutions to the problem. Instead, they represent sequences of instructions to construct a feasible solution.The problems with efficiently generating feasible solutions typically arising when applying traditionalevolutionary algorithms to constrained optimization problems are eliminated this way. The proposedexploration framework was evaluated in a simulated environment on three maps and the time needed toexplore the whole environment was compared to state-of-the-art exploration methods. Experimentalresults show that our method outperforms the compared ones in environments with a low density ofobstacles by up to 12.5%, while it is slightly worse in office-like environments by 4.5% at maximum.The framework has also been deployed on a real robot to demonstrate the applicability of the proposedsolution with real hardware.