I've done a fun exercise with grade 5 and 6 students where you build a computer that can taste food.<p>It takes about 30 minutes and the students simulate the algorithm by walking around the class, so it's engaging.<p>Training the algorithm:<p>The students line up along one of the classroom walls. I name a food like broccoli or chocolate and the students walk across the classroom a distance (out of 10) that represents how much they like the food. Most students would walk further across the classroom for chocolate than broccoli for example.<p>The class then comes up with an median score that represents how much they like the food based on the position of middle positioned student in the class. For example, for chocolate, the middle positioned student may be 80% of the way across the classroom. For broccoli, the middle student may be 30% of the way across the classroom.<p>We then talk about the visible features of the food. Chocolate, for example, is in a wrapper, is brown, is rectangular etc. Broccoli is green, round, small etc.<p>Testing the algorithm:<p>After repeating this for 10-12 foods, we then take a food we haven't looked at yet. An apple, for example. The students individually write down their rating of how much they like it out of 10 (but don't tell anyone their rating). We agree the features of the apple and then calculate the score based on the score of the features from the 10-12 foods that we scored in the training.<p>The students then go to the position in the classroom that represents their rating and we calculate how much the computer likes the food.<p>Tips:<p>You need to carefully select your foods so you get multiple results for as many features as possible.<p>Class discussion:<p>There's lots to discuss:<p>Median, machine learning, bias etc