Abstract
The growing integration of Artificial Intelligence (AI) into computational systems has increased the need to develop algorithmic and computational thinking skills from an early stage of education. However, introducing programming and AI concepts to young learners remains challenging because conventional programming environments often impose syntactic and cognitive demands that can obscure fundamental computational concepts. This study proposes and evaluates an AI-integrated computational learning framework that combines Scratch 3.0-based visual programming with introductory AI concepts to support the development of algorithmic thinking among primary school students. The framework connects visual programming, algorithm design, problem decomposition, logical sequencing, pattern recognition, decision-making, testing, and debugging with age-appropriate AI activities. An eight-week intervention was conducted with 150 students from the first to sixth year of primary education at Gandhi Primary School in Hay Hassani, Casablanca, Morocco. Quantitative and qualitative data were collected using pre-tests, post-tests, classroom observations, student questionnaires, and teacher feedback. The results show an increase in the overall average score from 46.5% in the pre-test to 78.0% in the post-test, representing a 31.5-percentage-point improvement. Students also demonstrated improvements in problem decomposition, logical sequencing, pattern recognition, debugging, engagement, and motivation toward programming. The findings indicate that integrating Scratch with introductory AI concepts can provide an accessible computational environment for developing algorithmic thinking while introducing learners to fundamental AI concepts. The proposed framework provides a structured model for integrating programming and AI learning activities across primary education and highlights the importance of teacher preparation, technological infrastructure, curriculum alignment, and responsible AI awareness in sustaining such approaches.