Massive Open Online Courses (MOOCs) once offered the promise of accessibility and affordability. However, MOOCstypically lack expert feedback and social interaction, and have low student engagement and retention. Thus, alternativeprograms for online education have emerged including an online graduate program in computer science at a major publicuniversity in USA. This program is considered a success with over 9000 students now enrolled in the program. We adoptthe perspective of cognitive science to answer the question why do only some online educational courses succeed? Wemeasure learner motivation and self-regulation in one course in the program, specifically a course on artificial intelligence(AI). Surveys of students indicate that students self-reported assessments of self-efficacy, cognitive strategy use, andintrinsic value of the course are not only fairly high, but also generally increase over the course of learning. This datasuggests that the online AI course might be a success because the students have high self-efficacy and the class fostersself-regulated learning.