With the surge of the wave of artificial intelligence, the innovation and practice of the teaching mode of programming courses in colleges and universities can improve the quality of teaching. Using artificial intelligence technology, this paper proposes four paths, including optimization of teaching resources, strengthening practical innovation ability, enhancing practical teaching, and constructing a diversified reasoning thinking evaluation system. Through the learning resource network, it presents the trajectory of students’ use of programming course resources, accurately obtains the three key attributes of students’ use of resources: content, type, and frequency, accurately portrays students’ learning behaviors, and reflects their reasoning thinking ability in the learning process. Based on students’ learning behavior data, the cognitive layer is modeled to assess students’ reasoning thinking ability. The controlled experiment shows that the mean value of the students’ reasoning thinking scores in the experimental class increased from 65.616 to 73.379, an increase of 7.763 points, and the overall progress of the reasoning thinking ability in the experimental class is relatively large. Meanwhile, the t-test results of the two classes show that the P-values of cooperation ability, problem solving ability and critical thinking ability are 0.001, 0.002 and 0.043 respectively, which are less than 0.05, and there is a significant difference between the two classes.