10 AI & Machine Learning Projects for the K12 Classroom — PETE&C & ISTE Session Resources
About the presenter:
Dr. Scott Garrigan is Emeritus Professor in the Lehigh University College of Education. He has worked as K12 teacher, school district technology director, director of professional development, and university professor. He has developed courses for Lehigh University, Wilkes University, and Discovery Education. He offers professional development and consulting for schools and businesses across the U.S. and internationally. Contact him at:
Dr. Scott Garrigan
scott.garrigan@gmail.com
LinkedIn: Dr. Scott (never up-to-date)
+1 – 484-894-6162
Note about the projects below. None require commercial software, subscriptions, or hardware. Nearly all can be done on a laptop, desktop, or tablet. Each one is TEACHER DIRECTED. They all rely on the teacher to set the context, provide direction and support, and follow up with reflection. They can be done across many subjects and grade levels, again, according to teacher interest and skill (computer science majors not necessary!!!). All are practical for a classroom and give students insight into some aspect of data analysis, artificial intelligence, and machine learning.
Teacher note: Each project demonstrates a different aspect of “intelligence.” As appropriate, facilitate a discussion of intelligence, comparing the AI or ML system to human intelligence, starting with “Is Siri smart?” “How intelligent is Alexa?”
- Evaluate and evaluate recommender systems in Amazon or Netflix (1st through 7th grade). Younger children can ask parents and grandparents if they use Amazon recommendations for books, toys, or purchased, or if they use Netflix recommendations for movies. These recommendations are made through machine learning; how useful are they? Do they seem to “know” the user? Older students can reflect on their own experience with these recommender systems. Where do you think the recommendations come from? Why might they be accurate or inaccurate? Class discussions would be appropriately focused by age and school subject/unit. Discuss recommendations for books, movies, other items (clothing, food, etc.).
- Explore and evaluate voice recognition and voice synthesis systems like Siri, Cortana, or Alexa (1st through 7th grade). for English language proficiency and limits (such as English Language Learners). Especially for those students and adults for whom English is not their native language. What can Siri or Alexa understand easily … and where do they have difficulty. Why would they have trouble understanding your voice? Can people use Siri or Alexa to make their voices more understandable? Could it help language learners?
- Explore and evaluate facial identification in photos (1stthrough 5thgrade): take individual student photos and label them on smartphone or tablet (just Google how to set up face identification for your system). See how well the faces are recognized from different angles, from the back. See how well a classroom photo identifies each student. Try photo identification on Halloween with masks and makeup. How accurate is the photo identification in various poses, at a distance, and with masks or makeup? What conditions lead to accurate identification? Can you confuse the system? Where are such systems used? Can they be misused? See: https://www.bbc.com/news/blogs-news-from-elsewhere-48401901
- Explore big data and multivariate analysis with Gapminder bubble tool (4th–to- 9thgrades): https://www.gapminder.org/tools/#$chart-type=bubbles. The default data explores the relationship of income to life expectancy in each country from 1800 to today. NOTE: the data for each axis has MANY choices from health to finance, education, and pollution. There’s a LOT to explore! Gapminder has aggregated perhaps the largest easily-accessible datasets that are current from authoritative international sources. This is perfect for social studies, science, and economics classes. There is also a treasure trove of Hans Rosling’s videos to introduce global ideas in a digestible form.
- Experience AI-enhanced art, but who is the artist?
There are several powerful AI-generated art systems that have gotten wide publicity in 2022 and beyond including Stable Diffusion, Midjourney, and DALL-E. While these are the current stars, there are MANY AI-enhanced apps for images and even music. A Google search will show your choices. DALL-E ideas can be found in the “10 MORE” list on MentalEdge.
Stable Diffusion is one leader in this area that adults and students can use without an account. Here’s the playground link: https://stablediffusionweb.com/#demo
Midjourney is a leader in AI image generation that does require an e-mail based and age-confirmed account. 25 free images are permitted before you have to pay for a subscription. Midjourney uses community-based channels where those interested in a particular style of image may collaborate. There is a longer learning curve to get started, but the results can be staggeringly great. Check out the Midjourney Showcase of images AND prompts: https://midjourney.com/showcase/ Here’s the Midjourney start page: https://midjourney.com (you will NEED the user guide). - Explore genetic algorithm machine learning through “agent modeling” with NetLogo (4th–to- 10thgrades). A wonderful, but very old genetic algorithm simulation uses the Breve simulation environment. Download Breve from http://www.spiderland.org/s/ and run Demos –> Physics-Examples –> Walker.tz (or Walker.py). The Python code can be examined and modified. (doesn’t work on new Macs. Windows and old Macs OK)
A Simple Machine Learning simulation using a genetic algorithm can be explored here: http://netlogoweb.org/launch#http://netlogoweb.org/assets/modelslib/IABM%20Textbook/chapter%208/Simple%20Machine%20Learning.nlogo. The visualization is a too abstract (best for older students), but the very simple NetLogo code is useful because it can be explored and modified by students.
Google used its DeepMind learning system to show how an avatar can learn (by itself) to walk, run, jump, and climb. It most likely used the same approach as the Netlogo example above, but the avatar visualization is much more accessible and compelling. https://www.youtube.com/watch?v=gn4nRCC9TwQ
Here’s a longer video simulating natural selection (but with a very simple mutation model without AI or ML): https://www.youtube.com/watch?v=0ZGbIKd0XrM - Explore and evaluate common information systems: what can they do and what are their limits? (Siri, Alexa, Wolfram Alpha, Cortana – 4th–to- 9th). Note that Siri uses Wolfram Alpha. You can access Wolfram Alpha directly at https://www.wolframalpha.com/. What kind of questions can these systems answer? What questions stump them?:
– How old was George Washington when he died?
– How old am I? What’s my name?
– What are the ingredients of ice cream? What’s the best flavor?
– Who is the president of Afghanistan? Is he a good leader? - Build a “self-driving car” to explore how sensors integrate into real-world AI and ML. (path-follower 3rdto 6th, maze-runner 7th to 10th). A simulation can be created with Scratch (lots of examples in Scratch community). A physical model can be built with Lego Mindstorms or other robotic kits with sensors and computers like Arduino and Pi. AI will effectively find a path through a maze. Machine Learning can record the path for future use. Here’s one of many tutorial examples to get your students started: https://www.youtube.com/watch?v=_eYEzirmJEQ.
And here’s an actual student model of a self-driving car … with editable code!!! https://scratch.mit.edu/projects/25495293/ (complex model may take while to load. Try a different browser if you experience trouble). - Explore and analyze real data and make predictions with Kaggle, R, and Rstudio (10th to 12th grades). Kaggle.com’s Titanic dataset and tutorials have been used by 10’s of thousands as an introduction to the R data analysis language with real-world data. While you can Google many “Titanic – Kaggle – R” tutorials, I like David Langer’s two-part YouTube tutorial as an introduction to data science. He methodically guides and explains the process in a way that many reviewers have complimented. But two caveats: First, the instructor should complete this activity before thinking about student assignments. The first part is over an hour, and could be completed in two class periods. The second caution is that Kaggle has modified the data structure since her recorded the 2014 tutorial. You can find updated direction and work-arounds at the bottom of this page (the hands-on section): https://mentaledge.us/ai-ml/01-introduction-to-ai-machine-learning/
You can find hundreds of structured datasets on Kaggle.com. There are also regular Kaggle challenges that high school teams could join. Kaggle has so much for high school level and above that just learning the site is a small learning curve. There is lots of help, many datasets, and way many examples; it is a very rich site: https://kaggle.com
Note that there are MANY tutorials using this popular dataset. Some are much more complex than others. The best solution may be for the teacher to progressively work through the process live WITH the students. This is a dataset that captures the imagination of many students! - Build a “classifier” machine learning system (most common kind of ML – 10th–to- 12thgrades). Google Brain’s TensorFlow adds a very high-level machine learning library of algorithms to Python. Google also added an amazing series of introductory tutorials that quickly demonstrate both the power and the ease of modern ML programming. Google’s tutorials run in “Colab,” a friendly environment that makes Python and programming more accessible. With just a web browser, teachers and students can have guaranteed success in their first ML experience in just minutes.
The first TensorFlow tutorial uses the well-known MNIST dataset of 70,000 handwritten digits (see sample above). The ML system will use a neural network to analyze 60,000 of these images and categorize them into numerical digits 0-9 (10 categories). It will then test it’s learned algorithm to predict the correct numerical digit from 10,000 previously unseen handwritten digit images. WE WILL DO THIS TUTORIAL LIVE IN THE SESSION! Here’s a direct link to the tutorials: https://www.tensorflow.org/tutorials/ (note: if the tutorial doesn’t load, try a different browser). Here’s a 6-min narrated video to explain the main steps of a Machine Learning program using TensorFlow and the MNIST dataset: https://www.youtube.com/watch?v=KIpo4LoCgtg - If time permits: explore scikit-learn machine learning algorithms (cheatsheet at: https://scikit-learn.org/stable/_static/ml_map.png). Note number of data observations necessary for effective learning for the different algorithms!
For further investigation:
Interested faculty and secondary students can learn on their own through free/low-cost MOOC courses from 2U (formerly edX) and Coursera. MANY data scientists around the world got their training through these sources. Youtube also has MANY tutorials for R, Python, Scikit-Learn, and now Tensorflow (and Tensorflow 2).
AND there are materials for a full university course on the Mentaledge.us site (select AI/ML in the navigation bar). All free to use.