87450 - Models and Numerical Methods in Physics

Academic Year 2025/2026

  • Teaching Mode: Traditional lectures
  • Campus: Bologna
  • Corso: Second cycle degree programme (LM) in Physics (cod. 6695)

    Also valid for Second cycle degree programme (LM) in Physics of the Earth System (cod. 6696)

Learning outcomes

By the end of the course, the student will have acquired the theoretical and numerical skills for the study of entropic properties of datasets, more or less structured. Theoretical skills will be acquired in the area of intersection between Complex Dynamical Systems Theory, Information Theory and Statistical Mechanics. Please refer to the syllabus for detailed topics. As far as numerical skills are concerned, the student will experiment with Python the numerical implementation of algorithms for the estimation of entropy, relative entropy and entropic production for stochastic processes on finite alphabets. Some applications in the area of natural language, gene sequences and (time permitting) in the area of human mobility data will be explored.

Course contents

“From Conway to LangGraph: Agent Systems for Physicists in the LLM Era”

This year this 48-hour master-level course traces a single intellectual thread — local rules giving rise to emergent global behaviour — from the classical cellular automata of von Neumann, Ulam and Conway to today’s multi-agent frameworks that wrap large-language models in autonomous tool-using workflows.

Drawing on a physicist’s toolkit (statistical mechanics, dynamical systems, graph theory), students will learn how to formalise, simulate and analyse agent-based systems; how to couple them to learning algorithms (reinforcement, evolutionary); and how to embed modern foundation-model capabilities (reasoning, code generation, memory) inside those agents with libraries such as LangGraph.

Weekly hands-on labs in Mesa and Python/Jupyter move from first principles to deployable prototypes, preparing participants to apply agentic thinking to research problems in physics.

WEEKLY TOPICS OUTLINE (in progress)

Week 1,2: Emergence from Local Rules

  • Classical cellular automata: von Neumann, Ulam, Conway
  • Concepts of emergence and complexity
  • Lab: Implementing 1D and 2D cellular automata in NetLogo

Week 3,4: Statistical Mechanics of Agent Systems

  • Micro-macro mappings, phase transitions, criticality
  • Mean-field approximations and Monte Carlo dynamics
  • Lab: Simulate self-organizing criticality in Mesa (Python)

Week 5,6: Reinforcement and Evolutionary Learning

  • Reinforcement Learning in multi-agent systems
  • Evolutionary algorithms and adaptive behaviour
  • Lab: Q-learning agents in gridworld + genetic algorithms

Week 7,8: Foundation Models as Cognitive Primitives

  • Overview of LLMs, code generation, and few-shot learning
  • LLMs as tools vs agents: prompting vs chaining
  • Lab: Use OpenAI API to build an LLM-based calculator/planner

Week 9,10: LangChain and LangGraph Fundamentals

  • Memory, tools, agents, chains and graphs
  • Control flows, multi-step reasoning, branching logic
  • Lab: Build a tool-using LangGraph agent with memory

Week 10,11: Multi-Agent LangGraph Systems

  • Agent collaboration and competition
  • Coordination via messages, tools, or shared memory
  • Lab: Implement a multi-agent scientific assistant (LangGraph)

Readings/Bibliography

In preparation....

Teaching methods

Lectures and Numerical Simulations (with Python)

Assessment methods

Design, implementation and discussion of a project

Teaching tools

Students with Specific Learning Disabilities (SLD) or temporary or permanent disabilities are advised to contact the University office in charge in advance (https://site.unibo.it/studenti-con-disabilita-e-dsa/en ). The office will be responsible for proposing any necessary accommodations to the students concerned. These accommodations must be submitted to the instructor for approval at least 15 days in advance, who will assess their appropriateness in relation to the learning objectives of the course.

Office hours

See the website of Mirko Degli Esposti