Engineers have developed a microscope that adapts its lighting angles, colors and patterns while teaching itself the optimal settings needed to complete a given diagnostic task. In the initial proof-of-concept study, the microscope simultaneously developed a lighting pattern and classification system that allowed it to quickly identify red blood cells infected by the malaria parasite more accurately than trained physicians and other machine learning approaches.