Teacher: Prof. Fabio Patrizi
Prerequisites. Students taking this course are required to be familiar, at a level acquired through academic courses, with the basics of Multivariate Differential Calculus (derivative, gradient, max/min/saddle points and related results), Probabilities (prior, conditional, distributions, density functions, likelihood, and related results), Computatoinal Complexity, and Object-Oriented Design & Programming.
Objectives. The objective of the course is to introduce the basics of automated logical reasoning & planning, and automated learning, as building blocks for designing and implementing modern autonomous agents. The part on automated reasoning (6 CFUs) focuses on modeling approaches for discrete dynamic domains, reasoning about the model, and planning, with the aim of inferring new knowledge from the model and synthesizing strategies that guarantee achieving a desired goal. The part on automated learning (3 CFUs) concerns the basics of machine learning, including simple approaches to regression, classification, clustering, and their application to to sequential decision making, in possibly continuous domains, through basic approaches in Reinforcement Learning
Schedule. Lectures will take place in Room 41, Via delle Sette Sale 29, starting Wednesday, Feb 26, 2025, as per the following schedule:
Wednesday 8:00-12:00
Thursday 13:00-15:00
Friday 8:00-10:00
Classroom. For communication, we will also use Google Classroom (registration code: fbbqge3). Please enrol ASAP!
Student hour. See here.
Exam Program.
The course is designed for 9 and 6 CFUs. Topics marked with (*) will be included in the exam program for 9 CFUs.
Students taking 6 CFUs are welcome to attend all the lectures.
Artificial Intelligence (6 CFUs):
Introduction
Knowledge Representation: modeling the domain of interest; enabling autonomy; the role of logic.
Propositional Logic: syntax and semantics; evaluation, satisfiability, validity, logical implication; propositional tableaux; DPLL.
First-Order Logic: syntax, semantics; evaluation, satisfiability, validity, logical implication; FO tableaux.
Classical Planning: deterministic domains; STRIPS, ADL, PDDL, transition systems, forward search, Heuristics, Best-first, A*
(*)Contingent Planning (FOND): nondeterministic domains, PDDL with oneof operator, nondeterministic planning by adversarial search, search in AND-OR Graphs
(*)Reasoning about Actions: modeling (discrete) dynamic domains, action preconditions, effects, the frame problem.
(*)Situation Calculus: precondition and successor-state axioms; situation tree; regression; executability and projection.
Machine Learning (3 CFUs):
Introduction
Supervised Learning:
Linear Regression: problem definition, normal equation, gradient descent (GD), stochastic gradient descent (SGD)
Linear Classification
Neural Networks: FNN, training via SGD, backpropagation, CNN
Unsupervised Learning: K-means, hierarchical clustering
Reinforcement Learning: MDPs, value- and Q-functions, value/policy iteration, Bellman's equation, Q-learning, DQN, replay memory.
Teaching Material.
Textbooks:
[1] Artificial Intelligence: A Modern Approach, Global Edition, 4th Edition by Stuart Russell, Peter Norvig, Pearson 2020 (selected chapters).
[2] Reinforcement Learning: An Introduction, 2nd Edition by Richard S. Sutton and Andrew G. Barto. MIT Press, Cambridge, MA, 2018. (selected chapters). Freely available here.
[3] Understanding Deep Learning, Simon J.D. Prince, The MIT Press. Freely available here.
[4] Slides and additional material:
Lecture Log.
Exams.
The exam consists of 2 parts:
AI: written exam (2h for those taking 9 CFUs, 1h 30m for those taking 6 CFUs)
ML: home project
The final mark of the exam is obtained as a weighted average of the two parts (ML: 1/3, AI: 2/3) and can be registered only when both parts have been passed. The mark for each part is valid for the entire A.Y., until the session of March/April 2025, included. After then, all marks will be cleared.
ML Projects.
ML Projects can be carried out in team of max 2 people, consist in implementing a Reinforcement Learning Agent based on Q-learning, and must implement two approaches:
Tabular Q-learning
Deep Q-Network (DQN), in its simplest form (using a single NN to approximate the Q-function)
Other approaches can be also implemented (e.g., double DQN), but the two above are mandatory.
Any environment can be used (even one developed as part of the project itself), but using one already available, such as those from Gymnasium, is recommended.
Projects must be approved by the teacher before being submitted and presented! Ask for confirmation via email before starting to work on it.
Projects can be submitted at any time through this form and must be uploaded before discussion. The submission must consist in a single .zip file named <matricola-lastname>.zip (e.g., 1234567-patrizi.zip) containing:
(mandatory) A pdf report describing: the problem addressed, the solution adopted, the experimental results, and the architecture of the implementation.
(mandatory) The source files (no links to Colab, Jupiter files, external repositories, etc.), collected in a single dir named src.
Optionally, to facilitate the presentation, a Colab notebook (or similar) can be linked. The content of the notebook must be the same as that of sources, which must be submitted anyway.
Discussions will take place as per the calendar below. Every project will be discussed separately with all team members. Every member is required to have full knowledge and understanding of every aspect of the project.
Exam Sessions.
First session:
Date, Room, Time:
Jun 10, 2025, 8.30, Room 204, 105 (we meet in 105), Marco Polo Building (Viale dello Scalo S. Lorenzo, 82)
If you want to discuss the exam, please register for student hour of Jul 1, 2025.
Mark Acceptance (only for those who have passed both parts):
Please fill this form by Jul 3, 2025 (if you want to reject, do not fill the form)
ML Project discussion:
Second session:
Date, Room, Time:
Jul 15, 2025, 8.30, Room 108, Marco Polo Building (Viale dello Scalo S. Lorenzo, 82)
ML Project discussion:
Mark Acceptance (only for those who have passed both parts):
Please fill this form by Jul 25 (if you want to reject, do not fill the form)
Third session:
Date, Room, Time:
Sep 10, 2025, 8.30, Room 105, Marco Polo Building (Viale dello Scalo S. Lorenzo, 82)
ML Project discussion:
Mark Acceptance (only for those who have passed both parts):
Please fill this form by Aug 5 (if you want to reject, do not fill the form)
Special session (appello straordinario):
Important: to take the exam in this session you need to formally conform to the following regulation (double check with administration if in doubt): "Riservata a studenti part-time, fuori corso nell’A.A. 2023-2024, studenti genitori, studenti lavoratori, studenti con disabilità e con D.S.A."
Date, time, Room: TBA
ML Project discussion: TBA
Mark Acceptance (only for those who have passed both parts):
Please fill this form by TBA (if you want to reject, do not fill the form)
Fourth session:
Date, time, Room: TBA
ML Project discussion: TBA
Mark Acceptance (only for those who have passed both parts):
Please fill this form by TBA (if you want to reject, do not fill the form)
Fifth session:
Date, time, Room: TBA
ML Project discussion: TBA
Mark Acceptance (only for those who have passed both parts):
Please fill this form by TBA (if you want to reject, do not fill the form)
Special session (appello straordinario):
Important: to take the exam in this session you need to formally conform to the following regulation (double check with administration if in doubt): "Riservata a studenti part-time, fuori corso, iscritti per l’A.A. 2022-2023 al terzo anno della laurea e al secondo anno della laurea magistrale, studenti genitori, studenti lavoratori, studenti con disabilità e con D.S.A."
Date, time, Room: TBA
ML Project discussion: TBA
Mark Acceptance (only for those who have passed both parts):
Please fill this form by TBA (if you want to reject, do not fill the form)