In this semester's "Introduction to Artificial Intelligence" course, students chose "AI-assisted Game Design" as the theme for their midterm project. Initially, they attempted to generate game code using AI through vibe coding. Although the generated results were relatively simple and could even be described as quite basic, this process provided students with a deep understanding of the potential and limitations of AI in programming.
Students observed that AI could produce a piece of code in just a few minutes, while the same task might take them several hours or even days to complete on their own. However, the code generated by AI was not perfect and frequently contained errors, requiring continuous feedback and corrections from humans to gradually complete it. For example, during the process of importing images, AI initially failed to correctly read the file location needed for the game. The students provided feedback on the error message to the AI, along with the correct file path and its purpose, which ultimately allowed the code to run successfully. This experience made students realize that while AI has powerful generation capabilities, humans still play an important role as "supervisors and correctors."
Moreover, AI often included detailed comments when generating code, explaining the purpose of each segment. This became an invaluable learning resource for students with a weaker programming background. By reading the comments, they could not only grasp programming logic and structure more quickly but also build confidence by applying what they learned to other programming tasks. For instance, during the game development process, AI's comments helped students understand the design logic of "player objects," "enemy objects," and the "game loop," leading them to learn how to break down functions and organize classes.
From the teacher's perspective, this group's project process demonstrated the dual value of AI in education: on one hand, it provides unprecedented efficiency, allowing students to see results quickly and maintain motivation; on the other hand, its errors and incompleteness compel students to engage in critical thinking and continuous adjustments, which fosters their problem-solving skills. Students even likened their interactions with AI to conversing with a person who is "knowledgeable, quick to respond, but occasionally careless and makes mistakes." This analogy clearly illustrates AI's new role in the learning environment—it does not replace learning, but becomes a guiding and accompanying presence.
In summary, through this project, students not only learned how to effectively utilize AI to generate code but also developed logical thinking, patience, and the ability to solve problems independently during the error correction and interaction process. This is precisely the core learning outcome we hope to cultivate in the "Introduction to Artificial Intelligence" course.