Artificial Intelligence Applications in Engineering (MUH-920), week 14 of 14: interactive lab
Prof. Dr. Utku Kose, Süleyman Demirel University
Part A runs value iteration for the pump of the lecture and Part B Q-learning on the same pump [1, 2]. Part C compares the rewards of two heater trajectories. Part D trains a Q-learning thermostat in the room model of Week 1 and compares it with the hysteresis rule; the learned policy is shown as a table of actions over temperature and heater state [2]. Part E tunes a gain with the cross-entropy method, Part F computes the losses of a physics-informed network [3], and Part G identifies a room for a digital twin. Part H places eight engineering AI systems into the risk categories of the EU AI Act [4], Part I matches project activities to the four functions of the NIST AI Risk Management Framework [5], and Part J plans the tests that support a failure rate [5].
The pump of the worked example is the default. Each sweep computes the action values of every state from the values of the previous sweep; the panel writes out the arithmetic for one state, the largest change bounds the remaining error, and the dashed lines show the exact values of the current greedy policy [1].
The agent does not know the probabilities and learns from simulated weeks with an ε-greedy policy. Every update is written out with its target and temporal-difference error, the table compares the estimates with the optimal action values from value iteration, and a button replays the five transitions of the worked example [2].
Two heater trajectories, by default those of the worked example, are scored with a reward for comfort, switching and energy. The tables write out every reward, and the chart shows how the returns change with the switching weight and where the preference flips [6].
A gain is tuned on a return function that the method only samples. Each iteration draws parameters from a normal distribution, keeps the elite and refits the distribution to it, the procedure that the notebook applies to the cart-pole of Gymnasium [7]. The function with two peaks shows how a narrow start can miss the better peak.
Candidate solutions of the damped oscillator are scored with the data loss at the measurements and the physics loss at the collocation points. The default reproduces the worked example; the data fit shows how a curve can match early data while violating the equation [3].
A simulated room with a hysteresis thermostat produces noisy measurements. Least squares identifies its two parameters with every sum written out, the twin replays the recorded heater states, and a second table shows how the estimates improve with more data [8, 9].
The number of failure-free tests needed for a claimed failure rate, the upper confidence bound after a test campaign and the chance that a system at the claimed rate would pass. With failures, the bound comes from the binomial distribution, found by bisection [5].
Six questions with instant feedback. Rate your confidence before checking each answer.
Answers are saved in this browser only. The export creates a Markdown learning log for your portfolio.
After the export, continue with the discipline challenge and the weekly task in the week overview.
[1] Sutton, R. S., & Barto, A. G. (2018). Reinforcement Learning: An Introduction (2nd ed.). MIT Press.
[2] Watkins, C. J. C. H., & Dayan, P. (1992). Q-learning. Machine Learning, 8(3-4), 279-292. https://doi.org/10.1007/BF00992698
[3] Raissi, M., Perdikaris, P., & Karniadakis, G. E. (2019). Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational Physics, 378, 686-707. https://doi.org/10.1016/j.jcp.2018.10.045
[4] European Parliament and Council of the European Union (2024). Regulation (EU) 2024/1689 laying down harmonised rules on artificial intelligence (Artificial Intelligence Act). Official Journal of the European Union, L series, 12 July 2024. https://eur-lex.europa.eu/eli/reg/2024/1689/oj
[5] National Institute of Standards and Technology (2023). Artificial Intelligence Risk Management Framework (AI RMF 1.0), NIST AI 100-1. NIST. https://doi.org/10.6028/NIST.AI.100-1
[6] Amodei, D., Olah, C., Steinhardt, J., Christiano, P., Schulman, J., & Mané, D. (2016). Concrete problems in AI safety. arXiv preprint arXiv:1606.06565. https://arxiv.org/abs/1606.06565
[7] Towers, M., Kwiatkowski, A., Terry, J., et al. (2024). Gymnasium: A standard interface for reinforcement learning environments. arXiv preprint arXiv:2407.17032. https://arxiv.org/abs/2407.17032
[8] Brunton, S. L., & Kutz, J. N. (2022). Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control (2nd ed.). Cambridge University Press. https://doi.org/10.1017/9781009089517
[9] Grieves, M., & Vickers, J. (2017). Digital twin: Mitigating unpredictable, undesirable emergent behavior in complex systems. In Transdisciplinary Perspectives on Complex Systems (F.-J. Kahlen, S. Flumerfelt, & A. Alves, Eds.) (pp. 85-113). Springer. https://doi.org/10.1007/978-3-319-38756-7_4
[10] Tao, F., Zhang, H., Liu, A., & Nee, A. Y. C. (2019). Digital twin in industry: State-of-the-art. IEEE Transactions on Industrial Informatics, 15(4), 2405-2415. https://doi.org/10.1109/TII.2018.2873186