এখনও কোনো লেখক নেইদায়িত্ব নিন
সংস্করণ 2আপডেট করা হয়েছে 3 মিনিটে পড়া
Physics teachers and students can now get a working simulation by describing it to a chatbot, then check it against the physics. Yossi Ben-Zion, Roi Einhorn Zarzecki and Joshua Glazer of Bar-Ilan University and Noah D. Finkelstein of the University of Colorado Boulder describe how, using three classic systems.
Why bother
Simulations help students because they are interactive, simplify a phenomenon, let learners change parameters (even stop time) and invite reflection. But building them has needed programming skill and software platforms, and the developer decides the content in advance. The authors say AI-generated simulations complement, rather than replace, polished tools such as PhET: they can fill gaps, explore edge cases and serve as a comparison.
The method
A prompt tells the model to act as a web developer and write one HTML file with a real-time animation, sliders for the system's parameters, start, pause and reset buttons, and graphs of quantities over time, working on different screen sizes. The authors ran their prompts through OpenAI's o1 and Anthropic's Claude 3.5 Sonnet. To use the result, you paste the generated code into a text editor, save it as an .html file and open it in a browser. Then you refine it by talking to the model.
Because language models give different answers to the same prompt, every simulation needs checking. The authors separate technical validation (do the controls and graphs behave?) from physical validation (does it match known analytic solutions and laws?). Students who do this check learn physics, since they compare results with theory, and the cycle of re-prompting and fixing resembles scientific inquiry. All checking can be done in plain conversation with the model.
Three examples

Basic pendulum simulation: the pendulum, sliders and graphs of angle and angular velocity.
Simple pendulum. The prompt asks for sliders for mass, length, initial angle and initial angular velocity, and an angle-versus-time graph on which the small-angle analytic solution is drawn over the numerical one, which uses Runge-Kutta methods on the full nonlinear equation. Tests: the period should match the analytic one for small angles, and the two curves should diverge as the initial angle grows, showing where the approximation fails. A debugging session with Claude fixed several problems; in one, the analytic curve showed half the right period, and the authors told the model to check the time in the function they had given. Effective prompts name the problem clearly and say exactly what to correct. An enhanced version added full rotations, a friction slider, a tension graph and energy bars.

Enhanced pendulum simulation with large-angle dynamics, friction, tension and energy.
Ising model. A 2D lattice of spins that can point up or down, in which aligned neighbors lower the energy, used to study ferromagnetism and phase transitions. The simulation uses Metropolis Monte Carlo methods with sliders for temperature, interaction strength, magnetic field and lattice size, a heat map of spins, and live graphs of magnetization and energy. The physical tests: near the critical temperature of 2.269 (for interaction strength 1 and no field), magnetization should drop sharply; far below it, spins should align spontaneously; and an applied field should push spins to follow it.

2D Ising model simulation with heat map and live graphs.
Random walker. Walkers take unit steps on a 2D lattice, tracing their paths, while a graph compares the average distance from the origin with the theoretical square root of pi times n over 4 after n steps. In 3D the expected value is the square root of 8n over 3 pi. The 3D prompt in one go gave inconsistent results, so the authors built it in stages: one sphere walking, then many particles, then trails, then controls, then the statistics graph, testing each before adding the next.

2D random walkers and the average-distance graph.

3D random walk simulation.
The authors' conclusion
The approach lets educators build simulations matched to their course without advanced programming, and students learn both physics and the strengths and limits of language models, including the need for careful prompts. As models improve, they expect more complex simulations and less prompt engineering, and they see the method working in chemistry, biology and other fields.
Sources
- Yossi Ben-Zion, Roi Einhorn Zarzecki, Joshua Glazer and Noah D. Finkelstein, Leveraging AI for Rapid Generation of Physics Simulations in Education: Building Your Own Virtual Lab, arXiv, licensed under CC BY 4.0. Changed here: condensed, with the full prompts, references and test lists left out; the five figures are the paper's own; rewritten in hubnx's own words.
মন্তব্য



