

















































































Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!


















































































LESSON 2 (CH. 1 BODEN + insights on Logic Theorist and Perceptron)
Presentation based on Chapter 1 of M. Boden’s book
Definition: Artificial Intelligence (AI) deals with getting computers to perform tasks that normally require human abilities such as reasoning and perception. Involved skills: perception, prediction, planning, motor control.
AI is applied everywhere: from self-driving cars to military drones, and in homes, offices, and hospitals.
● AI objectives: technological and scientific
● AI relationships: with mind and brain sciences, biology (artificial life), and philosophy
Concept of a virtual machine: not a physical hardware device, but an information-processing system imagined by the programmer.
Examples: word-processing systems, neural networks that process information in parallel.
Focus on events and causal relations in software, not hardware.
A virtual machine is implemented on a physical computer.
Mind implemented on the brain.
Characteristics:
● Interaction with the real world: virtual machines cause changes in the world through physical input/output, such as cameras and robotic hands.
● Programming languages: translation of high-level code into machine code.
● Virtual machines in the brain: the human mind can also be understood as a virtual machine.
The way information is processed depends on the type of virtual machine involved. (Boden 2016, p.11)
● Classical/Symbolic AI (GOFAI): uses symbols to represent concepts and perform logical operations.
● Artificial neural networks (connectionism): learning model based on connections between artificial neurons.
● Evolutionary programming: based on evolutionary principles for problem-solving.
● Cellular automata: computational models of living organisms.
● Dynamic systems: model systems that change continuously.
For scientific purposes: different ways of modeling learning, reasoning, evolution, biology, brain development, and the development of biological organisms.
Hybrid AI: combination of symbolism and connectionism to explain human action.
Sensorimotor devices: integrate robotics, neural networks, and evolutionary programming.
Ada Lovelace’s vision (1840): AI based on symbols and logic, capable of composing music and representing nature.
Babbage’s Analytical Engine: equivalent to a general digital computer representing all objects of the universe.
Limits of the prediction: Lovelace did not foresee neural networks or evolutionary programming.
Turing Machine (1936): theoretical system for any kind of computation, which inspired AI.
Intelligent systems: Turing wanted models that would imitate the processes of human minds.
Modeling with neural networks: McCulloch and Pitts (1943) developed logical neural networks to simulate learning.
Target theorem: (p → q) → (¬q → ¬p)
Idea: to prove (p → q) → (¬q → ¬p), the program sets two sub-goals:
● (i) p → q and (ii) ¬q → ¬p to be linked through MP.
It considers axiom schemata of Principia Mathematica as “guides” to generate useful instances.
The system builds chains of axioms and MP applications that reduce the syntactic “distance” from the target.
LT uses a “difference function” between the current formula and the target formula (number of symbols or structures to align).
At each step, it selects the operation (substitution, axiom application) that maximizes the reduction of the difference.
Search with backtracking: if a choice doesn’t yield sufficient reduction, the system backtracks and tries alternatives.
Effect: enormous pruning of the search space compared to brute force.
● Demonstrates that heuristic procedures can guide automatic theorem proving.
● Historical results: the program reproduced Principia Mathematica proofs and found a shorter proof for one theorem.
● Opened the path to GPS (General Problem Solver) and, more generally, to symbolic AI as search in problem spaces.
● Classic case study to explain goal stacks, sub-goals, and heuristic-driven choices.
The term “cybernetics” was coined by Norbert Wiener (1948).
McCulloch and Wiener: cybernetics as the study of biological self-organization and teleology.
Key concepts: circular causation, feedback, and goal orientation.
Von Neumann and cellular automata: systems that replicate themselves autonomously, inspired by DNA.
Example: Game of Life.
Ross Ashby’s Homeostat: theory of dynamic adaptation, both within the body (including the brain) and between body and environment, in trial-and-error learning and adaptive behavior.
Grey Walter and his “turtle robots”: pioneers of autonomous robotic behavior (light-seeking, obstacle avoidance, and associative learning through conditioned reflexes).
Split between AI and cybernetics (1960s): division between those studying the mind (symbolic AI) and those studying life and behavior (cybernetics).
Criticism of connectionist systems: Minsky and Papert reduced interest in neural networks — the so-called Brain Wars.
Equation of the perceptron: variables and scheme.
A single-layer perceptron computes a linear combination of inputs and decides based on a threshold.
Geometrically, it draws a hyperplane that divides the space into two classes.
It can therefore learn only linearly separable functions.
Minsky and Papert (1969) showed that functions like XOR are not linearly separable.
The space is divided into two regions: one side is class 1, the other class 0.
This works for functions like AND and OR , but not for XOR.
In their book Perceptrons , Minsky and Papert demonstrated the limitations of single-layer perceptrons (unable to compute XOR and similar functions).
This result was interpreted as proof of the low usefulness of neural networks.
Connectionist research lost interest and funding.
Thus began the so-called “AI winter” of the 1970s: a period of slowdown in AI research.
In the 1980s, with the development of backpropagation algorithms , it became possible to train multi-layer neural networks.
Multilayer perceptrons (MLPs) overcame the limits identified by Minsky and Papert.
This led to a revival of neural networks , paving the way for deep learning.
Today, neural networks are at the center of modern AI applications (computer vision, NLP, generative models).
In the 1980s, with PDP (Parallel Distributed Processing) , neural networks regained prominence, with new hybrid systems combining symbolic AI and deep learning.
Planning
Organize sequences of actions to solve complex problems.
Mathematical Simplification
Reduce complex problems into more manageable forms.
Heuristics and Planning
● Heuristics: do not always guarantee success, but reduce brute-force search. ● Planning: used in complex contexts such as military and industrial logistics.
Modern AI goes beyond the simple plans of the past.
What Are Heuristics in AI?
Heuristics are practical rules used to make quick decisions without exploring every possibility.
They are used in many areas of artificial intelligence to solve complex problems.
A common example is found in algorithms for the game of chess.
Example: “Protect Your King” Heuristic
Context: chess is a complex environment with an enormous number of possible moves.
Objective: avoid exploring all possible moves, focusing instead on those that protect the King.
Rule: the algorithm evaluates the King’s safety in every move.
Operation of the Heuristic
Rule : Protect your King.
Each move is evaluated based on the level of risk to the King.
If a move exposes the King to greater danger, it is penalized.
Moves that increase the King’s safety are preferred.
Concrete Example
● Move A: Move the queen to attack an opponent’s piece but leave the King exposed.
● Move B: Move the rook to protect the King from a possible attack.
Result:
The heuristic suggests choosing Move B , since it protects the King.
Even if Move A might seem advantageous for attack, the King’s defense takes priority.
Advantages of Using Heuristics
● Efficiency: reduces the need to calculate every possible move.
● Speed: decisions are made more quickly.
● Flexibility: the heuristic adapts to many situations without requiring complex calculations.
Heuristics
Heuristics such as “Protect Your King” are fundamental to making AI algorithms efficient.
They allow avoiding the “brute-force search” of all possibilities, focusing instead on strategic decisions.
Even though they don’t always guarantee the best move, they increase overall efficiency.
Deep Blue
“IBM’s chess program Deep Blue, which made great headlines by defeating world champion Garry Kasparov in 1997, used dedicated hardware chips that processed 200 million positions per second, generating every possible move up to eight moves ahead. However, it had to use heuristics to select the ‘best’ move among those generated. And since its heuristics were not reliable, even Deep Blue did not manage to beat Kasparov every time.” (Boden 2016, p.28)
Planning is essential in many areas, including military and logistics.
AI plans sequences of actions to achieve goals, managing sub-goals.
Examples of Planning
Military logistics: during the Iraq war, AI saved billions in logistics management.
Everyday planning: packing a suitcase involves planning actions to gather everything needed.
● Action 4: Pour the pasta into the boiling water.
Sub-goal 3: Prepare the Sauce
Heat oil in a pan. Add garlic and tomatoes. Cook over low heat for 10 minutes.
Detailed planning: heating the oil
● Action 5: Pour oil into the pan.
● Action 6: Turn on the stove at medium heat.
Sub-goal 4: Combine Pasta and Sauce
Add the drained pasta to the pan with the sauce. Mix well to blend the seasoning.
Detailed planning: combining pasta and sauce
● Action 7: Drain the pasta, leaving a bit of cooking water.
● Action 8: Transfer the pasta to the pan with the sauce.
● Action 9: Add a spoonful of cooking water to blend better.
● Action 10: Stir vigorously until the seasoning is homogeneous.
Advantages of Planning in AI
● Efficiency: avoids redundant steps and coordinates actions.
● Adaptability: if something goes wrong (e.g., missing ingredients), AI can readjust the plan.
● Parallelism: planning allows handling multiple sub-goals simultaneously (e.g., while water boils, the sauce is prepared).
Rule-based programs represent knowledge as a set of “if–then” rules.
This method was the foundation of early expert systems in the 1970s.
How Rule-Based Programs Work
Each rule waits to be “triggered” by the appropriate condition.
They do not specify a fixed execution order but can perform planning indirectly.
Rule-Based Program: Cooking Pasta with Tomato Sauce
A rule-based program uses logical “IF–THEN” structures.
The rules guide the robot’s actions in sequence according to certain conditions.
In this example, the robot cooks a dish of pasta with tomato sauce.
Rule 1: Boil the Water IF: The water is not boiling THEN: Boil the water.
● Action: Fill the pot with water.
● Turn on the stove.
● Wait until the water reaches boiling point.
Rule 2: Cook the Pasta IF: The water is boiling THEN: Add the pasta and cook it.
● Action: Pour the pasta into the boiling water.
● Cook for the required time (use a timer).
● Drain the pasta.
Rule 3: Prepare the Sauce IF: The sauce is not ready THEN: Prepare the sauce.
● Action: Heat oil in a pan.
● Add garlic and tomatoes.
● Cook over low heat for 10 minutes.
Rule 4: Combine Pasta and Sauce IF: The pasta is cooked and the sauce is ready THEN: Combine the pasta with the sauce.
Advantages of Rule-Based Programs
● Simplicity: clear and understandable rules, easy to modify.
● Modularity: new rules can be added without rewriting the program.
● Clarity: each rule represents a single logical decision.
● Adaptability: the robot can make decisions based on the current state of conditions.
Mathematical simplification builds unrealistic but manageable search spaces.
It is often used to reduce computational complexity.
Examples of Mathematical Simplification
i.i.d. Hypothesis: assumes that data are independent and identically distributed.
This type of assumption simplifies probabilistic calculations and makes the search space easier to handle.
Knowledge Representation
Properly representing knowledge is one of AI’s main challenges.
Information must be presented in a way that the system can “understand” and process it.
Methods of Knowledge Representation: Frames
Frames : hierarchical structures to describe objects and situations.
Methods of Knowledge Representation: Semantic Networks
Semantic networks: connect concepts through logical relations such as synonymy and hypernymy.
Semantic networks and practical use:
An example is WordNet, which organizes knowledge into networks of synonyms and semantic relations.
Semantic networks are used in fields such as machine translation and natural language recognition.
The frame problem concerns the difficulty of representing all the consequences of an action in an AI system.
It is a key issue for achieving AGI (artificial general intelligence).
Introduction to the Frame Problem
The frame problem in AI concerns the difficulty of understanding context in new and unforeseen situations.
A classic example is when a system cannot distinguish between relevant and irrelevant information in an unprogrammed situation.
Practical Example
Consider a robot that has to clean a room. If it encounters a broken glass on the floor, it might not know how to handle it.
This is because it has not been programmed to recognize the difference between ordinary dirt and fragile or dangerous objects.
Intelligent agents collaborate to solve complex problems autonomously.
Distributed cognition refers to the distribution of knowledge among various agents without centralized control.
Machine learning allows systems to learn from data and evolve their abilities over time.
There are three main types of learning: supervised, unsupervised, and reinforcement (we will see these better in the next lessons).
Generalist systems are designed to solve a wide range of tasks, not just specific ones.
AGI requires general capabilities, which remain extremely difficult to achieve.
NLP (Natural Language Processing): AI dealing with the understanding and generation of human language.
Language recognition is easier than generation.
Main challenges: grammar and semantic relevance.
Examples:
● SHRDLU (Terry Winograd): an AI program from the 1970s.
● Link SHRDLU: https://www.youtube.com/watch?v=QAJz4YKUwqw
Apple’s Siri: virtual assistant.
Terry Winograd (MIT, 1970–72): system for understanding and generating natural language.
Operated in a “blocks world”: responded to commands such as “Put the red cube on top of the green block” or questions like “Which block is not touching any other block?”.
Based on grammatical rules, syntactic analysis, and predicate logic.
Demonstrated the potential of human–machine dialogue, but with limits (it worked only in restricted domains).
Comparison:
● SHRDLU → accuracy in closed contexts, symbolic AI.
● Modern assistants (Siri, Alexa, ChatGPT) → management of open language, based on machine learning and large language models.
In early years, AI relied on complex syntactic analyses (e.g., SHRDLU).
Today, the focus shifts to context and semantic relevance.
Examples: automatic translation with Google Translate.
Progress due to Deep Learning: use of large datasets to understand linguistic patterns. Deep Learning on Wikipedia.
Deep Learning has revolutionized NLP.
Advanced examples:
● Google Translate: translation in over 100 languages.
● IBM Watson: used for complex questions, such as the Jeopardy! quiz.
...we will explore this further with the advent of LLMs.
Computers perform statistical analysis on large text collections (corpora).
The goal is to identify lexical patterns, both predictable and unexpected.
AIs learn probabilities between concepts (e.g., fish/water, fish/tadpole).
Construction of word vectors to represent probabilistic meanings.
The focus is mainly on words and phrases, less on syntax.
Grammar is considered, but syntactic analysis is rarely used.
Before deep learning, NLP was based on component pipelines:
● Tokenization: splitting text into minimal units (words, subwords, punctuation).
● POS tagging: assigning grammatical categories (noun, verb, adjective) to each token.
● Parsing: analyzing the syntactic structure of sentences to represent grammatical relations.
● Feature engineering: manual design of numerical indices (length, frequency, context) to feed models.
Statistical models: algorithms like n-gram, HMM, SVM, or logistic regression estimated sequence probabilities or classified texts based on features.
Limit: fragile systems, highly task-specific, unable to generalize to new domains.