mBlock Programming 2024/3 – PPD Pekan (AI Assisted)

AI-Assisted Learning in Graphical Programming in Game Development with UMPSA STEM Lab

At UMPSA STEM Lab, we are dedicated to pioneering innovative approaches to teaching, leveraging cutting-edge technology to enhance learning experiences. In our latest initiative, we have integrated AI-assisted learning into our graphical programming curriculum, focusing on game development. This blog post outlines our approach, highlighting a step-by-step guide from creating the game character to implementing a scoring system. Our primary tool for AI assistance is the ChatGPT platform. This course is designed for school teachers, equipping them with the skills and knowledge to bring engaging, technology-driven learning into their classrooms.

The journey begins with the classic game of Snake. The first step is to create the snake head. Using Scratch, teachers learn to design a simple sprite representing the snake’s head. ChatGPT assists by providing instant feedback and suggestions on sprite creation, ensuring that even those new to graphical programming can follow along effortlessly. For instance, teachers can ask ChatGPT for tips on sprite design or troubleshooting any issues they encounter during the creation process.

With the snake head created, the next task is to make it move. Teachers are guided through programming the sprite to move continuously and respond to arrow key inputs. ChatGPT offers code snippets and explanations, helping participants understand the logic behind sprite movement and control. This AI support allows teachers to quickly grasp the concepts and effectively implement them in their projects.

A key element of the Snake game is the food that the snake eats to grow. Teachers learn to create a food sprite and program it to appear at random positions on the screen. ChatGPT assists in writing the code for random positioning and collision detection between the snake head and food. By leveraging AI, teachers can receive immediate support and suggestions for optimizing their code.

When the snake eats the food, it grows longer. In this act, teachers learn to add a segment to the snake each time it eats food. ChatGPT provides guidance on how to use lists to keep track of the snake’s segments and update their positions accordingly. This AI-assisted learning approach helps teachers understand the concept of lists and how they can be used effectively in programming.

To make the game challenging, the snake must avoid colliding with itself or the screen edges. Teachers learn to implement collision detection and end the game when a collision occurs. ChatGPT helps by explaining the logic and providing sample code to detect collisions. This AI support enables teachers to quickly grasp complex programming concepts and apply them to their projects.

The final step is to add a scoring system to keep track of the player’s progress. Teachers learn to create a variable to store the score and update it each time the snake eats food. ChatGPT assists in writing the code to increment the score and display it on the screen. By utilizing AI, teachers can ensure their code is efficient and error-free.

The goal of this course is to empower teachers with the skills and confidence to integrate AI-assisted learning into their classrooms. By leveraging the ChatGPT platform, teachers can access real-time support and guidance, making it easier to learn and teach complex programming concepts. This not only enhances their technical skills but also prepares them to inspire and engage their students with interactive, technology-driven lessons.

At UMPSA STEM Lab, we believe in the power of AI to transform education. Our AI-assisted learning approach in graphical programming for game development provides teachers with a robust framework to enhance their teaching methodologies. By integrating tools like ChatGPT, we are paving the way for a future where technology and education go hand in hand, creating a dynamic and interactive learning environment for students.

Today’s program is in collaboration with Pekan Education District Office. Join us in this exciting journey of AI-assisted learning and discover how you can bring the magic of game development into your classroom, inspiring the next generation of tech-savvy learners.

 

Python Programming 2024/1 – MRSM Tun Abdul Razak

*UMP STEM Lab Python Programming Synopsis can be found here.

30 students and teachers from MRSM Tun Abdul Razak Pekan  had participated in this program. Students have gone through activities such as creating a video game, named as Slider Game, using Python Programming.

The Slider Game is a puzzle game where players move a character within a grid to reach a goal. The challenge is to navigate the player and hit the enemies. This game helps beginners learn programming concepts and develop problem-solving skills. It started off by learning Python, a beginner-friendly language, and use the Pygame library to create the game environment, handle graphics, and manage user input. Students later progress to understand the basics like variables, loops, and conditionals. They later proceed to implement movement and collision detection, adding winning conditions and polish the game with features like scoring.

Developing a game reinforces programming concepts.It enhances logical thinking and creativity. The interactive nature of games keeps learners motivated. Games provide immediate feedback, helping learners correct mistakes quickly.

Thank you Fadhillah for coordinating the communication between UMP STEM Lab and the participants.

mBlock Programming 2024/2 – SMK Seri Saujana

A synopsis of the program can be retrieved via the following link.

In the program, 30 participants from SMK Seri Saujana were introduced to mBlock programming, learning to use its graphical interface to create sequences of instructions. They explored sequential programming, conditional statements, and loops through hands-on tutorials. These foundational skills were applied in two projects: a Snake game and a Pac-Man game. In the Snake game, they programmed the snake’s movement, growth, and collision detection, while in the Pac-Man game, they navigated a maze, collected points, and avoided ghosts. This approach provided a comprehensive understanding of programming concepts and their practical applications.

Appreciation to Cikgu Hans for coordinating the communication between the participants and UMP STEM Lab.

 

Computational Thinking and AI in Robotics

UMPSA STEM Lab Robotics module now expanding to include Computational Thinking (CT) and Artificial Intelligence (AI) 🙂 . This new modules build on the foundation of the lab’s existing Arduino robotics curriculum, taking students from basic robotics to advanced AI applications.

The Arduino modules (programming & robotics) introduce participants to programming concepts and the fundamentals of robotics using Arduino, an open-source platform. Students learn about digital and analog input/output, integrating and programming sensors, and controlling actuators. They get hands-on experience with various sensors such as infrared (IR) sensors, ultrasonic sensors, and accelerometers. Additionally, they learn about Pulse Width Modulation (PWM) for motor speed control.

By the end of the module, participants build their own line-following or obstacle-avoidance robots using a two-wheel miniature robot. This hands-on project not only reinforces their learning but also sparks their interest in the endless possibilities of robotics.

Introducing Computational Thinking in Robotics
This new Computational Thinking (CT) and AI in Robotics module takes this learning a step further. Participants will now look into the strategic aspects of robotics, focusing on how to make their two-wheel miniature robot choose the best path from the start to the destination on a track. This involves:

  1. Decompose – Breaking down the mission into smaller tasks, such as detecting lines, making turns, and avoiding obstacles.
  2. Patterns – Identifying patterns in the robot’s environment and behavior to predict and plan the robot’s movements.
  3. Abstractions – Simplifying complex tasks by focusing on the essential details needed to solve a problem.
  4. Algorithms – Developing step-by-step instructions for the robot to follow, ensuring it navigates the track efficiently.
  5. Logical Reasoning – Using logical conditions to decide when the robot should turn, go straight, or stop.
  6. Evaluation – Testing and refining the robot’s performance to ensure it follows the shortest or fastest route accurately.

Through coding and hands-on experimentation, students will program their Arduino robots to follow lines (either black or white) and navigate through the track using CT principles. This practical approach helps them understand and apply CT concepts in real-world scenarios.

The activity doesn’t stop with CT. We further extend the module to include AI in robotics, focusing on image processing as a key application. Using the ESP camera onboard the robots, participants will capture and classify images. They will engage in image augmentation, generating multiple images with different sizes, tilts, and orientations to create a diverse dataset.

The training process involves teaching the AI model to recognize patterns and classify images accurately. Once the best model is generated, it is deployed onto the Arduino platform. Participants then code their robots to use this AI model, enabling them to scan images, follow lines, and perform tasks such as picking and placing items accordingly.

The modules are designed to provide students with a comprehensive understanding of both computational thinking and AI. By integrating these concepts into their robotics projects, students gain valuable skills that are highly relevant in today’s technology-driven world.

From understanding the basics of robotics to developing sophisticated AI models, participants at UMP STEM Lab are equipped with the knowledge and experience to tackle complex problems creatively and effectively. Our hands-on approach ensures that learning is both engaging and practical, preparing students for future challenges in STEM fields.

Let’s explore, learn, and innovate.

 

Arduino Robotics 2024/3 – MRSM TAR

*UMPSA STEM Lab Arduino Robotics Programming Synopsis can be found here.

The Arduino robotics programming session focused on introducing 32  students and teacher, from MRSM Tun Abdul Razak, to the fundamentals of coding and robotics using Arduino microcontrollers. The content covered basic coding concepts and gradually progressed to advanced topics such as line following algorithms. Through hands-on exercises and projects, students gained practical experience in programming Arduino boards to control a miniature 2-wheel robotic systems. The session successfully engaged students in interactive learning activities, fostering their understanding of robotics principles and enhancing their coding skills.

A special appreciation is extended to Cikgu Ismadey for her exceptional coordination in facilitating communication between the participants and the UMPSA STEM Lab.