A critical microchannel technique is to isolate specific objects, such as cells, in a biological solution. Generally, this particle sorting is achieved by designing a microfluidic device and tuning its control values; however, unpredictable motions of the particle mixture make this approach time-consuming and labor intensive. Here, we show that microfluidic control with reinforced learning characterized by utilizing failure results can maximize the training effect with limited data. This method uses microscopic images of the separation process, including failed conditions (inappropriate flow speeds or dilution rates of biological samples), and insights for efficient learning are provided by setting gradient rewards according to the degree of failure. Once learning is performed in this manner, the optimal separating condition for other related samples can be automatically found. Failed experiments are not wasteful; they increase training data and make it easier to reach correct answers. This device control could be useful in automatic synthetic chemistry, biomedical analysis, and microfabrication robotics.