====== Foundations of Artificial Intelligence ======
===== Watch the page =====
You can “subscribe” to any page on the wiki and you’ll get an email message whenever the page has changed.
To do that, click the [[https://www.inf.unibz.it/~franconi/space/doku.php?id=teaching:is:main_is&do=subscribe|Manage Subscriptions]] link.
===== Official course presentation form =====
* The course {{ :teaching:is:foundations_of_artificial_intelligence_24-25.pdf |presentation form}}.
===== Timetable =====
The official week-by-week Faculty timetable: [[https://www.unibz.it/en/timetable/?searchByKeywords=Foundation+of+Artificial+Intelligence&sourceId=unibz&department=224°ree=13778%2C13995&studyPlan=18928%2C19687&fromDate=2025-03-04&toDate=2025-07-31|lectures and labs]] of the course.
Note that a LAB slot may be transformed into a LECTURE slot and vice-versa, and this will be decided week by week; lectures and labs have equal importance.
Office hours: anytime, by previous appointment by email to the lecturer ([[mailto:franconi@inf.unibz.it|Enrico Franconi]]).
In any case the lecturer is always available for the period after any lecture.
Some lectures and labs may be available on Microsoft Teams.
=====Language used in the course=====
* Exclusively English.
===== Textbook =====
* **Main book**: David Poole and Alan Mackworth. //[[https://artint.info/|Artificial Intelligence: Foundations of Computational Agents]]//. Cambridge University Press, 2023, 3rd edition 2017. The book is fully available online.
* //Auxiliary book//: Stuart Jonathan Russell and Peter Norvig. //Artificial Intelligence: A Modern Approach//. Prentice Hall, 4th edition 2020.
* Reading list from the UniBZ Library: [[https://eu.alma.exlibrisgroup.com/leganto/readinglist/lists/29916890000001241| Artificial Intelligence / Artificial Intelligence: Foundation of Artificial Intelligence]]
===== Slides & Reference Material =====
/* red means material not done this year. */
The following is the standard material, it may be adjusted during the course.
/* The striked-through text (i.e., text) corresponds to parts not done this year. */
* Slides: {{ :teaching:is:lect.1.0.pdf |Welcome Aboard}}
* Slides: Artificial Intelligence and Agents {{ :teaching:is:ai-new-lect.1.0.pdf |parts 1 & 2}}, {{ :teaching:is:lect_01_3_h.pdf |part 3}}, {{ :teaching:is:lect_01_4_h.pdf |part 4}}, {{ :teaching:is:lect.2.1.pdf |part 5}}
* Material: {{https://artint.info/3e/html/ArtInt3e.Ch1.html|chapter 1}} and {{https://artint.info/3e/html/ArtInt3e.Ch2.html|chapter 2}} of //Poole and Mackworth//
* Slides: States and Searching {{:teaching:is:lect.3.1.pdf|part 1}}, {{:teaching:is:lect.3.2.pdf|part 2}}, {{:teaching:is:lect.3.3.pdf|part 3}}, {{:teaching:is:lect.3.4.pdf|part 4}}
* Material: {{https://artint.info/3e/html/ArtInt3e.Ch3.html|chapter 3}} of //Poole and Mackworth//
* Slides: Features and Constraints {{:teaching:is:lect.4.1.pdf|part 1}}, {{:teaching:is:lect.4.2.pdf|part 2}}
* Material: chapter 4 of //Poole and Mackworth//
* Slides: Propositions and Inference {{:teaching:is:lect.5.1.pdf|part 1}}, {{:teaching:is:lect.5.2.pdf|part 2}}, {{:teaching:is:lect.5.3.pdf|part 3}}, {{:teaching:is:lect.5.4.pdf|part 4}} \\ Slides: Diagnosis {{:teaching:is:lect.5.5.pdf|part 1}}, {{:teaching:is:lect.5.6.pdf|part 2}}, {{:teaching:is:lect.5.7.pdf|part 3}}, {{:teaching:is:lect.5.8.pdf|part 4}}, {{:teaching:is:lect.5.9.pdf|part 5}}
* Material: chapter 5 of //Poole and Mackworth//
* Slides: Deterministic Planning {{ :teaching:is:lect.8.1 v4.pdf |part 1}}, {{ :teaching:is:lect.8.2 v4.pdf |part 2}}, {{ :teaching:is:lect.8.3 v4.pdf |part 3}}, {{ :teaching:is:lect.8.4 v4.pdf |part 4}}
* Material: chapter 6 of //Poole and Mackworth//
/* * Slides: Multiagent Systems and Games {{ :teaching:is:lect.10.1_v4.pdf |part 1}}
* Material: chapter 10 of //Poole and Mackworth// */
* Slides: Individuals and Relations {{:teaching:is:lect.12.1.pdf|part 1}}, {{:teaching:is:lect.12.2.pdf|part 2}}, {{:teaching:is:lect.12.3.pdf|part 3}}, {{:teaching:is:lect.12.4.pdf|part 4}}
* Material {{http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_276.html|chapter 12}} of //Poole and Mackworth//
* Slides: {{:teaching:is:lect.12.nl.pdf| Natural Language Understanding}}
* Material {{http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_276.html|chapter 12}} of //Poole and Mackworth//
* Slides: Supervised learning and Decision Trees: {{ :teaching:is:lect1.pdf |part 1}}, {{ :teaching:is:lect2_ef.pdf |part 2}}, {{ :teaching:is:lect3_ef.pdf |part 3}}.
* Material {{http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_169.html|chapter 7}} of //Poole and Mackworth//.
* Slides: {{:teaching:is:lezione_machine_learning_bz_7_6_2019.pdf |Introduction to Machine Learning}}
===== Lab =====
* LAB 1: Graph Searching with uninformed techniques ({{ :teaching:is:search_applet.zip |Java applet}})
* Manuals:
* {{ :teaching:is:search_1_-_quick_start.pdf |Quick start}}
* {{ :teaching:is:search_2_-_general_help.pdf |General Help}}
* Tutorial 1: {{ :teaching:is:search_3_-_tutorial_1.pdf |Creating a New Graph}} with [[http://aispace.org/search/help/CreateASearchGraph.avi|video]]
* Tutorial 2: {{ :teaching:is:search_4_-_tutorial_2.pdf |Loading a Preexisting Graph}}
* Tutorial 3: {{ :teaching:is:search_5_-_tutorial_3.pdf |Solving a Graph}} with [[http://aispace.org/search/help/SolveASearchGraph.avi|video]]
* Tutorial 4: {{ :teaching:is:search_6_-_tutorial_4.pdf |Search Options}}
* Explore with the search applet the **Delivery Robot (Acyclic)**, the **Delivery Robot (cyclic)**, the **Vancouver Neighbourood**, the **Module 4** sample problem graphs: with //Depth First//, //Breadth First//, //Lowest Cost First// search strategies using different //Neighbour Ordering Strategies//; practice also with the //quiz// facility.
* Do the [[http://www.aispace.org/exercises.shtml|Practice Exercise]] 3.B.
* Exercise: practicing different search strategies with the graph in this {{teaching:is:search_bf_df_lcf.pdf|slides}} ({{ :teaching:is:search-problem.xml.zip |solution}} as a XML file for the applet)
* Create your own problem graph for a delivery robot starting from a map with edge costs.
* Create a problem graph for a simple problem chosen by you.
* IMPORTANT: learn how to write on paper the frontier evolution for each search.
* describe a search on a graph by writing the frontier (i.e., a set of paths) at each step of the search, and by specifying the selected path from the frontier in one step leading to the next step.
* LAB 2: Graph Searching with Heuristics
* Explore the **Delivery Robot (Acyclic)**, the **Delivery Robot (cyclic)**, the **Vancouver Neighbourood**, the **Module 4** sample problem graphs: with //Best First, Heuristic Depth First, A*, Branch and Bound// search strategies, with or without //Multiple-Path Pruning// or //Loop Detection//, using different //Neighbour Ordering Strategies//. Explore also the behaviour with the abovementioned search graphs with potentially non terminating depth first strategies (e.g., //Depth First// or //Heuristic Depth First//) without cycle checking, and with loop detection or multiple path pruning.
* Do the [[http://www.aispace.org/exercises.shtml|Practice Exercises]] 3.C, 3.D, 3.E.
* Exercise: [[http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_71.html|3.4]]([[teaching:is:heuristics-solution|solution]]).
* IMPORTANT:
* learn how to write on paper the frontier evolution for each search;
* check whether the heuristics are admissible and monotone.
* LAB 3: Constraints - Consistency
* [[http://aispace.org/constraint/|Consistency Based CSP Solver]] ({{:teaching:is:constraint.jar.zip|applet}}):
* Explore with the CSP applet the sample problems: Simple Problem 1, Simple Problem 2, Scheduling Problem 1, Crossword Problem 1, Crossword Problem 2. These sample problems have been seen already in the course lectures; for the crossword problems, try to reconstruct the crossword graphical structure.
* Do the [[http://www.aispace.org/exercises.shtml|Practice Exercises]] 4.A, 4.B.
* Exercises: [[http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_99.html|4.2, 4.3 (only a,b), 4.5]] - CSP and arc consistency ([[teaching:is:csp-solutions|solutions]]).
* LAB 5: Propositions and Inference
* Getting started with [[https://artint.info/code/ailog/ailog_man.html|AILog2]], a representation and reasoning system for definite clauses, with declarative debugging tools.
* Download the file [[https://artint.info/code/ailog/ailog2.pl|ailog2.pl]], install and launch [[https://www.swi-prolog.org/download/stable|SWI Prolog]], and load (consult) AILog2 in Prolog:
* Windows: ?- consult("C:\\path-to-file\\ailog2.pl").
* Mac: ?- consult('/path-to-file/ailog2.pl').
* Go through the [[https://artint.info/code/ailog/ailog_man.html|AiLog2 manual]], from Section 1 to Section 6.
* To load a knowledge base file from AILog2:
* Windows: ailog: load 'C:\\path-to-kbfile\\kbfile.ail'.
* Mac: ailog: load '/path-to-kbfile/kbfile.ail'.
* Play with the [[https://artint.info/code/ailog/ailog_code/ch05/elect_prop.ail|elect_prop.ail]] electrical wiring example 5.7 from Section 5.3 of the book and the slides.
* Do Exercises [[http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_137.html|5.1, 5.2, 5.3, 5.4]] ([[teaching:is:prop-rules-solutions|solutions]])
* Find other AILog knowledge base examples[[https://www.cs.ubc.ca/~poole/aibook/code/ailog/ailog_code/ailog_code.html|here]] (play with askable and debugging)
* LAB 6: Assumables and Consistency-based Diagnosis
* Excercises {{ :teaching:is:exercise_5.9_5.13.pdf |5.9 and 5.13}} and {{ :teaching:is:exercise_5.17.pdf |5.17}}. \\ Use [[https://artint.info/code/ailog/ailog_man.html|AILog2]] to verify the correctness of your answers; AILog2 can assert assumables (see [[https://www.inf.unibz.it/~franconi/teaching/artint.info/code/ailog/ailog_man_14.html|manual]]), and can ask for the derivation of the false atom. \\ ([[teaching:is:assumables-solutions|solutions]])
* LAB 7: Debug, Diagnosis /*, Abduction */
* Keep using [[https://artint.info/code/ailog/ailog_man.html|AILog2]]
* Go through Sections 6, 7, 9 of the [[http://www.inf.unibz.it/~franconi/teaching/artint.info/code/ailog/ailog_man.html|manual]]
* Play with the following knowledge bases:
* [[http://www.inf.unibz.it/~franconi/teaching/artint.info/code/ailog/ailog_code/ch05/elect_ask.ail|elect_ask.ail]] electrical wiring example with askables; Example 5.10 from [[http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_113.html|Section 5.3.2]]
* [[http://www.inf.unibz.it/~franconi/teaching/artint.info/code/ailog/ailog_code/ch05/elect_bug.ail|elect_bug.ail]] the buggy electrical wiring knowledge base from Example 5.14 in [[http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_118.html|Section 5.3.4.1]]
* [[http://www.inf.unibz.it/~franconi/teaching/artint.info/code/ailog/ailog_code/ch05/elect_bug2.ail|elect_bug2.ail]] the buggy electrical wiring example from Exercise 5.6
* [[http://www.inf.unibz.it/~franconi/teaching/artint.info/code/ailog/ailog_code/ch05/elect_bug3.ail|elect_bug3.ail]] a buggy electrical wiring example, which fails to prove lit_l2, but should succeed
* [[http://www.inf.unibz.it/~franconi/teaching/artint.info/code/ailog/ailog_code/ch05/elect_cbd.ail|elect_cbd.ail]] electrical wiring example for consistency-based diagnosis; Example 5.20 in [[http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_124.html|Section 5.4.3]] /*
* [[http://www.inf.unibz.it/~franconi/teaching/artint.info/code/ailog/ailog_code/ch05/elect_abd.ail|elect_abd.ail]] electrical wiring example with abduction; Example 5.31 in [[http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_133.html|Section 5.6]] */
* Exercises: [[http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_137.html|5.5, 5.6, 5.7]] ([[teaching:is:diag-rules-solutions|solutions]])
* LAB 8: Planning with Certainty
* Do {{ :teaching:is:ex_strips.pdf |Practice Exercise 8.A}} and {{ :teaching:is:ex_csp_planning.pdf |Practice Exercise 8.B}} /* ({{ :teaching:is:ex_strips_sol.pdf |Practice Exercise 8.A solution}} and {{ :teaching:is:ex_csp_planning_sol.pdf |Practice Exercise 8.B solution}}). */
* Using the {{ :teaching:is:stripstocsp.jar.zip |STRIPS-to-CSP applet}} exercise with the coffee delivery problems (simple and complete) pre-loaded on the applet - [[https://aispace.org/strips_to_csp/|tutorial]]
* NOTE: the translator from STRIPS to CSP is buggy: use {{:teaching:is:delivery-simple-csp_fixed.zip|this file}} as an example of a STRIPS definition for the simple delivery problem with its corresponding CSP version; use the {{:teaching:is:constraint.jar.zip|CSP applet}}
* understand the role of of all the variables and constraints
* find the original STRIPS definition from the CSP version of it
* find **all** the plans giving a (partial) starting state, or giving a (partial) end state, or both, with an horizon of 3.
* LAB 9: Individuals and Relations
* Keep using [[https://artint.info/code/ailog/ailog_man.html|AILog2]]
* Go through Section 8 of the [[http://www.inf.unibz.it/~franconi/teaching/artint.info/code/ailog/ailog_man.html|manual]]
* Understand the bottom-up and top-down derivations with the relational representation of the [[https://artint.info/code/ailog/ailog_code/ch12/elect_relational.ail|electrical environment]] and with the [[https://artint.info/code/ailog/ailog_code/ch12/before.ail|AM and PM time representations]]
* Do the following exercises (you may use the AILog2 KBs listed in the [[https://artint.info/online.html|resources for Chapter 12]]):
/* * [[http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_308.html|12.1,12.2]] (model theory) */
* [[http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_308.html|12.3]] (bottom-up derivation)
* [[http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_308.html|12.4,12.5,12.6]] (top-down derivation) with the [[https://artint.info/code/ailog/ailog_code/ch12/west.ail|knowledge base about rooms]]
* [[http://www.inf.unibz.it/~franconi/teaching/artint.info/html/ArtInt_308.html|12.8,12.9,12.14]] (SLD-resolution with functions) /*do also 12.15*/
* ([[teaching:is:ind-solutions|solutions]] to all exercises)
=====Final Exam=====
The exam paper will contain problem solving, verification, and transfer of knowledge questions, where you have to apply the techniques, the theory, and the basic principles of the technologies studied during the course to concrete examples. There will be no pure theory question.
The exam is evaluated based on correctness of answers, clarity of answers, ability to summarise, evaluate, and establish relationships between topics, skills in critical thinking, quality of argumentation, problem solving ability.
The questions will be mirroring the exercises done in the lab and the exercises from the main course book.
Answers to questions should be formulated precisely and completely, of course. Regarding the topic that have been done during the lab using simulation software, the written answer in the exam paper should contain the information relevant to the question as it would be provided by the simulation, and as it is discussed in the book and during the lectures and labs. You can bring your own written notes to the exam, and nothing else.
No "mock" exam paper is provided, given the quite simplifying specifications given above.
**Modular Course**
This course, //Foundations of Artificial Intelligence//, is the module 1 within the //Artificial Intelligence// course, which includes also the module 2 //Machine Learning in Practice//.
There is formally a unique final exam for the //Artificial Intelligence// course: the exam covers the topics addressed in //module 1// and //module 2// and consists of two parts, one for each module, and each one counting 50% of the final grade. In order pass the exam, the students should get at least 18/30 in each part. A student may take the two parts of the exam in different sessions; a positive evaluation of one part remains valid for all three regular exam
sessions of the academic year.