A machine learning algorithm can accurately detect abnormalities in pupil dilation, which are predictive of ASD, in mouse models. The AI can also detect if a female has Rett syndrome with 80% accuracy. The system could be used to detect autism in infants and toddlers.