Power versus voltage curves of partial shading photovoltaic (PV) systems contain several local peaks (LPs) and one global peak (GP). Most conventional maximum power point tracker (MPPT) techniques may not follow the GP under partial shading conditions (PSC). The use of metaheuristic techniques such as the bat algorithm (BA) and particle swarm optimization (PSO) can overcome these obstacles. All problems inherent in the using of BA as MPPT of PV systems has been discussed and solved in this paper. The first problem is the random initial values of bats that may cause premature convergence. Therefore, the initial values of bats were modified to be close to the anticipated positions of peaks to reduce the convergence time and improve the chance of capturing the GP. The second problem occurs when shading pattern changes the value and position of the GP which is not configurable because all bats are concentrated at the previous GP; this can be resolved by BA re-initialization. The the third problem is the GP memorized in the execution of the BA code forces the PV system to work at the duty ratio of the highest GP ever seen, which may not be the real GP. This problem is solved by updating the memorized GP. This paper also proposes a new criterion for selecting the optimal swarm size against number of peaks to reduce the convergence time and improve the chance of capturing the GP. To the authors' knowledge, most of these problems inherent in the BA have hitherto not been addressed in the literature. The simulation and experimental results obtained from the proposed modified BA (MBA) with re-initialization have been compared to the PSO and grey wolf optimization (GWO) techniques which show the superiority of using MBA strategy in the MPPT of partial shading PV systems. INDEX TERMS Bat algorithm, boost converter, dynamic global peak, maximum power point tracker, partial shading conditions, PV system.