Keywords

1 Introduction

The activity that is presented in this work has been created in the scope of the AI+ project [1], which aims to develop a curriculum of AI for high school students in Europe. Starting from the remarkable work carried out in the AI4K12 initiative [2] and including the own experience of the University of Coruña (UDC) experts, eight AI topics that must be covered at this educational level have been already established, namely: perception, actuation, representation, reasoning, learning, artificial collective intelligence, motivation and SEL (sustainability, ethics and legal aspects of AI) [3]. These topics are organized in teaching units, designed for the teacher, that make up a two-year subject, targeted to students with a technical background.

The AI+ curriculum follows the STEM methodology [4], and each teaching unit presents a challenge or project that must be faced through cooperative Project Based Learning (CPBL) [5]. To support this practical approach, it has been established to rely on the student’s Smartphone as the core educational tool. Current smartphones have the technological level required for AI teaching in terms of sensors, actuators, computing power and communications. In addition, a large majority of high school students have their own Smartphone, so they can use it. This reduces the cost of introducing this discipline and equalizes regions with different economic capacity [6].

The activity described in this paper corresponds to the challenge that students must face in the third teaching unit of the AI+ project, devoted with the introduction to representation and reasoning in AI. This teaching unit is carried out after one focused in perception and actuation, so students are already familiar with the main sensors in this scope, like cameras, microphones and tactile screens [1]. Specifically, in this activity they will develop an intelligent Smartphone app, “The School Path Guide”, using App Inventor. The global duration of the activity is 5 h, approximately, and all the teaching material related with the activity is available to download [7].

Fig. 1.
figure 1

Left: Initial screen. Middle: User capturing QR. Right: Guidance screen

2 School Path Guide App

The app will guide users in the school building from their current location to a destination and should work as follows: there are different location points in different places of the building identified by a QR code, which has been encoded with the location name. When the user arrives at one of these points, he/she scans the QR code through the app. Once scanned, the app shows a list of possible destinations and the user selects the desired one. From this moment on, the app shows the optimal path to reach the destination through photos and instructions displayed in the screen (Fig. 1).

In this introductory teaching unit, it was decided to teach both concepts, representation and reasoning, in the same practical case. This way, students will understand how a proper representation facilitates reasoning. Specifically, the following topics will be addressed: 2D representation, topological vs metric maps, first person representation, basic graph definition, probabilistic reasoning and basic route searching over graphs.

2.1 Representation

As a first approach, it is proposed to use a representation of the school based on images, that is, photographs of locations the user can easily identify (location points). The first step for students is to define these location points, which will be marked with a QR code placed in a wall at a visible position. To simplify programming, it has been decided to create a division of the school into path sections. They are defined by crossing points, which are relevant points where more than one path coincides, or by location points. The possible routes are the result of the union of path sections. To clarify this representation, Fig. 2 shows the floorplan of an example building.

Fig. 2.
figure 2

Map with location points (blue), crossing points (orange) and path sections (green) (Color figure online)

The set of location points, crossing points and path sections make up the topological map representation that will be applied [8]. To simplify it, it is proposed to use a graph, which reduces the 2D (flat) map to a graphic based on nodes and links like the one shown in Fig. 3. Therefore, the task the students have to carry out is to create a graph for their particular school. To do it, it is recommended to start from a floorplan of the school, if possible, and to perform the process “by hand” (in a printed paper or a tablet), so the concept of representation change becomes clearer.

To finish this first part, students must take photographs of the beginning and end of each path section with their smartphone, which will be displayed in their app version.

2.2 Reasoning

Students will be introduced in the basics of probabilistic reasoning [9]. The first step to do is to calculate the time required to walk through each path section in their school (Tij, where i is the origin and j the destination). We recommend them to obtain these data empirically. These time values must be included in the links of the graph, as displayed in the left diagram of Fig. 3. The programming to be carried out implies to create a function that calculates the optimal route from an origin to a destination by adding the times of each of the path sections that constitute the route. The result of this function should be the direction of the route (clockwise or counter clockwise).

Fig. 3.
figure 3

Left: Topological map graph representation. Right: link parameters for reasoning

Second, we will consider a realistic situation derived from the break time of the school. In this period, some paths con be overcrowded, affecting the walking time, mainly those that imply using stairs. To deal with it, the current clock time must be introduced in the app and two new variables must be included on each link of the graph. The first one is the probability of congestion (Pc), a value between 0 and 1 that represents the probability of finding people in a given path section. It can be empirically estimated, for instance, by observing the congestion in the break period during different days and establishing an average probability for each path section. The second one is the average time required to travel each section during the break time (TBij). To calculate it empirically, students should walk the different sections in many congestion periods and compute an average time. Figure 3 (right) shows a possible set of values for the 3 parameters to consider in the case of the UDC building.

Considering these parameters in the graph, depending on the clock time the user executes the guidance, apparently slower paths can be provided by the app, but the resulting travelling time is lower because congestions are avoided.

3 Conclusions

This paper presents a structured activity to introduce high school students in the topics of representation and reasoning in a practical way. Topological maps and graphs have been used as simple cases of internal representation in AI. Then, basic probabilistic reasoning has been performed to find the fastest path in the graph. With this activity, students obtain a first idea of how an appropriate representation leads to a simpler reasoning process, and how including probabilities makes the solution smarter.