注:本文为 “数学教育 | 编程与计算思维” 相关英文引文,机翻未校。
略作重排,如有内容异常,请看原文。
Programming and Computational Thinking in Mathematics Education
数学教育中的编程与计算思维
An Integration Towards AI Awareness
迈向人工智能认知的整合路径
Andreas Lindenskov Tamborg¹・Raimundo Elicer²・Daniel Spikol³
安德烈亚斯・林登斯科夫・坦博格 ¹・雷蒙多・埃利塞尔 ²・丹尼尔・斯皮科尔 ³
Received: 15 July 2021 / Accepted: 22 December 2021 / Published online: 3 February 2022
收稿日期:2021 年 7 月 15 日 / 录用日期:2021 年 12 月 22 日 / 在线出版日期:2022 年 2 月 3 日
© The Author (s), under exclusive licence to Springer-Verlag GmbH Germany and Gesellschaft für Informatik e.V. 2022
© 作者,独家授权德国施普林格出版社(Springer-Verlag GmbH Germany)与德国信息学会(Gesellschaft für Informatik e.V.)2022 年出版
Abstract
摘要
Artificial intelligence (AI) has become a part of everyday interactions with pervasive digital systems. This development increasingly calls for citizens to have a basic understanding of programming and computational thinking (PCT). Accordingly, countries worldwide are implementing several approaches to integrate critical elements of PCT into K-9 education. However, these efforts are confronted by difficulties that the PCT concepts are for students to grasp from purely theoretical perspectives. Recent literature indicates that the playful nature is particularly important when novices from both early and higher education are to learn AI. These playful activities are characterised by setting a scene where PCT concepts such as algorithms, data processing, and simulations are meant to draw on to understand better how AI is integrated into our everyday digital life. This discussion paper analyses playful PCT resources developed around the game rock-paper-scissors developed in the UK and Denmark. Resources from these countries are interesting starting points since both have been or are in the process of integrating PCT as part of the K-9 curriculum. The central discussion raised by the paper, is the nature of the integration between mathematics and PCT in these tasks. These resources provide opportunities for discussion of how we may better integrate PCT and mathematics from the perspective of both subjects to build a solid foundation for a critical understanding of AI interactions in future generations.
人工智能(AI)已成为人类与普适性数字系统日常互动的一部分。这一发展趋势对公民提出了更高要求,即需具备对编程与计算思维(PCT)的基础认知。为此,全球各国正采取多种举措,将 PCT 的核心要素整合到 K-9 阶段教育(小学至初中)中。然而,这些努力面临一项挑战:仅从纯理论视角出发,学生难以掌握 PCT 概念。近期文献表明,无论是基础教育阶段还是高等教育阶段的初学者,在学习 AI 时,学习过程的趣味性都尤为重要。这类趣味性活动的特点是构建特定场景,让学习者借助算法、数据处理和模拟等 PCT 概念,更好地理解 AI 如何融入日常数字生活。本讨论文章以英国和丹麦围绕 “剪刀 - 石头 - 布” 游戏开发的趣味性 PCT 教学资源为分析对象。这两个国家的资源具有重要参考价值,因为它们均已将或正处于将 PCT 整合到 K-9 阶段课程大纲的过程中。本文提出的核心讨论议题是,在这些教学任务中数学与 PCT 整合的本质。这些资源为我们提供了讨论空间,即如何从数学和 PCT 两个学科视角出发,更好地实现二者整合,从而为培养下一代对 AI 互动的批判性认知奠定坚实基础。
Keywords
关键词
Artificial intelligence・Computational thinking・Mathematics education・Learning programming
人工智能・计算思维・数学教育・编程学习
1 Introduction
1 引言
Artificial Intelligence (AI) has become a part of many aspects of everyday interactions with pervasive digital systems [36]. This development increasingly calls for citizens to have a basic understanding of programming and computational thinking (PCT) [11]. AI and PCT may at first glance not seem to have that much in common, since AI deals with developing complex algorithms and PCT is studied in the learning sciences and mainly deals with how to teach students this new topic. Recently, studies of PCT in education have however emphasised the need to teach students AI from an early age, since early exposure to this field can lead to more thoughtful and nuanced reasoning about AI-based devices [11, 30, 36]. Manheim and Kaplan [19], argue for society to pay attention to what AI means for privacy and democracy. In this paper, we suggest that teaching students AI from an early age could be an important stepping-stone towards building such attention. This focus needed since AI is not only a specialised topic relevant for experts, but a built-in technology of many of the devices children interact with. Aside from specialised high school and higher education programmes, the increasing importance of learning AI and PCT has led to a worldwide interest in implementing key elements of PCT into K-9 education, as a non-differentiated instructional frame for all future citizens [4]. However, these efforts are confronted by difficulties that the PCT concepts are for students to grasp from purely theoretical perspectives. Most national curricula do not have a subject where such topics are apparent to address. We reckon that as a school subject, mathematics presents opportunities to deal with this challenge. The apparent yet ambiguous interconnections between school mathematics and PCT are at the core of the research project this article is embedded in.
人工智能(AI)已融入人类与普适性数字系统日常互动的诸多方面 [36]。这一发展趋势对公民提出了更高要求,即需具备对编程与计算思维(PCT)的基础认知 [11]。初看之下,AI 与 PCT 似乎并无太多共通之处:AI 聚焦于复杂算法的开发,而 PCT 属于学习科学的研究范畴,主要探讨如何向学生传授这一新兴主题。然而,近期关于教育领域 PCT 的研究强调,需从早期阶段开始向学生教授 AI 相关知识,因为早期接触该领域有助于学生对 AI 设备形成更深入且细致的推理能力 [11, 30, 36]。曼海姆(Manheim)与卡普兰(Kaplan)[19] 认为,社会应关注 AI 对隐私与民主的影响。本文提出,从早期阶段向学生教授 AI 知识,可能是培养这种关注度的重要垫脚石。我们之所以强调这一重点,是因为 AI 不仅是仅与专家相关的专业性主题,更是儿童所接触的众多设备中内置的技术。除高中和高等教育阶段的专业课程外,鉴于学习 AI 与 PCT 的重要性日益凸显,全球各国开始关注将 PCT 的核心要素整合到 K-9 阶段教育中,将其作为面向所有未来公民的无差异化教学框架 [4]。但这些努力面临一项挑战:仅从纯理论视角出发,学生难以掌握 PCT 概念。大多数国家的课程大纲中,均无明确针对此类主题的学科。我们认为,数学作为学校学科,为应对这一挑战提供了可能。学校数学与 PCT 之间显著却模糊的关联,是本文所属研究项目的核心议题。
Since the introduction computational thinking (CT), it has been argued that there are several potential overlaps and synergies between CT and mathematics [27]. Research from the 1980’s showed that programming can aid the learning of several aspects of mathematics such as algebra [24], geometry [25] and proportion and ratio [10]. Recent studies [3] however acknowledge that synergies between mathematics and programming can only be exploited insofar that activities are designed to do so. When this is done, empirical research however indicate that students can use scripts to build mathematical ideas, and that algorithms can capture mathematical reasoning [3]. Indeed, more and more available educational resources seek to exploit these synergies and develop exercises that integrate mathematics and PCT [1]. Regardless of the national contexts in which these resources are developed, they often take the outset in the same or similar playful activities, which are well-known to students. These activities are characterised by setting a scene where PCT concepts such as algorithms, data processing, and simulations are meant to draw on to understand better how AI is integrated into our everyday digital life. Thus, such resources seem to hold the potential to help to embed PCT in an established school subject and anchoring PCT education in meaningful contexts for students.
自计算思维(CT)这一概念提出以来,学者们认为 CT 与数学之间存在多个潜在的重叠领域与协同作用 [27]。20 世纪 80 年代的研究表明,编程有助于学习数学的多个方面,如代数 [24]、几何 [25] 以及比例与比率 [10]。然而,近期研究 [3] 指出,只有通过专门设计的教学活动,才能充分发挥数学与编程之间的协同作用。实证研究表明,当教学活动设计合理时,学生可借助脚本来构建数学思路,且算法能够体现数学推理过程 [3]。事实上,越来越多的现有教育资源正致力于挖掘这种协同作用,并开发整合数学与 PCT 的练习 [1]。无论这些资源是在何种国家背景下开发的,它们往往以学生熟悉的相同或类似趣味性活动为切入点。这类活动的特点是构建特定场景,让学习者借助算法、数据处理和模拟等 PCT 概念,更好地理解 AI 如何融入日常数字生活。因此,这类资源有望助力将 PCT 嵌入已有的学校学科中,并将 PCT 教育置于对学生有意义的场景中。
Although taking the outset in very similar activities, these resources vary substantially regarding what mathematical and PCT topics they include and the extent and nature of their relation. In this discussion paper, we analyse playful PCT resources developed around the game rock-paper-scissors developed in the UK and Denmark. Resources from these countries are interesting starting points since both have been or are in the process of integrating PCT as part of the K-9 curriculum. Moreover, there exist elaborate resources to support teachers in teaching, respectively, Computing and Technology Comprehension as new subjects. In our analysis, we focus on identifying what aspects of PCT and mathematics the resources include. Further, by drawing on a typology of the nature of the relation between PCT and mathematics developed by Bråting and Kilhamn [7, 13], we describe the nature of the integration between mathematics and PCT in the tasks. We conclude by discussing strengths and weaknesses in the analysed resources and discuss opportunities of integrating PCT and mathematics from the perspective of both subjects to build a solid foundation for a critical understanding of AI interactions in future generations.
尽管这些资源均以类似的趣味性活动为切入点,但在包含的数学与 PCT 主题、以及二者关联的程度与本质方面,存在显著差异。本讨论文章以英国和丹麦围绕 “剪刀 - 石头 - 布” 游戏开发的趣味性 PCT 教学资源为分析对象。这两个国家的资源具有重要参考价值,原因在于它们均已将或正处于将 PCT 整合到 K-9 阶段课程大纲的过程中。此外,两国还分别开发了完善的资源,以支持教师将 “计算机科学” 和 “技术认知” 作为新兴学科进行教学。在分析中,我们首先明确这些资源所涵盖的 PCT 与数学内容;其次,借鉴布拉廷(Bråting)与基尔哈姆(Kilhamn)[7, 13] 提出的 PCT 与数学关系类型学,描述教学任务中数学与 PCT 整合的本质。最后,我们将探讨所分析资源的优势与不足,并从数学和 PCT 两个学科视角出发,讨论二者整合的机遇,旨在为培养下一代对 AI 互动的批判性认知奠定坚实基础。
2 Background
2 研究背景
Papert [28] popularised the notion of computational thinking, and the concept increased in popularity and relevance with the work of Wing [37, 38]. Papert advocated the use of computational thinking as a powerful and accessible tool for learning. Researchers operationalised Papert’s ideas into a set of problem-solving skills derived from the broad field of computer science with a focus on the behaviour of humans [26, 31].
帕佩特(Papert)[28] 普及了计算思维这一概念,而温格(Wing)[37, 38] 的研究进一步提升了该概念的普及度与相关性。帕佩特主张将计算思维作为一种强大且易于获取的学习工具。研究者们将帕佩特的观点操作化为一系列问题解决能力,这些能力源于计算机科学的广泛领域,并聚焦于人类行为研究 [26, 31]。
Our vision of computational thinking builds from Weintrop et al. [35] and their argument for the thoughtful use of computational tools and skill sets that depend on the learning of mathematics and science content. Their motivation is based on the changing nature of science and mathematics research driven by computational counterparts that include the use of machine learning and artificial sciences. Weintrop et al. argue for the reciprocal need to use computation to enrich mathematics and science learning while using mathematics and science contexts to enrich computational knowledge by including real-world problems to motivate diverse and meaningful participation [35]. Others go further and Guzdial [15] argue for the need to redesign computing to give children new power to make sense of their world. They urge that computing needs to be integrated into all aspects of education using representations (abstractions) appropriate to language, mathematics, science, and other subjects that use models and systems. Mathematical knowledge, and its related pedagogy, are inextricably linked to the tools in which the knowledge is expressed [16].
我们对计算思维的理解基于魏因特罗普(Weintrop)等人 [35] 的研究,他们主张应审慎使用计算工具与技能组合,而这些工具与技能的掌握依赖于数学和科学内容的学习。他们的研究动机源于计算技术(包括机器学习与人工科学的应用)推动下,科学与数学研究本质所发生的变化。魏因特罗普等人认为,存在一种双向需求:一方面,需借助计算技术丰富数学与科学学习;另一方面,需以数学与科学场景为依托,通过融入现实问题激发多样化且有意义的参与,进而丰富计算知识 [35]。还有学者提出了更深入的观点,例如古兹迪尔(Guzdial)[15] 认为,需重新设计计算教学,让儿童获得理解自身所处世界的新能力。他们强调,计算教学需整合到教育的各个方面,并采用适合语言、数学、科学及其他使用模型与系统的学科的表征(抽象化)方式。数学知识及其相关教学法,与表达这些知识的工具密不可分 [16]。
However, there is not much agreement on what computational thinking is in practice and research [29, 31]. More challenging, from our standpoint, is how to implement CT into education to support mathematics and reciprocally draw the connections between computer science and mathematics. This lack of agreement and examples especially becomes important when looking at digital competencies to interact with Artificial Intelligence critically. Without bringing together the different aspects of programming, computational thinking and mathematics together, it becomes hazy to provide meaningful activities for AI that show the interlinked relations thereof. When we investigate the relationship between mathematics, PCT, and AI, we see opportunities to give context and design tools (learning activities) to explore how to make real-world connections to reify these complex concepts.
然而,在实践与研究中,关于计算思维的定义尚未达成广泛共识 [29, 31]。在我们看来,更具挑战性的问题是:如何在教育中实施 CT 以支持数学学习,同时反过来建立计算机科学与数学之间的关联。当关注培养批判性地与 AI 互动的数字素养时,这种共识的缺失以及实例的不足就显得尤为突出。若无法将编程、计算思维与数学的不同方面整合起来,就难以设计出能够体现三者相互关联的、有意义的 AI 教学活动。在研究数学、PCT 与 AI 三者关系的过程中,我们发现有机会通过设定场景和设计工具(学习活动),探索如何建立与现实世界的联系,从而将这些复杂概念具体化。
3 Rock-Papers-Scissors
3 “剪刀 - 石头 - 布” 游戏(教学资源案例)
Aside from scholarly discussions, aspects of PCT have been increasingly included in compulsory education around the world [5]. Some countries have gone so far as to propose Computing as a school subject in its own right, as it is the case of England [20]. Others have embedded elements of PCT in already-existing subjects. In particular, Sweden has explicitly included programming as part of the algebra and problem-solving branches in the mathematics curriculum [18]. A hybrid position is the one exemplified by the case of Denmark, where Technology Comprehension—with PCT as part of its elements—is meant to be both a subject in itself and part of others [32]. Accordingly, these developments have led to the blossoming of diverse resources in different countries, with different approaches and priorities.
除学术讨论外,PCT 的相关内容正日益融入全球各国的义务教育中 [5]。部分国家甚至提议将 “计算机科学” 设为独立的学校学科,英国便是如此 [20]。另一些国家则将 PCT 元素嵌入现有学科中,例如瑞典在数学课程大纲的代数与问题解决分支中,明确纳入了编程内容 [18]。丹麦则采取了一种混合模式:“技术认知”(PCT 是其组成要素之一)既是一门独立学科,也融入其他学科之中 [32]。这些发展趋势促使不同国家涌现出各类教学资源,它们采用不同的方法,侧重点也各不相同。
As part of an ongoing research project relating PCT and mathematical digital competencies (MDC) [14], we have been producing a collection of tasks that –more or less explicitly– attempt to bridge these fields. We have organised these resources into common themes so as to make appropriate comparisons, such as programming calculators, generating random numbers, drawing geometrical figures and number base conversion. We anchor our discussion in one of the most prominent cases: the game rock-paper-scissors, which explicitly addresses AI. We summarise four of its version in Table 1, included at the end of the paper, identifying its source, resources needed, their declared problem statement and a brief description. Though other versions exist (e.g., from MIT’s App Inventor), they are not freely accessible and thus discarded from our analysis.
在一项探讨 PCT 与数学数字素养(MDC)关系的持续研究项目 [14] 中,我们开发了一系列教学任务,这些任务或多或少明确地试图连接 PCT 与数学数字素养这两个领域。我们将这些资源按共同主题分类,以便进行合理比较,例如编程计算器、生成随机数、绘制几何图形以及进制转换等主题。本文的讨论将聚焦于一个极具代表性的案例 ——“剪刀 - 石头 - 布” 游戏(该案例明确涉及 AI 内容)。我们在文末的表 1 中总结了该游戏的四个教学资源版本,标注了每个版本的来源、所需资源、明确提出的问题以及简要描述。尽管还存在其他版本(如麻省理工学院 App Inventor 平台的版本),但由于它们无法免费获取,因此未纳入本研究的分析范围。
4 Approach to Analysis
4 分析方法
In our analysis, we first identify the PCT and mathematical content from each of the tasks. Though several frameworks are available for the broad constructs of PCT [2, 29, 35] and mathematical competencies [22], we take a more simple and grounded approach. We address four tasks around the same theme; big frameworks are unnecessary at this stage, and we will come back to them in the discussion. Regarding PCT content, we identify the programming environments and languages and the computer science topics and concepts. We find it important to identify the programming environment and languages in the tasks in order to develop a more concrete understanding of how the tasks are organised to engage students in the playful AI activities. This information provide an understanding of the level of technical difficulty and demands on part of both students and teachers, which we find necessary since not all resources explicitly applies to a specific grade level. As for mathematics, we identify mathematical concepts and actions involved [7]. It is worth noting that mathematical constructs are seldom stated or, in most cases, can be inferred. Singling out the content is relevant since, as can be seen in the descriptions in Table 1, the resources take very different approaches to exploit rock-paper-scissors as a context for PCT learning.
在分析过程中,我们首先从每个教学任务中提取 PCT 与数学内容。尽管针对 PCT 这一广泛概念 [2, 29, 35] 和数学素养 [22] 已有多个分析框架,但我们采用了一种更简洁、更贴近实际的方法。由于本文仅分析围绕同一主题的四个任务,因此现阶段无需使用复杂框架(相关框架将在讨论部分提及)。在 PCT 内容方面,我们明确了各任务所使用的编程环境、编程语言,以及涉及的计算机科学主题与概念。我们认为,明确这些信息对于具体理解任务如何组织以让学生参与趣味性 AI 活动至关重要;同时,这些信息也有助于了解任务对学生和教师的技术难度要求 —— 鉴于并非所有资源都明确标注了适用年级,这一信息尤为必要。在数学内容方面,我们识别了任务中涉及的数学概念与操作 [7]。值得注意的是,数学结构很少被明确提及,在大多数情况下需通过推断得出。明确这些内容具有重要意义,因为从表 1 的描述中可看出,不同资源在将 “剪刀 - 石头 - 布” 作为 PCT 学习场景时,采用了差异显著的方法。
Secondly, we draw on two complementary frameworks, which both have been developed to study the interplay between PCT and mathematics. Misfeldt and colleagues [20] conducted a comparative analysis of the relations between programming—including notions of CT—and mathematics in curricular documents from Denmark, Sweden and England. They developed four different categories of relations: specific, explicit, implicit, and weak or non-existing. Relations are deemed specific when curricular documents or educational resources state the connections between PCT and a particular area of mathematics or a mathematical working process. Explicit relations take place when PCT is related to mathematics, mathematical working processes or competencies. Implicit relations are those where a relation to mathematics can be inferred but is not directly mentioned. Finally, weak or non-existing relations are when neither of the above is the case.
其次,我们借鉴了两个用于研究 PCT 与数学相互作用的互补框架。米斯费尔特(Misfeldt)及其同事 [20] 对丹麦、瑞典和英国课程文件中编程(含 CT 概念)与数学的关系进行了比较分析,并提出了四种关系类别:特定性、明确性、隐含性以及薄弱或无关联性。若课程文件或教育资源明确指出 PCT 与某一特定数学领域或数学工作流程的关联,则二者关系属于 “特定性”;若 PCT 与数学、数学工作流程或数学素养相关联(未限定具体领域),则属于 “明确性”;若可推断出 PCT 与数学的关联,但未被直接提及,则属于 “隐含性”;若上述情况均不满足,则属于 “薄弱或无关联性”。
Whereas we apply the four categories above to discriminate the extent to which connections between mathematics and PCT are specific or explicit, we build on and adapt the work of Bråting and Kilhamn [7] to investigate the nature of the relation between PCT and mathematics in the tasks. As part of their analysis of programming tasks developed for Swedish mathematics textbooks in a recent study, they identified the specific programming and mathematical concepts and actions present in the teaching resources. While their analysis mapped out the specific types of actions and concepts from mathematics and programming in the education resources (e.g., debugging, find mistakes etc.), we use the distinction between concepts and actions to identify the types of combinations between mathematical/PCT concepts and actions in the resources [13].
我们采用上述四类关系来区分数学与 PCT 关联的特定性和明确性程度,同时借鉴并调整了布拉廷与基尔哈姆 [7] 的研究成果,以探讨任务中数学与 PCT 关系的本质。在近期一项研究中,布拉廷与基尔哈姆分析了瑞典数学教材中的编程任务,并识别出教学资源中具体的编程与数学概念及操作。他们的分析明确了教育资源中数学与编程的具体操作类型和概念类型(如调试、纠错等),而我们则利用 “概念” 与 “操作” 的区分,识别资源中数学 / PCT 概念与操作的组合类型 [13]。
Overall, this approach to analysis is as starting point for discussing the following: (1) what mathematical and PCT content the tasks invoke, (2) to what extent relations between mathematics and PCT are present and explicit, and (3) in what ways mathematics and PCT are integrated. Together with the frameworks described above, this enables us to discuss how explicit mathematics is present in the computational tasks and whether these mathematical concepts and actions are combined with PCT concepts and actions. After having analysed the tasks according to the above three points (1–3), we proceed to discuss implications of the tasks’ characteristics and potential synergies of integrating mathematics and PCT content in related to students learning of AI.
总体而言,本分析方法为以下讨论提供了起点:(1)教学任务涉及哪些数学与 PCT 内容;(2)数学与 PCT 的关联程度及明确性如何;(3)数学与 PCT 以何种方式整合。结合上述框架,我们能够探讨计算类任务中明确的数学内容占比,以及这些数学概念与操作是否与 PCT 概念及操作相结合。在根据上述三点(1-3)完成对任务的分析后,我们将进一步讨论任务特征带来的启示,以及整合数学与 PCT 内容对学生 AI 学习的潜在协同作用。
5 Analysis for Discussion
5 讨论性分析
We organise our analysis in three separate parts to open up the discussion around PCT. First, we investigate what PCT and mathematical content the resources either explicitly state to address or which can be inferred from their description. This step provides an overview of the different opportunities of combining PCT and mathematics in the context of rock-paper-scissors examples. Secondly, we discuss the relation between PCT and mathematics in the resources to consider the level of specificity and explicitness of the relation between PCT and mathematics [20]. Thirdly, we elaborate on the nature of these connections building on the above explicit relations [7]. The aim of our analysis is not to go into depth about the activities but to raise up complexities that need to be addressed to better address how AI and PCT need to be developed for education.
为展开围绕 PCT 的讨论,我们将分析分为三个独立部分。第一部分,明确各资源明确声称或可从描述中推断出的 PCT 与数学内容,概述在 “剪刀 - 石头 - 布” 案例场景下,数学与 PCT 结合的不同可能性。第二部分,结合米斯费尔特等人 [20] 的框架,探讨资源中数学与 PCT 的关系,分析二者关联的特定性与明确性程度。第三部分,基于布拉廷与基尔哈姆 [7] 的研究,深入阐述这些关联的本质。本分析的目的并非深入探讨具体活动细节,而是揭示在教育领域推进 AI 与 PCT 发展过程中需解决的复杂问题。
5.1 Content
5.1 内容分析
5.1.1 PCT Content
5.1.1 PCT 内容
Although all the resources take a starting point in rock-paper-scissors to educate students in PCT, they adopt different approaches to the programming environments, programming languages, resources and computer science sub-fields included.
尽管所有资源均以 “剪刀 - 石头 - 布” 游戏为切入点开展 PCT 教学,但在编程环境、编程语言、所用资源及涉及的计算机科学分支领域方面,采用了不同的方法。
Tasks 1 uses text-based programming and introduces students to flowcharts as models for their algorithms. In the task, students are encouraged to build their own flowchart to represent how and when data are used to improve an algorithm for the AI player in the game. The task however deals rather superficially with PCT concepts and practices. Programming languages, and types of loops are not specified in the task but a palette is offered, and the notions of algorithms and simulations are discussed. Google Teachable Machine and Quickdraw are introduced only to set the scene. Later on, a model for possible uses of data to improve the AI-player’s algorithm is given as a flowchart. Task 4 includes Python, but the vast majority of code has already been written for students to use. They are offered to make changes if they want to. Students can both change code and the graphical interface. In that respect, it is possible to functionally solve the task without programming at all.
任务 1 采用文本式编程,并向学生介绍流程图作为算法模型。任务鼓励学生自主绘制流程图,以展示数据如何及何时被用于改进游戏中 AI 玩家的算法。然而,该任务对 PCT 概念与实践的探讨较为表面:未明确指定编程语言及循环类型,仅提供了选择范围,同时对算法与模拟的概念进行了讨论;谷歌可教机器(Google Teachable Machine)与快速绘画工具(Quickdraw)仅作为背景知识介绍。后续以流程图形式给出了一个模型,说明如何利用数据改进 AI 玩家的算法。任务 4 涉及 Python 语言,但绝大部分代码已预编写完成,供学生直接使用(学生可根据意愿修改代码与图形界面)。从这个角度来看,学生无需进行任何编程操作,即可从功能上完成该任务。
Task 2 is based on Scratch, where students are to use the accelerometer sensor in Micro:Bit. Students need to program the Micro:Bit to randomly choose 1 among three variables (representing rock, paper or scissors) when microcontroller board is shaken. The task also encourages students to program the LED light bulbs to turn on to represent the three different variables. This task thus engages students in the block programming, but does not address AI as such.
任务 2 基于 Scratch 平台开发,要求学生使用微比特(Micro:Bit)开发板的加速度传感器。当微控制器板被摇晃时,学生需编写程序让 Micro:Bit 从代表 “剪刀”“石头”“布” 的 3 个变量中随机选择 1 个;同时,任务鼓励学生编程控制 LED 灯亮灭,以表示这 3 个不同变量。该任务让学生参与积木式编程,但并未涉及 AI 相关内容。
Task 3 is designed for Scratch as well, and it makes use of a machine-learning environment specifically designed for the program (similar to Google’s Teachable Machine). Students are first asked to train the machine using hand gestures through their webcams. The task gives students step-by-step guidance. Along the way, the task explicates students’ actions in programming terms. Pauses of the like are given to reflect on other explicit concepts, namely supervised learning, machine learning model, and image recognition. As for programming the game, students are given a working template to import the machine learning model.
任务 3 同样基于 Scratch 平台,且使用了一个专为该程序设计的机器学习环境(类似谷歌可教机器)。首先,学生需通过摄像头拍摄手势,以此训练机器学习模型;任务提供了分步指导,并以编程术语明确解释学生的操作步骤,同时设置类似停顿的环节,引导学生思考监督学习、机器学习模型和图像识别等明确概念。在游戏编程环节,学生可获得一个可用模板,用于导入机器学习模型。
Tasks 4 uses the Google Teachable Machine for image recognition and Raspberry Pi. In this task, students need to train Google Teachable Machine to recognise hands shaped as rock, papers and scissors by uploading a collection of hand gesture pictures taken by the webcam. Students are then asked to export the AI model developed in Google Teachable Machine as Python code, which is imported in Raspberry Pi. Similar to task 1, students can solve this task without writing or interacting with code as such.
任务 4 采用谷歌可教机器进行图像识别,并结合树莓派(Raspberry Pi)开发板。学生需通过摄像头拍摄一系列 “剪刀”“石头”“布” 的手势图片,上传至谷歌可教机器以训练模型;随后,将在谷歌可教机器中开发的 AI 模型导出为 Python 代码,并导入到 Raspberry Pi 中。与任务 1 类似,学生无需编写或直接操作代码即可完成该任务。
In spite that the four activities are based on the same playful activity, they thus integrate highly different PCT content on tools. As we describe below, these approaches open for the relevance of different mathematical content.
由此可见,尽管四个活动均基于同一趣味性游戏,但在工具层面整合的 PCT 内容差异显著。如下文所述,这些不同的方法也对应着不同的相关数学内容。
5.1.2 Mathematical Content
5.1.2 数学内容
Although none of the tasks included in this paper claim to be related to mathematics, they all address rock-paper-scissors from a perspective where knowledge, concepts and operations from the domain of mathematics are pertinent. For all the tasks, the relevant mathematical content is primarily related to the subject area of probability and statistics.
尽管本文所分析的任务均未声称与数学相关,但它们在探讨 “剪刀 - 石头 - 布” 游戏时,均涉及数学领域的知识、概念与操作。所有任务的相关数学内容主要集中在概率与统计领域。
Task 1 focuses on estimating frequentist probabilities from collected data after playing the rock-paper-scissors game repeatedly [6]. Its final part takes a Bayesian approach, recalculating probabilities as the game goes.
任务 1 聚焦于通过反复进行 “剪刀 - 石头 - 布” 游戏收集数据,并基于这些数据估算频率主义概率 [6];任务的最后一部分采用贝叶斯方法,随着游戏的进行重新计算概率。
Task 2 involves the simulation of random realisations of a uniformly distributed discrete random variable, namely, equiprobable outcomes rock, papers or scissors.
任务 2 涉及对均匀分布离散随机变量的随机实现进行模拟,即 “剪刀”“石头”“布” 三种结果的等概率模拟。
Task 3 includes ideas of sampling and bias in data while training the machine-learning model. It slightly addresses relations to angles and proportionality. Students are to consider the angles and relative size of pictures taken of their hands in the shape of rock-paper-scissors to inform an image-recognition algorithm.
任务 3 在训练机器学习模型的过程中,涉及数据抽样与偏差的概念,同时略微提及角度与比例的相关知识。学生需考虑 “剪刀 - 石头 - 布” 手势图片的拍摄角度与相对尺寸,为图像识别算法提供信息支持。
In task 4, however, there are no clear mathematical concepts invoked since the game is programmed so that the computer always wins. This task does not grasp the inherent uncertainty of outcomes in the game to build a strategy.
然而,任务 4 中未涉及明确的数学概念 —— 该游戏的程序设计使计算机始终获胜,并未利用游戏结果的内在不确定性来制定策略。
Overall, it is worth mentioning here that these mathematical ideas are not explored nor scaffolded explicitly in the tasks. Of course, the tasks are not purposefully designed for mathematics learning nor for a particular age group. As such, the progression and accumulation of mathematical knowledge is not addressed.
总体而言,值得注意的是,这些数学理念在任务中既未被明确探讨,也未得到支架式教学支持。当然,这些任务并非专为数学学习或特定年龄段设计,因此也未涉及数学知识的递进与积累。
5.2 Specificity and Explicitness of Relations Between PCT and Mathematics
5.2 数学与 PCT 关系的特定性与明确性
Despite the mathematical content described above being of high relevance to understand the underlying PCT mechanism included in the tasks, the concepts remain implicit in all of them. For most of them, we can infer the mathematics involved from the tasks’ descriptions and mechanisms.
尽管上述数学内容对理解任务中潜在的 PCT 机制具有重要意义,但在所有任务中,这些数学概念均处于隐含状态。对于大多数任务,我们需通过任务描述与机制推断其所涉及的数学内容。
Occasionally, the lessons give students advice based on mathematical concepts in how to build a supervised machine learning algorithm to recognise images. That is, for example, the case in task 3. Here, students are asked to make their hands in the shape of rock, paper and scissors, take photos of these shapes with the webcam, and use them as input to train the machine learning model. The student worksheet for this task includes a “Tips” section at the bottom. One of them emphasises the importance of providing the model with an even number of pictures for each move:
偶尔,任务会基于数学概念为学生提供建议,指导他们如何构建用于图像识别的监督式机器学习算法。任务 3 便是如此:学生需做出 “剪刀”“石头”“布” 的手势,通过摄像头拍摄这些手势图片,并将其作为输入数据训练机器学习模型。该任务的学生工作表底部设有 “提示” 部分,其中一条提示强调了为每种手势提供数量相近图片的重要性:
Try and come up with roughly the same number of examples for each shape. If you have a lot of examples for one type, and not the other, the computer might learn that type is more likely, so you’ll affect the way that it learns to recognise photos. (Task 3, p. 8)
“尝试为每种手势提供数量大致相同的示例图片。如果某一种手势的示例图片远多于其他手势,计算机可能会认为该手势出现的概率更高,进而影响其图像识别的学习方式。”(任务 3,第 8 页)
This tip addresses what is referred to as over and undersampling in the field of statistics, which are related to statistical bias and misrepresentation in data [34]. Similarly, the “tip” right after advises students to “come up with lots of different types of examples” (Task 3—Worksheet, p. 8). This warning, too, is related to mathematics and could be connected to modelling as a mathematical competency. Mathematical modelling involves the ability to develop and critically analyse mathematical models, “whilst taking purposes, data, facts, features and properties of the extra-mathematical domain being modelled into account (…)” [22, p. 16]. This mathematical competency is relevant here since students are instructed in taking features and properties of the rock-paper-scissor moves (size, angle and other variations) into account while modelling these into statistical input to train a machine learning model.
该提示涉及统计学领域的 “过采样” 与 “欠采样” 概念,而这两个概念与数据中的统计偏差和表征偏差相关 [34]。此外,紧随其后的另一条提示建议学生 “提供多种不同类型的示例图片”(任务 3 工作表,第 8 页)。这条提示同样与数学相关,且可关联到作为数学素养的 “建模能力”。数学建模能力指 “在考虑建模对象所属的非数学领域的目的、数据、事实、特征与属性的前提下,开发并批判性分析数学模型的能力”[22, 第 16 页]。这一数学素养在此处具有重要意义,因为学生需考虑 “剪刀 - 石头 - 布” 手势的特征与属性(尺寸、角度及其他变化),并将这些特征建模为统计输入数据,以训练机器学习模型。
The implications of over and undersampling and not providing an adequate variety of representations for the phenomenon the machine learning model is to recognise are somewhat limited in the context of this task. In the worst case, it leads to a bad computationally driven rock-paper-scissor player. Nonetheless, bias in AI algorithms can have much more severe implications and has the subject of intense public debate in recent times [33]. In that respect, this task shows that rock-paper-scissors, as a context for PCT learning, has strong potential in setting a scene where students can learn to build, understand and critically relate to AI from tangible experiences from a familiar situation. In its current form, the task however mainly focuses on training students in creating machine learning models and, to a lesser degree, understanding and critically relating to them. Introducing the above-mentioned mathematical concepts could eventually support students in understanding the mechanisms at play from a more principal and context-independent perspective, allowing them to explore and discuss their implications in other settings where they encounter similarly constructed models. We will return to this point in Sect. 6.
在本任务场景中,过采样、欠采样以及未能为机器学习模型需识别的现象提供足够多样的表征,所产生的影响在一定程度上是有限的 —— 最坏的情况不过是导致计算驱动的 “剪刀 - 石头 - 布” 游戏玩家表现不佳。然而,AI 算法中的偏差可能会产生更为严重的影响,且近年来已成为公众激烈讨论的话题 [33]。从这一角度来看,“剪刀 - 石头 - 布” 作为 PCT 学习场景,具有强大的潜力:它能为学生构建一个熟悉的场景,让学生通过切实体验学习构建、理解 AI,并以批判性视角看待 AI。但在当前形式下,该任务主要聚焦于训练学生创建机器学习模型,而在理解和批判性看待这些模型方面的关注较少。引入上述数学概念,最终可帮助学生从更基本、更独立于场景的视角理解其中的机制,使他们能够在遇到类似构建的模型时,探索并讨论这些机制在其他场景中的影响(这一点将在第 6 部分进一步探讨)。
As none of the resources claim to include or relate to mathematics, it is, on the one hand, natural that these mathematical concepts are not an explicit part of the tasks. On the other hand, these ideas lay an important foundation for students to understand what they have built. Since all the tasks are developed for educational purposes, it is, in some respect, surprising that such obvious overlaps with mathematics as a school subject are not overtly addressed.
一方面,由于所有资源均未声称包含数学内容或与数学相关,因此这些数学概念未成为任务的明确组成部分,这一点合乎情理;另一方面,这些数学理念是学生理解自身所构建内容的重要基础。鉴于所有任务均为教育目的而开发,它们与数学这一学校学科存在如此明显的重叠,却未被明确提及,这在某种程度上令人惊讶。
5.3 Nature of Relations Between PCT and Mathematics
5.3 数学与 PCT 关系的本质
As described above, the mathematical content present in the resources is implicit. None of them thus introduce nor elaborate on mathematical concepts and relation to or relevance to carry out the programs. Yet, the tasks involve what could be termed as mathematical actions, in the sense that students, for example, provide data input for a machine learning model and supervise it (task 3) and collect and simulate data (task 1). These CT data practices [35] have a parallel in statistics, which can be portrayed as the science of learning from data [21]. While these and similar mathematical operations appear recurrently in most of the tasks, they are never labelled as such. Neither are the mathematical concepts (e.g., bias, over and undersampling, misrepresentation) explained. The resources thus exclusively include mathematical actions (and not concepts), which in addition remain implicit, unlabelled and unexplained.
如前文所述,资源中的数学内容处于隐含状态:所有资源均未介绍或详细阐述数学概念,也未说明这些概念与程序执行的关系或相关性。然而,这些任务涉及可被称为 “数学操作” 的活动,例如学生为机器学习模型提供数据输入并监督模型训练(任务 3)、收集并模拟数据(任务 1)等。这些计算思维数据实践 [35] 与统计学存在对应关系 —— 统计学可被描述为 “从数据中学习的科学”[21]。尽管这些及类似的数学操作在大多数任务中反复出现,但它们从未被如此标注,相关的数学概念(如偏差、过采样、欠采样、表征偏差)也未得到解释。因此,这些资源仅包含数学操作(而非数学概念),且这些操作均处于隐含、未标注且未解释的状态。
Among the few tasks included in this paper, there are variations in whether they explicitly introduce and explain PCT concepts or primarily engage students in PCT actions. A common characteristic of tasks 2, 3 and 4 is that the students’ PCT actions are scaffolded by predefined, step-by-step instructions with little room for experimentation.
在本文分析的少数任务中,部分任务明确介绍并解释 PCT 概念,而另一些任务则主要让学生参与 PCT 操作,二者存在差异。任务 2、3、4 的一个共同特征是:学生的 PCT 操作通过预设的分步指导获得支架支持,几乎没有实验空间。
Tasks 2 and 4 are cases that predominantly include PCT operations and implicit mathematical operations. In task 2, students ought to use the accelerometer in a Micro:Bit device to build a random generator of rock-paper-scissors moves. This task describes 11 steps for students to follow to achieve this goal. During these steps, the resource mentions PCT concepts such as variables, else and else-if conditionals and code, but these concepts are merely mentioned and not described in any level of detail to the students. Similarly, task 4 engages students in training Google Teachable Machine to recognise images to distinguish between rock, paper, and scissors to ultimately build a computer-driven, cheating rock-paper-scissors player. During the exercise, the resource introduces PCT concepts such as trained and untrained models, but these concepts are not explained to students, and the predominant focus is on engaging students in building the end-product. While tasks 2 and 4 predominantly address PCT actions, tasks 1 and 3 integrate both PCT concepts and actions. Task 1, for example, explicitly explains to students that “by breaking down a task into several steps, it is possible to have a computer to follow it. Most of the programs we use in our daily lives work like that, for example, writing an e-mail, make a Facebook post or check the balance in our bank accounts (…)” (Task 1, p. 7). Similarly, task 3 engages students in following a step-by-step procedural guide to developing a machine learning algorithm able to recognise and distinguish rock, paper, and scissors from the shape of hands. Towards the end of the task, the resource states the following:
任务 2 和任务 4 主要包含 PCT 操作与隐含的数学操作。在任务 2 中,学生需使用 Micro:Bit 设备的加速度传感器构建 “剪刀 - 石头 - 布” 游戏的随机结果生成器。该任务为学生提供了 11 个分步操作指南以实现这一目标。在这些步骤中,资源提及了变量、else 和 else-if 条件语句以及代码等 PCT 概念,但仅提及这些概念,未向学生进行任何详细解释。类似地,任务 4 让学生训练谷歌可教机器进行图像识别,以区分 “剪刀”“石头”“布”,最终构建一个由计算机驱动的 “作弊” 型 “剪刀 - 石头 - 布” 游戏玩家。在该任务中,资源引入了已训练模型和未训练模型等 PCT 概念,但未向学生解释这些概念,主要关注点在于让学生参与最终产品的构建。任务 2 和任务 4 以 PCT 操作为主,而任务 1 和任务 3 则同时整合了 PCT 概念与操作。例如,任务 1 明确向学生解释:“通过将一项任务分解为多个步骤,计算机就可以按照这些步骤执行。我们日常生活中使用的大多数程序都是这样工作的,例如写电子邮件、发布 Facebook 动态或查询银行账户余额等(……)”(任务 1,第 7 页)。同样,任务 3 让学生按照分步操作指南开发机器学习算法,该算法能够通过手势形状识别并区分 “剪刀”“石头”“布”。在任务接近尾声时,资源做出如下说明:
You’ve started to train a computer to recognise pictures as being rock, paper or scissors. You are doing it by collecting example photos. These examples are being used to train a machine learning “model”. This is called “supervised learning” because of the way you are supervising the computer’s training. The computer will learn from patterns in the colours and shapes from each of the photos you’ve given it. These will be used to be able to recognise new photos. (Task 3, p. 7)
“你已经开始训练计算机识别代表‘剪刀’‘石头’‘布’的图片。你通过收集示例图片来完成这一训练过程,这些示例图片被用于训练机器学习‘模型’。这一过程被称为‘监督学习’,因为你在监督计算机的训练过程。计算机将从你提供的每张图片的颜色和形状模式中学习,这些模式将被用于识别新的图片。”(任务 3,第 7 页)
Both examples integrate PCT actions and concepts with the mathematical actions, which remain implicit.
上述两个示例均将 PCT 操作与概念和数学操作相结合,而其中的数学操作仍处于隐含状态。
Mathematical actions are present in all of the tasks. Moreover, we see examples that these actions are integrated with both PCT actions and PCT concepts. However, these mathematical actions remain implicit and unexplained. In what follows, we discuss the implications of this feature of the tasks. We argue for the potential of explicitly including mathematical concepts from both the perspective of PCT and mathematics education.
所有任务中均存在数学操作,而且我们能看到数学操作与 PCT 操作、PCT 概念相结合的示例。然而,这些数学操作仍处于隐含状态且未得到解释。在下文内容中,我们将讨论任务这一特征所带来的启示,并从 PCT 教育和数学教育两个视角出发,论证明确纳入数学概念的潜力。
6 Discussion
6 讨论
As stated in the introduction, AI has become a part of many aspects of everyday interactions and increasingly requires citizens to have a basic understanding of its underlying processes. We claim that grasping PCT concepts and practices is a necessary condition for it. The ability to develop machine learning models are, without a doubt, an essential step towards achieving this goal. Such skills need to be supplemented by developing students’ understanding of the underlying mechanisms and potential implications of such models if we are to educate critical and not only productive citizens.
如引言所述,AI 已融入日常互动的诸多方面,且对公民提出了更高要求,即需对其底层运行过程具备基础认知。我们认为,掌握 PCT 概念与实践是实现这一认知的必要条件。毫无疑问,开发机器学习模型的能力是实现这一目标的关键一步。但若要培养具有批判性思维(而非仅具备操作能力)的公民,还需进一步帮助学生理解这些模型的底层机制及潜在影响,以补充相关技能。
Only focusing on PCT actions, omitting the discussion on essential concepts, is associated with a risk of blackboxing critical components of AI. Blackboxing is a widely researched phenomenon in mathematics education research due to the pitfalls of emptying out potential learning of mathematics by replacing manual calculations with handy digital technologies [17]. On the other hand, simply not introducing students to powerful tools and their opportunities is equally problematic. Research in this field often suggests balancing these interests by firstly introducing the concepts and applying them through manual processes and subsequently using digital tools to do the same operations [8]. To achieve this balance, or “grayboxing” process [9], there is a need for finding ways to unpack and discuss how such models work, why they sometimes lead to undesired outcomes, and how they can be improved.
若仅关注 PCT 操作,而忽略对核心概念的探讨,可能会导致 AI 关键组件陷入 “黑箱化” 风险。在数学教育研究中,“黑箱化” 是一个被广泛研究的现象 —— 由于便捷的数字技术取代了手动计算,数学潜在的学习价值被抽空,这一问题已成为研究痛点 [17]。另一方面,若完全不向学生介绍强大的工具及其应用机遇,同样存在问题。该领域的研究通常建议平衡这两方面需求:首先介绍概念并通过手动流程应用概念,随后再使用数字工具执行相同操作 [8]。为实现这种平衡(即 “灰箱化” 过程 [9]),需要找到方法拆解并探讨这些模型的工作原理、有时产生不良结果的原因,以及改进方式。
One of our fundamental assumptions in this paper is that the domain of mathematics provides one among other relevant starting points to do so. By mathematics, we mean both its disciplinary nature, including concepts and enactments thereof, as well as mathematics as a widespread compulsory school subject.
本文的核心假设之一是,数学领域是实现上述目标的相关起点之一。此处的 “数学” 既指其学科本质(包括数学概念及概念的应用),也指作为广泛开设的义务教育学科的 “数学”。
As shown in the analysis, the essential underlying mechanisms of several PCT actions are based on mathematical concepts, especially from the sub-area of statistics. While the tasks included in this paper occasionally introduce and explain PCT actions and concepts, they exclusively do so in the realm of computer science. As noted by [35], there are evident overlaps and synergies between PCT and mathematics that are highly relevant to draw on in educational contexts. In the tasks, explicitly including the now implicit mathematical concepts and actions could lever discussions about relevant matters. Students may be asked what the implications of under and oversampling for the functionality of a machine learning model are. How do we adequately model the moves in a rock-paper-scissors game? What variations do we need to account for in terms of how these moves are represented? As already stated, using mathematical concepts to unpack these PCT mechanisms could function as an anchoring point to discuss more fundamental principles of AI and machine learning in broader contexts. By doing so, we can educate students not only with the skills to build an AI model. We may prepare them with the knowledge needed to assess and evaluate underlying assumptions and outcomes of AI models in general and critically relate to AI in their everyday lives.
如分析所示,多项 PCT 操作的核心底层机制基于数学概念,尤其是统计学分支的概念。尽管本文分析的任务偶尔会介绍并解释 PCT 操作与概念,但这些介绍和解释完全局限于计算机科学领域。正如文献 [35] 所指出的,PCT 与数学之间存在明显的重叠领域和协同作用,这些在教育场景中具有极高的借鉴价值。在这些任务中,若将当前处于隐含状态的数学概念与操作明确纳入,可推动对相关问题的讨论。例如,可引导学生思考:欠采样与过采样对机器学习模型的功能有何影响?如何充分建模 “剪刀 - 石头 - 布” 游戏中的手势?在表征这些手势时,需考虑哪些变化因素?如前所述,利用数学概念拆解这些 PCT 机制,可作为在更广泛场景中讨论 AI 与机器学习基本原理的锚点。通过这种方式,我们不仅能培养学生构建 AI 模型的技能,还能让他们掌握评估 AI 模型底层假设与结果所需的知识,进而在日常生活中以批判性视角看待 AI。
The point above illustrates one of the limitations of our study, namely the constrained contextualisation of tasks into a familiar yet socially inconsequential game. Rock-paper-scissors does not directly relate to social or ethical aspects of AI. However, there are studies suggesting that students’ mathematical reflections about games in fact can lead to more general ethical considerations that transcend the context of the game from which these reflections are derived. Nobre [23] highlights how discussing a game of lottery helped students making sense of probabilistic ideas. However, framing the activity in the popular Brazilian “Animal Lottery” lead students to situate the game in its profit orientation and corruption motivation. Another case is that of a 7th-grade student expanding her learning from a dice game to a broader reflection on games of chance. The teacher engages in a dialogue comparing her success to that of a casino player, and she realises that her classmates “are enthusiastic about me winning and believe they can win, but in reality, they are all losing” [12, p. 219]. Overall, a learning environment is more comprehensive than a given task; the teacher’s framing of the activity plays a significant role.
上述观点也揭示了本研究的局限性之一:任务场景被限定在 “剪刀 - 石头 - 布” 这一熟悉但无重大社会意义的游戏中,该游戏与 AI 的社会或伦理层面无直接关联。然而,有研究表明,学生对游戏的数学思考实际上可引发更具普遍性的伦理思考,且这种思考会超越游戏本身的场景。诺布雷(Nobre)[23] 的研究指出,通过讨论彩票游戏,学生能更好地理解概率概念;而当将活动场景设定为巴西流行的 “动物彩票” 时,学生则会从彩票的盈利导向和腐败动机角度审视该游戏。另一个案例中,一名 7 年级学生将从骰子游戏中学到的知识拓展到对概率游戏的广泛思考:教师通过对话将该学生的 “获胜” 与赌场玩家的 “获胜” 进行对比,学生最终意识到 “同学们对我获胜感到兴奋,还认为自己也能赢,但实际上他们都在输”[12, 第 219 页]。总体而言,学习环境的内涵远超出单一任务本身,教师对活动的场景构建起着关键作用。
A key discussion point in curriculum policy revisions concerning PCT has been whether this topic should be a subject in its own right or integrated in existing topics. Several countries have already included PCT as part of their mathematics curriculum, and the tasks present opportunities for synergy with mathematics as a school subject. The PCT tasks give a familiar and playful context to explore curricular mathematical content. As suggested be previous literature [11], playful activities allow students to grasp basic AI concepts from an early age. While previous research have argued for the usefulness of programming (algorithms in particular) to better understand mathematical concepts [3], our paper shows that mathematics can also aid students in understanding fundamental principles and potential implications of AI. While our discussion points above primarily argue for the value of explicitly connecting PCT and mathematics for the sake of PCT, there are values of doing so from the perspective of mathematics. As noted by Pérez [29], mathematics is predominantly an inwards-oriented and abstract activity dealing with concepts in their own right, making it difficult to access and relate to for many students. He argues that there is a value in combining mathematics and computer science in that the latter provides a significant context that clearly shows practical applications of PCT actions [29]. From there, the mathematics classroom environment can function as a fertile ground for reflectively approaching the tasks beyond their current instruction-following form. However, thinking about how to support teachers to embrace related contexts beyond PCT and consider looking beyond these domains for inspiration is a non-trivial task that calls for further educational implementation research. For example, the resources analysed in this paper may stimulate bits and pieces of what is likely to be part of a curriculum, but is not based on well thought-through and explicit ideas of progression. Weintrop and colleagues [35] have made an important contribution of providing a taxonomy for CT in the science and mathematics classroom, but no equivalent has been developed from the perspective of mathematics. Developing such a contribution is far beyond the scope of this paper. We however believe that our analyses have indicated strong potentials in stronger and more explicit integration of mathematics to support an increased AI awareness among students. A natural next step towards formally addressing this in curriculum revisions could be to develop a taxonomy of the mathematical content of relevance for CT/AI.
在 PCT 相关课程政策修订中,核心讨论议题之一是 PCT 应作为独立学科还是融入现有学科。已有多个国家将 PCT 纳入数学课程大纲,而本文分析的任务则为 PCT 与数学学科的协同提供了机遇:PCT 任务为探索课程中的数学内容提供了熟悉且有趣的场景。如以往文献 [11] 所指出的,趣味性活动能帮助学生从早期阶段掌握 AI 基础概念。以往研究认为编程(尤其是算法)有助于更好地理解数学概念 [3],而本文则表明,数学同样能帮助学生理解 AI 的基本原理及潜在影响。尽管上述讨论主要从 PCT 教育视角论证明确关联 PCT 与数学的价值,但从数学教育视角来看,这种关联同样具有意义。正如佩雷斯(Pérez)[29] 所指出的,数学在很大程度上是一种内向型、抽象的活动,主要围绕概念本身展开,这使得许多学生难以理解和关联数学知识。他认为,将数学与计算机科学结合具有重要价值,因为计算机科学能提供具体场景,清晰展现 PCT 操作的实际应用 [29]。由此,数学课堂可成为超越 “按指令完成任务” 模式、以反思性方式开展学习的沃土。然而,如何支持教师接纳 PCT 之外的相关场景,并从这些领域之外寻找灵感,仍是一项复杂任务,需要进一步的教育实施研究。例如,本文分析的资源可能零散地体现了课程潜在内容,但并未基于周密且明确的知识递进理念。魏因特罗普等人 [35] 已为科学与数学课堂中的 CT 提供了分类框架,但从数学视角出发的同类框架尚未出现。构建此类框架超出了本文的研究范围,但我们认为,分析表明:更强、更明确的数学整合具有巨大潜力,可帮助学生提高 AI 认知。在课程修订中正式解决这一问题的合理下一步,可能是构建与 CT/AI 相关的数学内容分类框架。
The implications of AI however naturally exceeds what is meaningful to address within mathematics. Therefore, we find it increasingly important that subjects from various domains address issues of AI and thereby contribute by aiming to learn students about the technology that surrounds us and implications on our everyday life from the perspectives of a variety of subjects.
然而,AI 的影响范围自然超出了数学学科所能涵盖的合理范畴。因此,我们认为,各领域学科都应关注 AI 相关问题,这一需求日益迫切 —— 通过多学科视角,帮助学生了解身边的技术及其对日常生活的影响,进而共同推动 AI 教育。
Acknowledgements
致谢
The research is funded by Novo Nordisk Foundation Grant NNF19OC0058651.
本研究由诺和诺德基金会(Novo Nordisk Foundation)资助,资助编号为 NNF19OC0058651。
Declarations
声明
Conflict of interest
利益冲突
The authors declare that they have no conflict of interest.
作者声明不存在利益冲突。
References
参考文献
-
Benton L, Hoyles C, Kalas I, Noss R (2016) Building mathematical knowledge with programming: Insights from the ScratchMaths project. In: Constructionism 2016: Conference Proceedings, pp. 26–33. Suksapattana Foundation, Thung Khru, Thailand. https://discovery.ucl.ac.uk/id/eprint/1475523/
本顿(Benton)L、霍伊尔斯(Hoyles)C、卡拉斯(Kalas)I、诺斯(Noss)R(2016)《通过编程构建数学知识:ScratchMaths 项目的启示》,收录于《建构主义 2016 年会议论文集》,第 26-33 页,泰国通库鲁苏克萨帕塔纳基金会,获取链接:https://discovery.ucl.ac.uk/id/eprint/1475523/ -
Benton L, Hoyles C, Kalas I, Noss R (2017) Bridging primary programming and mathematics: some findings of design research in England. Digit Exp Math Educ 3 (2):115–138. https://doi.org/10.1007/s40751-017-0028-x
本顿(Benton)L、霍伊尔斯(Hoyles)C、卡拉斯(Kalas)I、诺斯(Noss)R(2017)《连接小学编程与数学:英格兰设计研究的部分发现》,《数字实验数学教育》,第 3 卷第 2 期,第 115-138 页,DOI:https://doi.org/10.1007/s40751-017-0028-x -
Benton L, Kalas I, Saunders P, Hoyles C, Noss R (2018) Beyond jam sandwiches and cups of tea: an exploration of primary pupils’ algorithm-evaluation strategies. J Comput Assist Learn 34 (5):590–601
本顿(Benton)L、卡拉斯(Kalas)I、桑德斯(Saunders)P、霍伊尔斯(Hoyles)C、诺斯(Noss)R(2018)《超越果酱三明治与茶杯:小学生算法评估策略探究》,《计算机辅助学习杂志》,第 34 卷第 5 期,第 590-601 页 -
Bocconi S, Chioccariello A, Dettori G, Ferrari A, Engelhardt K, Kampylis P, Punie Y (2016) Developing computational thinking in compulsory education—implications for policy and practice. Tech. Rep. EUR 28295 EN, Joint Research Centre (JRC). https://doi.org/10.2791/792158
博科尼(Bocconi)S、基奥卡里埃洛(Chioccariello)A、德托里(Dettori)G、费拉利(Ferrari)A、恩格哈特(Engelhardt)K、坎皮利斯(Kampylis)P、普尼(Punie)Y(2016)《义务教育阶段计算思维的培养 —— 对政策与实践的启示》,技术报告,编号 EUR 28295 EN,欧盟联合研究中心(JRC),DOI:https://doi.org/10.2791/792158 -
Bocconi S, Chioccariello A, Ear J (2018) The Nordic approach to introducing computational thinking and programming in compulsory education. Report prepared for the Nordic@BETT2018 Steering Group. https://doi.org/10.17471/54007
博科尼(Bocconi)S、基奥卡里埃洛(Chioccariello)A、厄尔(Ear)J(2018)《北欧国家在义务教育阶段引入计算思维与编程的方法》,为北欧 @BETT2018 指导小组撰写的报告,DOI:https://doi.org/10.17471/54007 -
Borovcnik M, Kapadia R (2014) A historical and philosophical perspective on probability. In: Chernoff EJ, Sriraman B (eds) Probabilistic thinking: presenting plural perspectives. Springer, Dordrecht, pp 7–34. https://doi.org/10.1007/978-94-007-7155-0_2
博罗夫奇尼克(Borovcnik)M、卡帕迪亚(Kapadia)R(2014)《概率的历史与哲学视角》,收录于切尔诺夫(Chernoff)EJ、斯里拉曼(Sriraman)B 主编的《概率思维:多元视角呈现》,荷兰多德雷赫特施普林格出版社,第 7-34 页,DOI:https://doi.org/10.1007/978-94-007-7155-0_2 -
Bråting K, Kilhamn C (2021) The integration of programming in Swedish school mathematics: investigating elementary mathematics textbooks. Scand J Educ Res pp. 1–16. https://doi.org/10.1080/00313831.2021.1897879 (Advance online publication)
布拉廷(Bråting)K、基尔哈姆(Kilhamn)C(2021)《编程在瑞典学校数学中的整合:小学数学教材调查》,《斯堪的纳维亚教育研究杂志》,第 1-16 页,DOI:https://doi.org/10.1080/00313831.2021.1897879(在线优先出版) -
Buchberger B (1990) Should students learn integration rules? ACM SIGSAM Bull 24 (1):10–17. https://doi.org/10.1145/382276.1095228
布赫伯格(Buchberger)B(1990)《学生应学习积分法则吗?》,《ACM SIGSAM 通讯》,第 24 卷第 1 期,第 10-17 页,DOI:https://doi.org/10.1145/382276.1095228 -
Cedillo T, Kieran C (2003) Initiating students into algebra with symbol-manipulating calculators. Computer algebra systems in secondary school mathematics education pp. 219–239
塞迪略(Cedillo)T、基兰(Kieran)C(2003)《用符号操作计算器引导学生入门代数》,收录于《中学数学教育中的计算机代数系统》,第 219-239 页 -
Clements DH, Sarama J (1997) Research on logo: a decade of progress. Comput Sch 14 (1–2):9–46
克莱门茨(Clements)DH、萨拉马(Sarama)J(1997)《Logo 语言研究:十年进展》,《计算机与学校》,第 14 卷第 1-2 期,第 9-46 页 -
Druga S, Williams R, Park HW, Breazeal C (2018) How smart are the smart toys? Children and parents’ agent interaction and intelligence attribution. In: Proceedings of the 17th ACM Conference on Interaction Design and Children, pp 231–240
德鲁加(Druga)S、威廉姆斯(Williams)R、帕克(Park)HW、布雷泽尔(Breazeal)C(2018)《智能玩具有多智能?儿童与家长的智能体互动及智能归因》,收录于《第 17 届 ACM 交互设计与儿童会议论文集》,第 231-240 页 -
Elicer R (2020) On the teaching and learning of probability and statistics in the perspective of Critical Mathematics Education. PhD thesis, Roskilde University, Roskilde, Denmark. http://thiele.ruc.dk/imfufatekster/pdf/513.pdf
埃利塞尔(Elicer)R(2020)《批判数学教育视角下概率与统计的教与学》,博士学位论文,丹麦罗斯基勒大学,获取链接:http://thiele.ruc.dk/imfufatekster/pdf/513.pdf -
Elicer R, Tamborg AL (2022) Nature of the relations between programming and computational thinking and mathematics in Danish teaching resources. In: Jankvist UT, Clark-Wilson A, Weigand HG, Elicer R, Thomsen M (eds) Making and strengthening “Connections and Connectivity” for teaching mathematics with technology: proceedings of the 15th international conference on technology in mathematics teaching – ICTMT 15
埃利塞尔(Elicer)R、坦博格(Tamborg)AL(2022)《丹麦教学资源中编程、计算思维与数学的关系本质》,收录于扬克维斯特(Jankvist)UT、克拉克 - 威尔逊(Clark-Wilson)A、魏冈德(Weigand)HG、埃利塞尔(Elicer)R、汤姆森(Thomsen)M 主编的《构建并强化数学技术教学的 “关联与连通性”:第 15 届国际数学技术教学会议(ICTMT 15)论文集》 -
Geraniou E, Jankvist UT (2019) Towards a definition of mathematical digital competency. Educ Stud Math 102 (1):29–45. https://doi.org/10.1007/s10649-019-09893-8
杰拉尼奥(Geraniou)E、扬克维斯特(Jankvist)UT(2019)《迈向数学数字素养的定义》,《数学教育研究》,第 102 卷第 1 期,第 29-45 页,DOI:https://doi.org/10.1007/s10649-019-09893-8 -
Guzdial M, Kay A, Norris C, Soloway E (2019) Computational thinking should just be good thinking. Commun ACM 62 (11):28–30. https://doi.org/10.1145/3363181
古兹迪尔(Guzdial)M、凯(Kay)A、诺里斯(Norris)C、索洛韦(Soloway)E(2019)《计算思维应是优秀的思维方式》,《ACM 通讯》,第 62 卷第 11 期,第 28-30 页,DOI:https://doi.org/10.1145/3363181 -
Hoyles C (2018) Transforming the mathematical practices of learners and teachers through digital technology. Res Math Educ 20 (3):209–228. https://doi.org/10.1080/14794802.2018.1484799
霍伊尔斯(Hoyles)C(2018)《通过数字技术转变学习者与教师的数学实践》,《数学教育研究》,第 20 卷第 3 期,第 209-228 页,DOI:https://doi.org/10.1080/14794802.2018.1484799 -
Jankvist UT, Geraniou E (2021) Whiteboxing the Content of a formal mathematical text in a dynamic geometry environment. Dig Exp Math Educ 7 (2):222–246. https://doi.org/10.1007/s40751-021-00088-6
扬克维斯特(Jankvist)UT、杰拉尼奥(Geraniou)E(2021)《动态几何环境中形式化数学文本内容的 “白箱化
数学思维与编程思维:抽象、逻辑、演化、银弹与永恒
scott.cgi 发布于 2016-08-29 22:21・安徽
数学思维与编程思维均包含抽象与逻辑两大核心要素,二者在概念内涵与实践应用中存在显著差异。本文将从概念层面深入剖析二者的本质区别,系统解读其核心内涵,最终延伸至“银弹”与“永恒”的哲学思考。
一、不同的抽象
(一)数学思维的抽象:剥离具体
数学思维的抽象本质在于剥离具体现实。数学体系与具体现实完全脱离,其人为定义的“概念”与“结构”,核心目标是通过隔离现实以获取抽象性。在此基础上,通过逻辑推理进一步衍生更多抽象结论,最终形成的理论体系均与现实无直接关联。
数学抽象仅要求满足逻辑自洽的结构与关系,其最终目标是构建一个由纯逻辑编织而成的“抽象世界”,该世界的有效性不依赖于现实经验的验证,仅需在自身逻辑框架内保持一致性。
(二)编程思维的抽象:映射具体
编程思维的抽象本质在于映射具体现实。编程的核心功能是模拟现实运作流程与解决实际问题(含精神需求层面的问题),因此编程与现实世界存在极强的关联性。由于现实世界具有高度复杂性,代码必然存在冗余性与不确定性,其映射现实的复杂度会随机产生未预期的变量组合,即“Bug”的不可避免性。
基于此特性,数学结论的“正确”与“错误”具有明确边界,而编程无法保证“绝对正确”与“完美无错”,仅能通过测试验证“当前未发现问题”。当现实情况发生变化时,编程所构建的映射模型需同步调整,导致Bug需持续修复、代码需持续更新。
例如,计算机科学领域经典教材《计算机程序的构造和解释》中,作者哈尔·阿伯尔森(Harold Abelson)明确指出:“每一个计算机程序,都是现实中的或者精神中的某个过程的模型,通过人的头脑孵化出来。”这一表述进一步印证了编程思维的“映射性”本质。
编程的核心在于编程思想,即准确识别事物间的相互关联,以及不同事物交互过程中的相互影响。
(三)两种抽象的对比
数学思维与编程思维的抽象属于不同目的的抽象:数学思维的抽象旨在探索未知的逻辑关系,编程思维的抽象旨在利用已知的逻辑关系。
二者的共通之处在于均需梳理逻辑关系;核心差异体现在对现实世界经验的依赖程度:数学思维对现实经验的要求较低,可脱离现实独立存在并形成闭环逻辑体系;编程思维则需以现实为起点,经抽象处理后回归现实,对现实世界的体验与理解需具备实践性与丰富性。
二、逻辑交叉点
逻辑的本质是事物固有的关系,即通过事物的“结构”所观察到的“关系”。若能理解关系间的相互作用,即可掌握结构的运作规律。
判断逻辑的正确性需回答三个核心问题:为何逻辑应呈现此形态?为何此逻辑为正确?为何彼逻辑为错误?其根本原因在于:逻辑的本质是客观结构所呈现的客观关系——正确的逻辑对应可客观存在的结构关系,错误的逻辑对应无法客观存在的结构关系。
逻辑推理是基于经验、直觉与理性,结合逻辑规律(同一律、矛盾律、排中律、无矛盾性),对结构可能存在的关系进行预测与验证的过程:验证成立则为“有逻辑”,验证不成立则为“无逻辑”。
需注意,从不同角度观察同一结构,可能得到不同的关系(即不同逻辑);从同一角度观察不同结构,也可能得到相同的关系(即相同逻辑)——例如,在演化视角下,不同事物若具备相同底层逻辑,其核心原因即在于此。
数学的研究对象是“结构”与“关系”,而现实世界可抽象为“结构”与“关系”的集合,且是处于动态运行状态的集合。因此,人类在大脑中通过数学探索的结构与关系,必然与现实世界产生交集——这一“交集”正是编程用于解决现实问题的核心工具。
在实践中,现实世界可能存在超出已知数学理论范畴但需紧急解决的编程问题,此时需采用启发式方法(如模拟、近似、穷举、迭代、演化等),计算得出具备实际可行性的有效解。
无论采用何种方法,逻辑关系始终依附于结构存在。在抽象视角下,相同结构必然对应“通用逻辑”——这一“通用逻辑”即为现实世界、数学世界、编程世界的“逻辑交叉点”。
综上,宇宙结构、人脑结构、数学结构、代码结构等各类结构普遍存在,关系亦普遍存在——逻辑是连接并指引所有结构与关系的核心纽带。
三、函数的抽象
函数的定义是“一个量到另一个量的计算过程”,而计算本质是处理关系的演化。因此,函数的构建过程,实质是结构的关系通过逻辑实现模拟映射的过程。
函数的规模具有极大弹性:小至单次映射操作,大至对整个宇宙的建模。从理论层面而言,函数可承载个体的人生轨迹、记忆存储、思维闪念与需求计算。
数学与编程均通过函数实现抽象建模,即函数是连接数学与编程的核心抽象工具。需特别说明的是,编程中的“函数”可不存在输入值或返回值(或二者均无):此时函数的作用并非“输入映射至输出”,而是“上下文中的某个值映射至另一个值”“某个值映射至某界面/某位置/某设备”等。
编程的内核围绕“函数”与“映射”展开:函数对应计算过程,映射对应建模过程,即通过函数实现映射、通过计算实现建模,最终形成“函数计算-映射建模”的完整逻辑链。
从学科属性角度看,编程更接近物理而非数学:二者均以探究现实世界的运作规律为目标。在现实世界中,基于程序的编程发现,正逐渐取代基于方程的数学发现,成为探索世界的重要手段。
四、数学与编程
(一)数学与编程的共通之处
在多个层面,数学与编程存在显著共通性,具体如下表所示:
| 对比维度 | 共通内涵 |
|---|---|
| 实现层面 | 均依赖思想与技巧,思想决定方向,技巧决定落地效果 |
| 语言层面 | 均依赖符号系统,数学语言通过数学符号表达逻辑,编程语言通过代码符号实现逻辑 |
| 变量层面 | 均承载逻辑运行,数学变量是逻辑推理的载体,编程变量是代码执行的载体 |
| 构造层面 | 均实现工具的封装与重用,数学构造(如定理、公式)与编程构造(如类、模块)均可复用 |
| 错误影响层面 | 错误均会摧毁整体构建,数学推理中的错误会导致结论失效,编程中的错误会导致程序崩溃 |
此外,数学与编程的运作过程具有相似性:均需兼顾“方向”与“细节”(即构建结构与使用结构),均需完成对结构内在关系的“探索”与“服从”(即排列组合结构与逻辑推理关系),且二者均能让人在实践中获得“构造结构”的思维乐趣。
(二)数学与编程的核心差异
二者的根本差异在于处理知识的类型不同:
- 数学处理说明式知识,即回答“是什么”的知识,侧重对事物本质与规律的描述;
- 编程处理命令式知识,即回答“怎么做”的知识,侧重对解决问题的步骤与方法的定义。
说明式知识(数学)可用于解决不同问题,每个问题均包含对应的命令式知识(编程),因此数学可作为编程的工具;反之,编程可通过演化计算,以非人类大脑直接推理的方式发现新的数学规律,因此编程也可成为人类探索数学的工具。
综上,“利用自身规则构建自身世界”是数学与编程共有的核心特性。
五、抽象与封装
(一)抽象与封装的定义
- 抽象:以简化形式忽略非核心细节,聚焦事物的本质特征;
- 封装:以简化形式屏蔽内部细节,仅暴露必要的交互接口;
- 抽象封装:通过压缩复杂细节,实现对系统复杂度的有效管理。
(二)抽象封装的核心作用
抽象封装在理论与实践中具有多重关键作用,具体包括:
- 建模现实世界:将复杂现实抽象为可计算、可控制的模型;
- 降低使用难度:用户无需理解内部逻辑即可通过接口使用功能;
- 隔离内部错误:内部错误仅影响封装体内部,不扩散至外部系统;
- 限制变动影响:内部修改仅需保证接口不变,即可避免外部系统调整;
- 隐藏实现细节:保护核心设计与技术,同时降低外部认知负荷;
- 无缝更新升级:可在不影响外部使用的前提下完成内部版本迭代;
- 简化交互过程:通过标准化接口减少系统间的交互复杂度;
- 集中管理控制:对封装体内部的功能与数据进行统一管理;
- 易于功能重用:封装后的模块可在不同场景中直接复用,提升效率。
(三)抽象封装的实践案例
在编程领域,“抽象屏障”是抽象封装的典型应用:它可隔离数据与算法、表示与使用、界面与逻辑、高层操作与底层结构,甚至可隔离不同的设计选择,使多种设计选择在同一程序中共存。
IT领域经典著作《代码大全2》中,作者史蒂夫·迈克康奈尔(Steve McConnell)对抽象的定义进行了权威阐释:“抽象是一种能让你在关注某一概念的同时,可以放心地忽略其中一些细节的能力——在不同的层次处理不同的细节。抽象的主要好处就在于,它使你能忽略无关的细节。抽象可以让你用一种简化的观点,来考虑复杂的概念。”
(四)抽象封装的深层价值
在“表达思想”层面,抽象是一种“化繁为简”的设计方法:它将微观特征以宏观形式呈现,使人可同时实现“从远看近”与“从近看远”——远观把握整体框架,近观掌握局部细节,二者结合形成对事物最精准的认知。
从认知与实践的关系来看:认识过程是从“具体”到“抽象”,控制过程是从“抽象”到“具体”,而连接认识与控制的核心环节正是抽象封装——这是人类理解世界、适应世界的思维根基。
判断抽象设计的有效性存在明确标准:若某设计需用户理解内部实现与底层原理才能使用,则该抽象设计为失败设计。破坏抽象封装的典型表现是:封装体内部的具体细节被外部系统获取并依赖。
抽象性与封装性存在相互支撑关系:抽象性可保证封装性,而抽象封装的实现可阻断或减少系统间的耦合性(即实现解耦)。系统间紧密复杂的耦合性,通常产生于“抽象不本质”与“封装不严密”的场景(此视角可迁移至物理学中的“相互作用”研究)。
抽象性与封装性进一步支撑通用性与复用性:抽象支撑封装、通用支撑复用、抽象通用支撑封装复用;同时,正是由于抽象,系统才具备通用性;正是由于封装,系统才具备复用性。
例如,抽象封装可实现模块化,而模块化是将复杂问题拆解为若干子问题的核心工具——通过模块化,可在同一时间聚焦某一子问题,降低智力层面的复杂度管理难度。
在用户体验层面,抽象封装的意义在于充当“逻辑世界”与“精神世界”的桥梁,帮助人获得“秩序感”。破坏封装性会导致系统复杂性上升,进而增加理解难度(无法清晰识别步骤)、认知负荷(难以梳理步骤逻辑)与心智负担(无法记忆关键步骤),同时降低智力可控制性与智能可管理性。
最后,编程领域存在类似“奥卡姆剃刀”的原则——“除非必要,务增难度”,可将其定义为“抽象剃刀”,即仅在必要时增加抽象层次,避免过度设计导致的复杂度上升。
六、演化与银弹
(一)面向对象编程与演化模型
面向对象编程将“数据”与“行为”打包封装的设计,符合演化模型的核心特征——演化过程可容忍冗余,并利用冗余提升系统的适应性与稳定性。
若将“行为”从对象中剥离并交由“系统”管理,则对象将失去独立演化能力,演化为单纯的数据载体(即系统演化取代对象演化)。这一现象的深层原因在于“数据与结构的相互转化”:在高度独立内聚的场景中(如容器数据结构),面向对象编程的形式仍是最优选择。
部分设计为追求“缓存友好”,将行为拆分为独立的“行为系统”,但此类模型若无法从顶层到底层贯彻统一逻辑,将破坏“层级封装”——程序设计应避免直接依赖硬件特性,否则将形成“程序-硬件”的不必要耦合。
从演化视角看,未来将出现专门的“层级”以屏蔽缓存友好性问题,使程序设计脱离对硬件细节的依赖。
(二)面向对象编程的分形递归特性
面向对象编程具有“分形递归”特性——类似大自然未采用“多继承”机制,面向对象编程的演化也存在终极模型,但该模型的实现需以“不破坏层级封装”为前提,否则无法正确模拟宇宙的演化逻辑。
人脑的神经网络具有“高冗余”与“高内聚”特性:不同大脑间可通过“多样化连接”交换数据与信息,而缓存友好性问题通过“数据与结构一体化”的神经模型解决。基于这一模型,可构建终极的“通用程序模型”。
需注意,人脑的算力存在局限性(如心算能力较弱),且该算力属于“流体智力”,会随年龄增长而下降。但人脑的优势在于“动态性支撑的通用智能”——而动态性的实现依赖冗余性,即通过冗余的神经连接与数据存储,保证智能的灵活性与适应性。
(三)抽象、冗余与抽象层级
抽象过程会导致信息丢失,但可促进信息间的联想与关联——减少冗余可降低信息关联的难度(尤其是关联距离较远的信息),而冗余中蕴含着丰富的、未被挖掘的变量组合,是创新的重要来源。
抽象层级是编程与程序有效运转的核心基石,而穿越抽象层级的连接、协调与调用,本质是一种耦合。跨硬件、跨设备、跨平台、跨接口的通用连接,是编程领域追求的“通用模型”目标。
程序架构通过抽象层级屏蔽外部环境的差异性:若抽象层级具备足够的通用性与适应性,程序架构可与外部环境实现解耦;若程序架构为特定硬件定制,则会形成“强耦合”,丧失通用演化能力。
实践中,程序设计需适应硬件特性(如缓存友好、多线程)的原因主要有二:一是追求极致的运行速度,二是当前缺乏足够完善的抽象层级。
(四)编程模型的演化趋势
随着硬件性能的持续提升,编程语言呈现“动态化”与“远离硬件”的演化趋势——这一趋势反映了编程模型从“硬件依赖”向“逻辑驱动”的转变。
人脑具有“软硬件一体”的动态性,而计算设备无法实现此类动态性,因此需将动态性转移至“程序算法”——这导致部分场景下需通过软件编程适应硬件特性,形成“软硬耦合”,其核心目的是提升运行速度。
从宇宙演化视角看,时间与速度并非核心关注点;人类对时间与速度的追求,源于个体生命的时间有限性。而基因信息与模因信息的演化具有“无时间限制的永续迭代”特性,因此信息演化对速度的敏感度与追求度较低——通过无限时间的迭代,可演化出终极的“通用模型”。
(五)通用演化模型与银弹架构
人脑架构的核心优势在于“动态创造算法”。对编程语言而言,数据结构与算法可相互转化:数据结构越简单,算法需越复杂;数据结构越复杂,算法可越简单。利用这一特性,可通过数据结构等价创造算法,使程序架构具备类似人脑的“动态创造算法”能力——这一架构即为“通用演化模型”。
若大脑架构不具备通用性(如需为不同环境定制不同架构,且频繁淘汰旧架构),则人类智能无法发展至当前水平。因此,通用架构的演化模型必然存在,其关键在于“动态性(依赖冗余性)”与“抽象层(屏蔽冗余性)”。
类比人脑神经网络的“高内聚、低耦合”特性:高内聚体现为功能实现不依赖“颅外调用”,低耦合体现为功能扩展仅需“颅内传参”。这一特性映射至程序设计中,即通过“接口交互”实现程序功能的增强、扩展与改变——此类架构可称为程序设计的“银弹架构”,具备完美的动态性与适应性。
从物理规律看,宇宙存在光速限制,因此程序的运行速度必然存在上限——这一限制可通过“无限空间”(如分布式计算、并行计算)解决或绕过。
最终,人类智能与机器智能可实现“同态性”(结构相似但存在非对应关系),甚至“同构性”(结构相同且逻辑一致)——这一目标的实现需建立在“通用银弹架构”的“演化程序模型”基础之上。
七、短暂与永恒
“与短暂对话,将获得短暂;与永恒对话,将获得永恒。”
短暂的本质是表面、特例、具体、当下;永恒的本质是根本、普遍、抽象、长远。人类思维对话的“问题对象”,决定了思考结果的属性——是短暂还是永恒。
个体身处特定时代,必然受该时代前沿科技的局限,但可通过与“永恒事物”对话突破时代限制,即借助“永恒的机器”穿梭于不同时代。
因此,个体的思考与创造可超越所处时代,其核心在于持有“永恒的演化思维”,并将该思维注入“排列组合”的迭代过程——通过持续迭代,使思想突破时代边界。
实践表明,能够将“更本质的问题”思考得“透彻自洽”的个体,往往能获得参与宇宙演化的深度机会——因为宇宙倾向于选择能够“理解并映射其规律”的个体。
八、算法与比特
(一)算法的本质
算法的定义是“看待结构的角度”与“操控结构的方式”,其核心目标是正确处理“结构关系”。
结构是事物固有的存在形式,关系是观察结构的结果。对同一结构,不同观察角度会产生不同关系;部分关系(甚至绝大部分关系)可能超出观察者的感知、理解与处理能力。
因此,在问题解决中,“换角度”往往能带来突破:可能使人恍然大悟、豁然开朗,最终找到全新解决方案——其根本原因在于,不同角度可揭示结构的更多关系,为问题解决提供新的思路。
反之,若观察结构的角度错误,即使数据正确、分析正确、逻辑正确、处理正确,最终结果仍会偏离预期——因为观察角度与结构的本质关系不匹配。
(二)比特与万物的映射
比特是信息的基本单位,结构与关系需通过信息描述。因此,计算机系统通过比特信息,可建立与万物的映射关系——这一关系支撑了“万物皆比特,宇宙是计算”的理论:前者对应“程序”(万物的信息表示),后者对应“编程”(宇宙的运行过程),而连接程序与编程的核心纽带正是算法。
九、数学与代码
(一)数学与代码的确定性
从逻辑角度看,数学与代码均具备极高的确定性:数学可通过逻辑推理实现“正确证明”,代码可通过执行验证实现“正确运行”。对二者的结果,可持有极强的信心与信任——这是在全宇宙范围内可无限次重复相同结果的“逻辑演算”过程。
其他领域则不具备此类确定性:无法确保所有环节万无一失,无法排除所有潜在可能性,因此呈现“复杂度越高,可控性越低、意外越多、确定性越低、信心越弱”的现实规律。
(二)数学与代码的关系
从本质上看,代码的实现过程是数学规律的具象化,程序的执行过程是数学运算的动态化——甚至可推测,万物的运行环境本质是数学规律的集合。
从层级关系看,代码存在“确定性梯度”:
- 同层代码无法相互确定或自指确定(弱不确定性,大部分结果可确定);
- 高层代码无法确定低层代码(强不确定性,仅少部分结果可确定);
- 低层代码可完全确定高层代码(完全确定性,无概率性偏差)。
基于此梯度,“调试微观代码”会面临不同程度的不确定性,“调试宏观代码”会获得不同程度的确定性,而“同层代码”与“自指代码”处于二者之间。
(三)数学之美与代码之美
在“美”的层面,数学之美与代码之美具有共性——均源于“逻辑的简洁”与“结构的优雅”。二者均是通过“简单”实现对“复杂”的压缩、构建、掌控、表达、驾驭与呈现的产物,是一种极致的“理性之美”。
十、结语
从本质上看,编程 = 数学 + 物理 + 抽象。其中:
- 数学决定编程的效率(通过优化逻辑与算法提升资源利用率);
- 物理决定编程的效用(通过符合现实规律确保解决实际问题);
- 抽象决定编程的模型(通过简化复杂构建通用框架)。
一个兼具效率、效用与合理模型的编程成果,决定了程序的核心价值。
对编程而言,应用数学与物理的过程具有“确定性”——仅需将二者作为工具,使用其已知理论体系;而应用抽象的过程具有“不确定性”——需结合现实世界的复杂变量,且存在大量未知因素。
从演化趋势看,编程正逐步向物理收敛(通过模拟现实规律提升实用性),物理正逐步向数学收敛(通过数学建模揭示本质规律)——即编程模拟物理世界,物理走向数学世界。
最终,人类将生活在计算机编程构建的虚拟世界中,这一过程将经历两个阶段:第一阶段,计算机成为人类能力的延伸;第二阶段,人类本身与计算机融合——这是人类神经网络与机器神经网络的融合,也是从人类智能到机器智能的演化。
正如阿伯尔森在《计算机程序的构造和解释》中所言:“如果说艺术解释了我们的梦想,那么计算机就以程序的名义执行着它们。发明并调整,调整恰当之后再发明,让我们祝福那些把思想和逻辑镶嵌在重重字符之间的程序员们。”
编程的最高境界,亦是编程的彻底终结——这一切的起点,正是程序执行了人类未直接编写的代码。
via:
-
Programming and Computational Thinking in Mathematics Education | KI - Künstliche Intelligenz
https://link.springer.com/article/10.1007/s13218-021-00753-3
https://doi.org/10.1007/s13218-021-00753-3 -
数学思维与编程思维:抽象、逻辑、演化、银弹与永恒 - 知乎
https://zhuanlan.zhihu.com/p/22230371 -
从计算思维到编程教育 - 知乎
https://zhuanlan.zhihu.com/p/112078130
1032

被折叠的 条评论
为什么被折叠?



