







































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!








































(Approximate Length: 50-60 Pages Total)
1.1.1 Defining Intelligence (Human vs. Artificial) 1.1.2 The Four Approaches to AI (Acting Humanly, Thinking Humanly, Acting Rationally, Thinking Rationally) 1.1.3 The Main Goals of AI (Reasoning, Problem-Solving, Learning, Perception, Language)
1.2.1 Philosophical Roots and Early Concepts (Leibniz, Hobbes) 1.2.2 The Dartmouth Workshop (1956) and the Coining of the Term "AI" 1.2.3 Early Breakthroughs (Perceptron, ELIZA, Shakey the Robot) 1.2.4 The First AI Winter (Late 1970s) 1.2.5 The Rise of Expert Systems (1980s) 1.2.6 Key Victories (Deep Blue vs. Kasparov, IBM Watson on Jeopardy!) 1.2.7 The Deep Learning Revolution (2010s to Present) 1.2.8 Generative AI and Large Language Models (LLMs)
1.3.1 Based on Capability (Narrow/Weak AI, General/Strong AI, Superintelligence/ASI) 1.3.2 Based on Functionality (Reactive, Limited Memory, Theory of Mind, Self-Aware)
2.1.1 Definition and Core Concepts (Hypothesis, Model, Cost Function) 2.1.2 Data Preprocessing (Cleaning, Normalization, Feature Engineering)
2.2.1 Supervised Learning (Classification, Regression) 2.2.2 Unsupervised Learning (Clustering, Dimensionality Reduction) 2.2.3 Reinforcement Learning (Agent, Environment, Reward, Policy)
2.3.1 Linear Regression and Logistic Regression 2.3.2 Decision Trees and Random Forests 2.3.3 Support Vector Machines (SVM) 2.3.4 K-Nearest Neighbors (KNN)
2.4.1 Bias-Variance Tradeoff 2.4.2 Cross-Validation Techniques 2.4.3 Performance Metrics (Accuracy, Precision, Recall, F1 Score, ROC/AUC)
Chapter 3: Deep Learning and Neural Networks
(Target: 10-12 Pages)
3.1.1 Biological Inspiration and Artificial Neurons 3.1.2 Feedforward Networks (Input, Hidden, Output Layers) 3.1.3 Activation Functions (Sigmoid, ReLU, Tanh)
3.2.1 Gradient Descent and Loss Functions 3.2.2 Backpropagation Algorithm 3.2.3 Optimizers (Adam, RMSProp)
3.3.1 Convolutional Neural Networks (CNN) for Computer Vision 3.3.2 Recurrent Neural Networks (RNN) and LSTMs for Sequential Data
Chapter 6: Ethical, Societal, and Future Challenges
(Target: 7-8 Pages)
6.1.1 Bias and Fairness (Data Bias, Algorithmic Bias) 6.1.2 Transparency and Explainability (XAI) 6.1.3 Accountability and Legal Frameworks 6.1.4 Data Privacy and Security
6.2.1 Automation and the Future of Work 6.2.2 AI in Healthcare, Finance, and Education
6.3.1 Achieving Artificial General Intelligence (AGI) 6.3.2 Neuro-Symbolic AI 6.3.3 The Role of Quantum Computing in AI
Artificial Intelligence (AI) is a branch of computer science that deals with the theory and development of computer systems capable of performing tasks that typically require human intelligence, such as visual perception, speech recognition, decision-making, and translation between languages. It is a field driven by the ambition to replicate, and ultimately exceed, human cognitive abilities within machines.
The concept of intelligence itself is multifaceted, and defining artificial intelligence often requires contrasting it with its biological counterpart.
Human intelligence is characterized by several complex attributes:
● Generalization and Transfer Learning: Humans can learn a new skill in one context (e.g., driving a car) and easily transfer that knowledge to a related but different context (e.g., driving a truck). ● Common Sense Reasoning: Humans possess an enormous body of intuitive knowledge about the world, which allows them to make quick, often probabilistic, judgments about typical situations. This is known as the "commonsense knowledge problem" in AI. ● Creativity and Intuition: Human intelligence involves generating novel ideas, art, and solutions that go beyond the learned patterns. Much of human decision-making is guided by intuition rather than explicit, step-by-step logic. ● Emotional and Social Intelligence: The ability to understand, manage, and use emotions to guide thought and behavior, and to navigate complex social interactions.
Current AI, or Narrow AI, primarily excels in:
● Speed and Scale: AI systems can process, analyze, and find patterns in massive datasets (Big Data) far beyond human capacity. ● Precision and Consistency: Once trained, AI executes tasks with extreme precision and perfect consistency, eliminating human error (e.g., in quality control or repetitive data entry). ● Specialization: Modern AI is a set of highly specialized tools. An image classification model is typically useless for language translation, demonstrating a profound lack of generalization.
another human. ● Required Capabilities for a Passing Agent: ○ Natural Language Processing (NLP): To communicate successfully. ○ Knowledge Representation (KR): To store and retrieve information. ○ Automated Reasoning (AR): To use stored information to answer questions and draw new conclusions. ○ Machine Learning (ML): To adapt to new circumstances and detect patterns.
This approach, rooted in the philosophy of Aristotle and formal logic, attempts to codify "right thinking." The system's decisions must be provably correct using formal logical deduction.
● Example: Logic programming languages like Prolog. ● Challenge: Translating complex, real-world, and often uncertain knowledge into formal logical statements (A⟹B is difficult when A is "it might rain"). This led to the rise of probabilistic methods.
The most widely accepted paradigm in modern AI. A rational agent is one that acts so as to achieve the best outcome, or when uncertainty exists, the best expected outcome.
● Focus: Rationality is concerned only with the actions taken, not the thought process that leads to them. ● Example: An autonomous vacuum cleaner (agent) acts rationally by always moving to a state where the floor (environment) is cleaner, maximizing its utility (cleanliness). ● Dominance: This approach is dominant because it is more amenable to scientific development and evaluation. The metric of success is measurable and objective (e.g., percentage of correct classifications, speed of movement, revenue generated).
AI research is broadly categorized by the cognitive functions it attempts to replicate or exceed:
Goal Area Description AI Subfields/Techniques
Reasoning The ability to draw conclusions, make inferences, and deduce logical consequences from given facts.
Knowledge Representation, Automated Planning, Expert Systems.
Problem-Solving Finding sequences of actions that achieve a
Search Algorithms (A∗, Depth-First Search),
specific goal, often through search algorithms and heuristics.
Constraint Satisfaction Problems (CSPs).
Learning Acquiring knowledge, recognizing patterns, and improving performance from data or experience.
Machine Learning, Deep Learning, Reinforcement Learning.
Perception Using sensory input (visual, auditory) to understand and interpret the environment.
Computer Vision, Speech Recognition, Sensor Fusion.
Language The ability to understand, interpret, and generate human language, both spoken and written.
Natural Language Processing (NLP), Machine Translation, Generative Models (LLMs).
1.2 The History and Milestones of AI
The quest to create thinking machines is centuries old, but the formal field of AI began in the mid-20th century.
● 17th Century: Gottfried Wilhelm Leibniz developed a system of symbolic logic, the calculus ratiocinator , envisioning a mechanism that could resolve all disputes through calculation. ● 19th Century: Charles Babbage and Ada Lovelace conceptualized the Analytical Engine. Lovelace is often credited with recognizing that machines could process symbols beyond numbers, suggesting the idea of a universal computer, but also notably argued that the engine could only do what it was commanded (the "no originality" argument, a precursor to modern debates on AI creativity). ● 1943: Warren McCulloch and Walter Pitts published A Logical Calculus of the Ideas Immanent in Nervous Activity , proposing a mathematical model of neurons and neural networks, establishing the link between neuroscience and computation.
This two-month summer workshop at Dartmouth College is universally recognized as the event that launched the field.
● Organizers: John McCarthy, Marvin Minsky, Nathaniel Rochester, and Claude Shannon.
● Scalability Issue: Early programs, despite their ingenuity (like logic provers), were brittle. They worked well on small, controlled "toy problems" but failed completely when scaled up to real-world complexity (e.g., millions of facts, uncertain data). ● Lack of Processing Power: The computational resources of the time (mid-1970s) were simply insufficient to handle the data required for sophisticated AI models.
A brief commercial resurgence, known as the second AI Summer, was driven by Expert Systems.
● Architecture: An Expert System consisted of two main components: ○ Knowledge Base: A repository of human expert knowledge, typically stored as IF-THEN rules (e.g., IF the patient has fever AND cough THEN the diagnosis is flu). ○ Inference Engine: The software that applies the rules to the known facts (data) to deduce new facts or a solution, using either forward-chaining (data-driven) or backward-chaining (goal-driven) logic. ● Success Story: XCON (eXpert CONfigurer) at Digital Equipment Corporation saved the company millions by automatically configuring complex computer systems. ● Limitations: Expert systems were extremely expensive and time-consuming to build (the "knowledge acquisition bottleneck"), hard to maintain, and lacked the ability to learn or adapt outside of their specific domain. This led to another downturn in the late 1980s.
The focus shifted from rule-based, symbolic AI to statistical AI and Machine Learning , where systems learned probabilistic patterns from data.
● 1997: Deep Blue vs. Kasparov: IBM's Deep Blue defeated World Chess Champion Garry Kasparov. The system relied on a highly parallel processing architecture and a sophisticated search algorithm (alpha-beta pruning) to evaluate 200 million positions per second, demonstrating the superiority of brute force computation over human-level tactical planning in a limited domain. ● 2011: IBM Watson on Jeopardy!: Watson demonstrated advanced capabilities in NLP, knowledge retrieval, and probabilistic reasoning by successfully competing against human champions on the complex, language-based quiz show Jeopardy!.
Deep Learning (DL), a subset of Machine Learning that uses deep neural networks (networks with many hidden layers), became the dominant force in AI, driven by three key factors:
The next major leap was the creation of systems capable of generating novel, coherent content.
● 2017: The Transformer Architecture: Introduced by Google in the paper Attention Is All You Need. This architecture, relying entirely on the Attention Mechanism , allowed parallel processing of sequential data, dramatically improving training speed and scale for NLP tasks. ● 2018 onwards: BERT and GPT: ○ BERT (Bidirectional Encoder Representations from Transformers): Demonstrated contextual word understanding by analyzing text bidirectionally. ○ GPT (Generative Pre-trained Transformer): Developed by OpenAI, these models scale the Transformer's decoder stack to unprecedented sizes, enabling them to generate highly coherent and contextually relevant text, driving the recent public explosion of Generative AI.
1.3 Types of AI
AI is typically categorized along two main dimensions: the level of intelligence/capability it possesses, and the specific functions it can perform.
This classification, based on the potential scope of the AI's power, helps define the research goals of the field.
● Definition: An AI system designed and trained to perform a single, specific task or a narrow range of tasks. It operates within a pre-defined range and cannot perform outside its programmed constraints. ● Current Status: This is the only type of AI that currently exists. ● Examples: Image recognition software, Google Search algorithm, Siri/Alexa, factory
and recent environmental observations (current data). ● Example: Self-Driving Cars. They monitor the speed, direction, and distance of other vehicles on the road for a short duration (e.g., the last few seconds) to make driving decisions (like changing lanes or braking).
● Function: This advanced, theoretical level of AI would be able to represent the mental states of others, including their intentions, beliefs, knowledge, and desires, and adjust its own behavior accordingly. ● Significance: To achieve this, AI would need to understand human emotion and common social cues, making human-AI interaction far more seamless and empathetic. ● Status: Not yet achieved, but research into human-robot interaction (HRI) and social robotics is exploring this stage.
● Function: The ultimate and purely hypothetical stage, where the AI develops self-consciousness, understands its own internal state, and is aware of its existence. ● Characteristics: Such an AI would not only understand others' consciousness (Theory of Mind) but possess its own. This would involve sentience, desires, and subjective experiences. ● Status: A distant, purely speculative future goal. Research into this area falls under philosophy and advanced neuroscience/computation.
Summary of Chapter 1
This chapter established the fundamental definitions and historical context of Artificial Intelligence. We covered the philosophical underpinnings of AI, categorized the field based on four major approaches (human-centric vs. rational, thought vs. action), and outlined the major goals (learning, reasoning, perception, language). We then traced the history from its symbolic logic roots to the current era of Deep Learning and Generative AI, noting the critical role of data, hardware, and key algorithmic breakthroughs like the Transformer. Finally, we introduced the capability spectrum of AI (Narrow, General, Superintelligence) and the functional taxonomy (Reactive, Limited Memory, Theory of Mind, Self-Aware), setting the stage for a detailed dive into the technical core of modern AI: Machine Learning.
Machine Learning (ML) is the subfield of Artificial Intelligence that gives computers the ability to learn without being explicitly programmed. It is the engine that drives modern AI, allowing systems to autonomously discover patterns, make predictions, and improve their performance over time through exposure to data.
The most widely accepted formal definition of machine learning was provided by Tom Mitchell in 1997:
"A computer program is said to learn from Experience ( E ) with respect to some Task ( T ) and some Performance measure ( P ) , if its performance on T, as measured by P, improves with experience E."
Understanding the relationship between these three components is fundamental to all ML systems:
At the core of ML is the mathematical model, which represents the function the machine learns:
● Hypothesis Function ( h ): A candidate function that maps input features (X) to an output prediction (y^). For example, in linear regression, the hypothesis function is a straight line: hθ(x)=θ0+θ1x. The model's goal is to find the best parameters (θ) for this function. ● Cost Function ( J(θ) ) or Loss Function: A function that quantifies the "cost" or "error" of the model's predictions compared to the actual target values (y). A higher value of the cost function indicates poorer model performance. The goal of training is to minimize this cost. ○ Example (Regression): Mean Squared Error (MSE) is a common cost function: J(θ)=2m1i=1∑m(hθ(x(i))−y(i))
● Outlier Detection and Treatment: Outliers are data points significantly distant from other observations. They can be detected using statistical methods (e.g., Z-score or Interquartile Range - IQR ) and are typically removed or capped (winsorized).
Scaling ensures that all input features contribute equally to the distance calculations and gradient updates. This is critical for distance-based algorithms (like K-NN, SVM) and gradient-based algorithms (like Linear/Logistic Regression, Neural Networks).
● Normalization (Min-Max Scaling): Scales features to a fixed range, usually [0,1]. xnew=xmax−xminx−xmin ● Standardization (Z-Score Normalization): Rescales data to have a mean (μ) of 0 and a standard deviation (σ) of 1. This is less susceptible to outliers. xnew=σx−μ
ML algorithms primarily work with numbers. Categorical features (e.g., 'Color': Red, Green, Blue) must be converted into numerical representations.
● Ordinal Encoding: Used for categorical features with a natural order (e.g., 'Size': Small, Medium, Large → 1, 2, 3). ● One-Hot Encoding: Used for nominal categorical features (no inherent order). It creates a new binary feature (0 or 1) for each unique category. ○ Example: 'Color' → 'Is_Red', 'Is_Green', 'Is_Blue'. This avoids implying an arbitrary ordering among categories.
This is the process of creating new features or transforming existing ones to make the model perform better. It often requires significant domain expertise.
● Example 1 (Time): Extracting 'Hour of Day', 'Day of Week', or 'Is Holiday' from a raw timestamp feature. ● Example 2 (Polynomial Features): If data shows a non-linear relationship, a new feature x2 or log(x) might be added to a linear model to capture complexity.
2.2 Core Machine Learning Approaches
Machine learning is typically categorized into three main types based on the nature of the training signal (the feedback received by the model).
● Definition: The model learns from labeled data , where each input (x) is paired with the correct output or "supervision" (y). The model's goal is to learn a mapping function from input to output. ● Training Signal: The difference between the model's prediction and the correct label (y).
● Key Tasks:
● Definition: The model learns from unlabeled data with no guidance or supervision. The goal is to discover hidden structure, patterns, or relationships within the data itself. ● Training Signal: There is no "correct" answer (y). The model relies on internal metrics like distance or variance. ● Key Tasks:
● Definition: The model (called the Agent ) learns to make a sequence of decisions in an Environment to maximize a cumulative Reward signal. It learns through trial and error, like training a dog. ● Key Components:
● Mechanism: A non-parametric supervised learning method that creates a tree-like model of decisions and their possible consequences. ● Training: The tree is built via a recursive process called Recursive Binary Splitting. At each step, the algorithm chooses the feature and split point that best separates the data. ● Splitting Criteria (Impurity Measures): The "best" split is determined by minimizing impurity in the resulting child nodes. ○ Classification: Gini Impurity or Entropy (Information Gain). ○ Regression: Mean Squared Error (MSE) or variance reduction. ● Problem: Decision trees are prone to overfitting , meaning they become too complex and memorize the training data, leading to poor generalization.
● Concept: An ensemble method that corrects the decision tree's habit of overfitting by training a large number of individual decision trees and having them vote on the final prediction. This technique is called Bagging (Bootstrap Aggregating). ● How it Works:
● Goal (Classification): To find the optimal hyperplane that maximally separates the data points of different classes in a high-dimensional space. ● Maximum Margin: The "optimal" hyperplane is the one that has the largest minimum distance to the nearest training data point of any class. These closest points are called the Support Vectors. Maximizing this margin improves generalization. ● The Kernel Trick: SVM's true power lies in its ability to handle non-linearly separable data by using Kernels (e.g., Polynomial, Radial Basis Function - RBF). The Kernel Trick allows the algorithm to implicitly map the input features into a much higher-dimensional space where the data is linearly separable, without ever explicitly computing the coordinates in that high-dimensional space. ○ This is a computationally efficient way to model highly complex, non-linear relationships.
● Mechanism: A simple, non-parametric, lazy learning classification and regression algorithm. It makes no explicit generalization or training phase. All work is deferred until a prediction is requested. ● Classification: To classify a new data point, the algorithm finds the K closest points in the training set (using a distance metric like Euclidean distance). The new point is then
assigned the class most common among its K neighbors (a majority vote). ● Regression: The predicted value is the average of the target values of the K neighbors. ● Challenges: ○ Computational Cost: Since it stores the entire training dataset, prediction time is high for large datasets. ○ Curse of Dimensionality: In high-dimensional feature spaces, distance metrics become less meaningful, degrading performance.
2.4 Model Evaluation and Optimization
A model is useless if its performance cannot be reliably measured. Evaluation involves testing the model's ability to generalize to unseen data.
This is the central dilemma in supervised learning: the goal is to find a model complexity that minimizes both bias and variance.
● Bias: The error introduced by approximating a real-world problem (which may be complicated) with a simplified model (e.g., approximating a curve with a straight line). ○ High Bias → Underfitting: The model is too simple; it fails to capture the relationships in both the training and test data. ● Variance: The amount that the model's performance changes when trained on different subsets of the training data. High variance indicates the model is too sensitive to the training set. ○ High Variance → Overfitting: The model is too complex; it has memorized the noise and details of the training data and performs poorly on unseen test data.
The ideal model minimizes Total Error, which is a combination of irreducible error (noise), bias, and variance:
Total Error=Irreducible Error+Bias2+Variance
Before training begins, the dataset is typically split into three non-overlapping sets:
A robust technique used when data is limited, ensuring all data is used for both training and