An active-exploration-based method has been developed for an engine combusting fuels with occasional rapid changes in a mixed ratio of various fuel types. To apply learning-based control to the engine, training data should be acquired and combustion models should be generated during actual operation. Occasional rapid changes in fuels lead to a small amount of data for each fuel type and ratio, which is susceptible to noise and results in slow convergence in exploring training data. Furthermore, slow convergence leads to extended control using no-longer appropriate parameters, causing faults. The method reduces the negative effect of noise by discretizing the combustion state space and naturally avoids engine faults by predicting the no-fault condition (i.e. stable combustion with higher thermal efficiency). Numerical experiments of typical optimization problems showed that the proposed method is robust against noise during the optimization process. By applying the method to an actual engine combusting a changing mixture of hydrogen and ethanol, thermal efficiency after combustion-model generation increased up to 7.9% and the coefficient of variation of the indicated mean effective pressure was less than 3% for all ratios. The increase in thermal efficiency corresponds to continuous predictions of the no-faults condition. These results demonstrate the potential practical use of engines with occasional rapid changes in mixed ratios of various fuel types during operation.