Source-linked AI summary
Using Scratch to Teach Undergraduate Students' Skills on Artificial Intelligence
Julian Estevez, Gorka Garate, JM Lopez Guede, Manuel Graña
TL;DR
Teaching AI basics is described as difficult, and the paper proposes Scratch activities that teach basic AI mathematics through clustering and neural-network exercises. The tasks are presented as scalable, with options for students to explore the mathematics or code further.
Problem
Teaching AI basics is described as difficult because of the lack of a unified methodology and the range of disciplines and skills involved.
Source: §II · p. 2Method
The paper proposes Scratch activities teaching basic AI mathematics through K-means clustering and two neural-network exercises, adapted for students’ mathematical backgrounds.
Source: §I · p. 1, §II · p. 2, §III · pp. 2–3Results
The tasks are described as scalable, allowing students to explore mathematical iterations, Scratch code, or propose neural networks for other problems.
Source: §V · p. 6Takeaways & Limitations
The teacher-guided activities can be used in schools with Scratch, and the equations can also be implemented in formats such as Excel.
Source: §V · pp. 5–6
Abstract
from arXiv · showhide
This paper presents a educational workshop in Scratch that is proposed for the active participation of undergraduate students in contexts of Artificial Intelligence. The main objective of the activity is to demystify the complexity of Artificial Intelligence and its algorithms. For this purpose, students must realize simple exercises of clustering and two neural networks, in Scratch. The detailed methodology to get that is presented in the article.
I. INTRODUCTION
The paper motivates active, collaborative approaches to scientific and AI education and proposes Scratch-based exercises for teaching basic AI mathematics and algorithms.
I. INTRODUCTION
- The introduction frames scientific-method learning as important in students’ curricula, including at the undergraduate stage.It describes educational efforts to foster scientific-method learning as worthwhile.Source: §I · p. 1
- Traditional expositive classes are contrasted with informal, collaborative contexts, while active student participation remains difficult to achieve.The passage argues that attractive resources such as games, social interaction, and real problems can appeal to students’ interests.Source: §I · p. 1
- The paper situates AI education amid calls to prepare students for technological and social challenges and to support understanding of AI’s societal role.The stated aims include improving technological understanding and informing debate about how AI should be used.Source: §I · p. 1
- Computational thinking is increasingly viewed as an important part of STEM learning, while higher-education studies report low student pass rates in mathematics.The passage also notes that schools often prepare students for the future by continuing past practices.Source: §I · p. 1
- The paper proposes teaching basic AI mathematics and simple algorithms through an educational activity developed in Scratch.The activities are designed for students aged 16–18 and focus on understanding the rules behind intelligent systems rather than memorizing them.Source: §I · p. 1
II. BACKGROUND
The background describes difficulty teaching AI basics and contrasts robotics-centered coding instruction with the paper’s broader Scratch-based mathematics approach to multiple algorithms.
II. BACKGROUND
- Teaching AI basics is described as difficult because there is no unified methodology and the subject blends disciplines requiring varied skills.The passage notes that AI can be taught with tools ranging from paper and pencil to traditional or hands-on computer programming.Source: §II · p. 2
- The background notes that coding instruction is often framed through robotics workshops, while robotics activities may draw student attention away from AI fundamentals.It describes prior work emphasizing that activities should make their AI objective and project boundaries clear.Source: §II · p. 2
- The paper presents a broader approach to AI than robotics, teaching mathematics with Scratch to introduce students to more than one algorithm.The passage contrasts this approach with robotics as a recognized route for teaching computational-thinking skills.Source: §II · p. 2
- Computational thinking is defined as recognizing computation in the world and applying computer-science tools and techniques to reason about natural and artificial systems.The cited definition is attributed to,.Source: §II · p. 2
- The passage describes graphical programming environments as relatively easy to use, allowing early work to focus on design and creation rather than syntax.Scratch is identified as popular and effective for engaging and motivating young students with no programming experience.Source: §II · p. 2
III. CONTENT
The content section outlines Scratch activities on K-means clustering and neural networks, including logic-gate exercises adapted to students’ mathematical background.
III. CONTENT
- The workshop is intended for students aged 16–18, who should be able to understand, play, and eventually code the algorithms.The section introduces the algorithms as activities practiced using Scratch.Source: §III · p. 2
- Students use K-means to assign points to the nearest of K mass centers and form K colored clusters.The activity begins with a cloud of N points and a smaller cloud of K mass centers, with Figure 1 referenced for the initial and final clouds.Source: §III · p. 2, Figure 1 · p. 3
- The neural-network introduction describes networks as software simulations that learn patterns or make decisions using interconnected units and simple mathematical rules.The passage traces perceptrons to Frank Rosenblatt, inspired by earlier work by McCulloch and Pitts.Source: §III · p. 2
- Because the target students have not yet studied derivatives, the neural-network exercises use a logic activation function described as understandable to them.The formulas are presented without prior mathematical demonstration.Source: §III · pp. 2–3
- The section describes two neural-network exercises: a two-input, one-output network and a 3-2-1 network, both trained with AND and OR logic gates.In the simpler exercise, students observe changing weights and how parameter adjustments change with the OR data.Source: §III · p. 3
1) Simple Neural Network operation:
The simple network computes an output from two weighted inputs, then adjusts its weights using the error between the desired and obtained outputs until they converge.
1) Simple Neural Network operation:
- The neuron computes output Y1 from Input1 and Input2 using their corresponding weights.Source: 1) Simple Neural Network operation · p. 3
- Error is the difference between the desired output and the obtained output Y1.Source: 1) Simple Neural Network operation · p. 3
- Each execution updates the weights using backpropagation and gradient descent until Y1 converges to the desired output.Source: 1) Simple Neural Network operation · p. 3
- The new first weight adds the product of Input1, the learning rate, and the error to its previous value.Source: 1) Simple Neural Network operation · p. 3
- The second weight is updated by a corresponding rule, and Figure 2 and Figure 3 are identified as the first and second network interfaces.Source: 1) Simple Neural Network operation · p. 3, Figure 2 · p. 3, Figure 3 · p. 3
2) Complex Neural Network operation:
The complex network uses two hidden neurons and one output neuron, computes their values from three inputs and five weights, and updates those weights through backpropagation and gradient descent.
2) Complex Neural Network operation:
- The network has two hidden neurons, N1 and N2, and one output neuron, N3, with values calculated from three inputs and five weights.Source: 2) Complex Neural Network operation · p. 4
- N1 combines X1 and X2 with W1 and W2, N2 combines X3 with W3, and N3 combines N1 and N2 with W4 and W5.Source: 2) Complex Neural Network operation · p. 4
- An activation function is applied at N3, which is the network output.Source: 2) Complex Neural Network operation · p. 4
- The error is defined for the network output and the weights are updated using backpropagation and gradient descent.The update equations cover all five weights; students store the calculated error and weights on the corresponding neurons.Source: 2) Complex Neural Network operation · p. 4
IV. METHODOLOGY
The workshop uses Scratch for paired AI exercises, with most code provided and students filling designated gaps. It combines short instruction, supported coding time, and answer checking.
IV. METHODOLOGY
- Scratch is a visual programming language with a block-like interface, and students can share projects and discuss them.Students are advised to acquire some familiarity with Scratch before the exercises.Source: §IV · p. 4
- Students first fill designated gaps in largely provided code rather than creating the algorithms or writing all the code themselves.Source: §IV · p. 4
- Students work in pairs through a workshop that begins with a 15–20-minute explanation of AI and the workshop objective.The stated aims are to demystify AI and understand simple mathematics underlying the computations.Source: §IV · p. 4
- Teachers provide written algorithm background and exercise instructions for K-means and neural networks, plus a further 10-minute explanation of their basics.Source: §IV · p. 4
- Students have one hour to complete and run the code: 20 minutes for K-means and 40 minutes for both neural-network parts, with teachers available to assist.Source: §IV · p. 4
- At the session's end, teachers provide completed Scratch answers for students to check their work.Source: §IV · p. 4
A. K-Means
The K-means activity has students complete Scratch blocks to generate points, assign each point to its nearest mass center, and color the resulting clusters. It demonstrates automatic clustering rather than producing equally sized clusters.
A. K-Means
- Students complete the NewDataSet, KMeans, and ColourPoints function blocks within a Scratch algorithm built around a main block.The student must finish all three function blocks.Source: A. K-Means · p. 4
- The main block creates K random mass centers with X coordinates from −230 to 230 and Y coordinates from −170 to 170.These points serve as the cluster mass centers.Source: A. K-Means · p. 4, Figure 4 · p. 4
- Students first complete NewDataSet to create the cloud of N points within the stated X and Y coordinate ranges.Figure 5 presents the unfinished function for creating the cloud.Source: A. K-Means · pp. 4–5, Figure 5 · p. 5
- Each point is assigned to its closest mass center, and the cluster assignments determine the colors used to graph points and centers.The algorithm is intended to demonstrate automatic clustering, not to produce equivalent-size clusters.Source: A. K-Means · p. 5
B. Neural Network: AND/OR logic gate
The single-neuron Scratch exercise has students implement its weight-update equations and train it on AND- and OR-gate data.
B. Neural Network: AND/OR logic gate
- The exercise uses a main block to initialize data and two blocks named Neuron and ExecuteButton.Students code the equations defining the network's only neuron, including the update of W2.Source: B. Neural Network: AND/OR logic gate · p. 5
- The student-coded equations update W2 for the network's single neuron.Figure 7 presents the unfinished weight-update function.Source: B. Neural Network: AND/OR logic gate · p. 5
- Students train the neuron on separate datasets for the AND and OR logic gates.Source: B. Neural Network: AND/OR logic gate · p. 5
C. Complex Neural Network Operation
The more complex exercise trains a three-input multilayer neural network on AND and OR logic gates. Students complete specified network-calculation and weight-update operations.
C. Complex Neural Network Operation
- The exercise uses a three-input multilayer network with three neurons, Neuron1, Neuron2, and Neuron3, trained with AND and OR logic gates.Source: C. Complex Neural Network Operation · p. 5
- Students fill gaps in the calculation of N3's net value and in the updates of W2 and W5.Figure 6 shows the unfinished distance-calculation task, and Figure 7 shows the weight-update task.Source: C. Complex Neural Network Operation · p. 5, Figure 6 · p. 5, Figure 7 · p. 5
V. CONCLUSIONS
The authors propose teacher-guided Scratch activities adapted to students' mathematical background, with room to vary the depth and extend the algorithms. They identify repeated workshops with pedagogical researchers as future work for measuring objective achievement.
V. CONCLUSIONS
- The activities are teacher-guided and adapted to the mathematical background of students aged 16–18.Source: §V · p. 5
- Students can explore the mathematics of the iterations, inspect the Scratch code, or propose neural networks for other problems.Source: §V · p. 6
- The work could extend to students of different ages and include additional AI algorithms.Source: §V · p. 6
- The K-means and neural-network equations are simple enough to implement in formats such as MS Excel, which may be more familiar to some students than Scratch.Source: §V · p. 6
- The authors propose running the workshop several times and measuring objective achievement with pedagogical researchers.Source: §V · p. 6