A Positive Application of Generative AI for Learning
Using generative AI to create customized interactive simulations
Thank you for being here. Please consider supporting my work by sharing my writing with a friend or taking out a paid subscription.
In last week’s post I wrote about questions I’m wrestling with related to generative AI, and technology more generally in education. I ended that post with some passages from Ursula Franklin arguing that in the end, we need to remember that whatever we do should be motivated by the fact that “in the end nothing matters except people.”
While last week I shared some general skepticism about the ability for technology in education to be centered on the flourishing of humans, this week I want to share some of my current thinking about how generative AI can support that goal. My thesis is that these tools are most beneficial when they are used to build tools to make our classes more interactive for students and help them build intuition for the concepts we are teaching.

One of my favorite parts of teaching, bar none, is the moment when I’m sitting next to a student and I can tell that it clicks. This most regularly happens not in the middle of a lecture, but during an activity or small group discussion in class. Perhaps it’s a question that they ask that shows they are so close to getting it or a minor mistake in their logic that when resolved helps everything snap into place, but those eureka moments are the best.
As I continue to hone my teaching and iterate on my classes year over year, I’m always looking to create opportunities for these moments to occur more regularly. It’s pretty much common knowledge at this point that standard lecture style classes are not the optimal way to do that. Even when lectures inspire this kind of aha moment, the reveal is more about the showmanship of the lecturer than a true insight for the student. Ask the students to teach you about the big reveal in lecture the next day and it’s highly likely that they won’t be able to.
Do, Learn, Do
The most effective way to do this is to get students actively engaged. You learn most effectively by doing. The secret sauce of the Harvey Mudd Engineering curriculum, as best as I can distill it, is the following sequence: do, learn, do. In almost every class, we start by exposing students to a problem, giving them only enough information in order to have enough context to do something with it to tackle the problem.
One example of this pedagogical approach in action is in E79: Introduction to Engineering Systems. E79 is the Engineering department’s contribution to Harvey Mudd’s core curriculum and is taken by students in the fall of their second year. For the last several years, the class has been focused around underwater robots that students build themselves using frames made of PVC pipe and a DC motor connected with a long wire to an electronic driving board that stays outside the water.
E79 has two parts, tutorial and practicum. The tutorial sections take place in a typical classroom setting and focus on the theory of Engineering systems. Each class covers an aspect of relevant theory like writing governing equations to model the behavior of spring-mass-damper systems to designing control systems with proportional-integral-derivative (PID) control loops. The practicum, on the other hand, takes place in the basement of Parsons where students work on small teams to build their robots and test them, both in our tank room on campus and later in the semester in the pond that is part of the Bernard Field Station just north of campus.
What makes E79 effective is the ways that the tutorial and practicum sessions reinforce each other. In practicum you see your robot behave in a certain way when you’re running an experiment and then in tutorial you learn the theory that describes why that happens. In the same way, in tutorial you learn about how to design a control system that guarantees a certain response rate. Then in practicum you actually implement it in practice.
Simulations can offer a lab-like experience at a fraction of the cost
Running a course like E79 is no small feat. It requires a team of instructors and instructional staff working together to make sure all the labs are set up, the physical components are ordered and organized, and to walk alongside the students to debug the inevitable issues that need to be addressed when things don’t work as expected. This is the biggest challenge of running labs like this. There are many moving pieces and they add a great deal of complexity to a course.
So what do you do if you want to bring more active learning into your class but you don’t have the resources to run a full-fledged lab section alongside your course?
As I’ve continued to experiment with generative AI coding tools that enable you to rapidly prototype web apps, I’ve been testing a new thesis. What is there is a middle ground between the in-person lab and the standard lecture? What if there were a way to deliver some of the benefits of lab-type activities without the requirements for the full in-person lab?
There are a few pre-existing ideas here that are worth noting. The first is in-class demos. You’ve probably had a physics teacher do some of these for you at some point in your education. These are everything from the conservation of angular momentum as demonstrated by spinning on a rotating stool and pulling weights in and out or the swinging metal balls which demonstrate the conversation of momentum and energy in collisions. These kinds of demos help to drive the point home by giving students a physical example of a particular concept.
While these demos are good, they are not normally interactive. It is hard for each student to individually experience what’s going on in order to build their own intuition. What if we had a way for each student to interact with the theory?
Perhaps the best example I know of in this genre is the PhET Interactive Simulations project at the University of Colorado at Boulder, founded by Nobel Laureate Carl Wieman. The best way to get a sense of the PhET Simulations is to poke around on their website for a few minutes.
There are a whole host of beautifully designed simulations to illustrate a variety of concepts across science and mathematics. In a video about the the founding of PhET, Wiemen describes what inspired him to build it. What started as a project to help him better illustrate his research, expanded into a platform designed to help create interactive simulations that can be used by educators in their lectures, students in their homework, or just by the general public looking to deepen their own scientific understanding.
But there are still barriers to using this in your classroom. One limitation is the finite library of examples. While you might be able to find an example from their library that is close enough to the concept you want your students to engage with, you may want to add a different flavor to it or emphasize specific aspects of the concept. Perhaps you want to align the notation with the notation you use in your class or connect the sequence with the particular textbook that you use.
At this point you may be wondering what all of this has to do with generative AI. Here’s the punchline: generative AI makes it easier than ever to create these kinds of custom, interactive simulations for your classroom. If you look at the PhET team, you’ll see that there are twenty individuals on the team with roles in sim design, helping these simulations come to life in some way or another. They bring expertise in pedagogy, the underlying scientific discipline, and software engineering.
My wonder in recent days is to what degree generative AI may be able to help close the gap to enable every educator to develop their own customized interactive PhET-style simulations for their classes. Imagine a course where every class period was accompanied by a simulation built to drive home the main learning objectives using an interactive simulations that students can actually engage with.
Creating interactive simulations for your classroom using generative AI
Generative AI makes this easier than ever. A few weeks ago I had a spare half hour in the afternoon and decided to give this a shot. How easy was it to build an interactive simulation to help students interact with a control system using proportional control to reliably drive the robot to a desired depth?
I started a new chat with Claude Code, grabbed the link to the relevant section of the practicum manual, started my voice to text transcription app (using Handy these days), and briefly described what I was looking for. I don’t remember the exact prompt I used, but it doesn’t matter. There’s no magic words and the specific prompt to start doesn’t really matter either. Just talk out loud about what you’re wanting to build and then tell Claude to prompt you back with more questions about what you’re hoping to build. The agent will keep pushing back on you with questions. Once you feel good about the plan, it’s time to build.
About thirty minutes from my first thought about this project, I had a customized interactive lab published on the web. You can check it out here. It allows you to use sliders to configure the properties of the control system like the proportional gain, the physical parameters of the system like mass and drag coefficient, and the initial and desired final conditions. Set it up on single shot mode, click go, and you can see your little robot make it’s journey to the target, with a live-updating plot directly below it tracing out the response as a function of time.
Not only do you get these pretty graphs and a simple but helpful cartoon of the robot moving through the water, but you can also see some additional panels with helpful information. There is a graph of the s-plane where you can see the location of the poles which helps you to understand the kind of step response you would expect to see. There is a panel with response metrics with information about other relevant information like the natural frequency, damping coefficient, overshoot percentage, rise time, and settling time. All of these are quantities that we ask our students to understand and calculate.



By the time I finished this first one I was hooked. I figured it wouldn’t take me much longer to create more. Within fifteen minutes I had whipped up three more: a demo on why basis vectors matter a lot using the motivating example of the discrete cosine transform (used in JPEG compression), a simulation to visualize two-body orbits, and a figure critique experience to help students understand best practices for communicating technical information in a figure. You can see the full library here. Whenever I went to add a new one to the repository (source code is on GitHub, by the way), Claude automatically figured out the general style and layout and matched it to the new demos, giving the whole site a consistent feel and aesthetic. I can imagine there is even more to do here with some custom agent skills that would more explicitly drive the pedagogical design of the simulations too.
Technology can help make teaching more effective
Perhaps all of you will tell me that I’m way too excited about this. But this feels like a truly useful application of generative AI to help individual educators create engaging material for their students that is customized to their course and learning goals.
Much of the discourse about educational technology is about enabling us to do something new. But I’m more interested in ways that technology can enable us to do the things we already know are worth doing but we just don’t have the time to do. One of my favorite examples is the way that Gradescope facilitates grading student work problem by problem across the entire class instead of grading each assignment sequentially. This helps to ensure that we grade each problem consistently across the class.
What I like about this particular use of generative AI is that it enables something that we know is useful but is infeasible in practice. Just look at the PhET team. There are more than three dozen people on the team. Creating these kinds of interactive simulations the traditional way is quite expensive, both in time and money. Building this kind of software before the advent of AI coding tools was quite time consuming, as was iterating on features and the overall design and flow. The reality is much different now. Building new features or rearranging the flow can be done with natural language prompts to the AI coding tool.
Another nice feature here is that generative AI is only used in the initial development of these apps to translate from natural language to code. There is no ongoing use of genAI; after the simulations are created, they are simply rendered html webpages. Each demo is literally a single html file and iIf you wanted to, you could just email these to your students and they could open directly on their computers, no login, account, or even internet required.
There are many ways that educational technology has gone wrong, but we ought to be careful not to let those missteps make us blind to the potential for new technology to genuinely help make our classrooms more engaging and full of curiosity. Active learning is one of the best ways to do that, and generative AI can make it easier. We ought to at least consider that there might be positive applications of technology in education. This might be one of them.
Got a thought? Leave a comment below.
Reading Recommendations
Cal Newport writes in the NY Times that we need to start taking our cognitive fitness more seriously (gift link).
I think we’re finally ready for a similar burst of self-reinforcing action in defense of our cognitive fitness. What I’ve laid out here is not a complete program to reclaim our heritage as contemplative beings but instead a useful starting point. My intention is to spur a shift in understanding that can build into a larger revolution. I’m done ceding my brain — the core of all that makes me who I am — to the financial interests of a small number of technology billionaires or the shortsighted conveniences of hyperactive communication styles. It’s time to move past fretting about our slide into the cognitive shallows and decide to actually do something about it.
It’s baseball season, so you’ll have to put up with some baseball tweets here as well. First up, nastiness from Nolan McLean.
Next up, C. B. Bucknor with the worst call of the century. Are you not entertained? Oh what I would pay to watch Angel Hernandez in the ABS era.
The Book Nook
Continuing to work my way through Theo of Golden before bed each night and finding it quite delightful.
The Professor Is In
Hard to believe our AI conference at Harvey Mudd is only about a month and a half away. Abstracts for poster, lightning talks, or discussion sessions are due by April 22nd and early bird registration ends April 24th before the registration prices go up.
If you’re interested in attending, now is your time! Hope you can join us.
Leisure Line
Hard to beat a Saturday morning out on the diamond. I’m going to miss the days when I’m not allowed to be coaching from the outfield while we’re fielding.
Still Life
Love this view of the San Gabriel mountains overlooking the school that I pass on my morning walks around our neighborhood.










