With the rise of artificial intelligence (AI), cultivating the AI abilities of the new generation of learners has become crucial. However, currently, there is a lack of tools in education found to effectively enhance students' AI abilities. To discover effective ways to foster students' understanding of AI concepts and skills, this research developed an Artificial Intelligence Image Recognition Robot unit, which was conducted through a series of AI courses in conjunction with educational robots. There are total of 41 undergraduates participating the instructional experiment. The first half of the experiment focused on introducing AI concepts and implementing image recognition models, while the second half involved robot programming and a robot board game competition. At the beginning and the end of the nit, students completed the AI Learning Achievement Test, the Programming-Oriented Computational Thinking scale and the Robot Self-Efficacy Scale to assess differences before and after the unit. The research found that by taking the AI Image Recognition Robot unit, students' AI learning achievements, programming-oriented computational thinking, and robot self-efficacy were significantly enhanced. This suggests that students will be better equipped to evaluate and understand the effectiveness of algorithms in programming and problem solving in the future. It is recommended that robots be incorporated as educational tools when engaging in AI learning.