Distinguishing between the sensory and emotional states of pain in animals has been extremely challenging, because traditional measurements of pain provide limited resolution. We use fast imaging, computation, and mathematics to overcome this problem. An innovation in our work is recording sub-second behaviors in freely behaving mice and analyzing the data with artificial intelligence (AI) to measure pain sensation and affect. We couple AI with software development and statistical modeling to develop mouse “pain scales” . This technology allowed us to measure, in an automated and unbiased manner, pain sensation versus affect in the nonverbal mouse. Now that we have the ability to objectively measure pain in mice, a new direction for our lab is to determine how the brain and genome control the biological basis of individual sensitivity to pain.