It is highly expected that partially shaded condition (PSC) occurs due to the moving clouds in a large photovoltaic (PV) generation system (PGS). Several peaks can be seen in the P-V curve of a PGS under such PSC which decreases the efficiency of conventional maximum power point tracking (MPPT) methods. In this paper, an adaptive neuro-fuzzy inference system (ANFIS) is proposed based on particle swarm optimization (PSO) for MPPT of PV modules. After tuning the parameters of the fuzzy system, including membership function parameters and consequent part parameters, to obtain maximum power point (MPP), a DC/DC boost converter connects the PV array to a resistive load. ANFIS reference model is used to control duty cycle of the DC/DC boost converter, so that maximum power is transferred to the resistive load. Comparing the proposed method with PSO alone method and firefly algorithm (FA) alone shows its efficacy and high speed tracking of MPP under PSC. Due to the fact that these optimization algorithms have online applications, the convergence time of the algorithms is very important. The simulation results show that the convergence time for the proposed ANFIS-based method is lower than 0.15 second, while it is nearly three second for PSO and FA methods.