Butterfly Optimization Algorithm (BOA) is a recent metaheuristic that has been used in several optimization problems. In this paper, we adapt this metaheuristic to robotics for solving the Unknown Area Exploration problem with energy constraints in both single and multi-robot scenarios. We conducted several experiments to validate the approach and compare its performance to well-known metaheuristics used in the literature using 5 different comparison criteria. We also proposed a new version of the algorithm (xBOA) based on the crossover operator. We compared its results to the original BOA and 3 other variants recently introduced in the literature. Although BOA and xBOA are not optimal in all evaluation criteria, we found that BOA can be a good alternative to many metaheuristics in terms of the exploration time, while xBOA is more robust to local optima; has better fitness convergence; and achieves better exploration rates than the original BOA and its other variants.