## 1. Logic and Its Role in Describing the World
- **Foundational Concept**
Logic provides a structured way to describe the world. It captures certain truths about what we observe and ignores others—so each logical statement is just a partial reflection of reality.
- **Reasoning Within Logic**
Once we lay down a few logical statements, we can derive new conclusions purely within that logical framework, without having to continually reference the outside world. If our original statements are accurate, the conclusions will be as well. If we start with something false, however, logic can drive us further off track by preserving that false premise all the way through.
---
## 2. Historical Context of AI
- **Early Beginnings**
Artificial intelligence research has been around since the 1950s, evolving from simple puzzle-solving programs into the complex systems we see today.
- **Expert Systems**
Early AI included expert systems—algorithms designed to emulate the decision-making of a human expert. They rose to prominence in various industries and became so integrated that people often stopped recognizing them as AI. A famous instance: during the first Persian Gulf War, one expert system recommended an optimal location for a supply base, saving the United States two billion dollars—outstripping the entire AI research budget from DARPA at that time.
---
## 3. From Logical Representation to Planning Algorithms
- **Bridging Logic and Action**
Logic isn’t just for describing truths; it also forms the backbone of planning algorithms in AI. Once we specify rules about the world, we can create plans that achieve goals under certain conditions.
- **Examples of Planning Approaches**
- **Transfer Learning**: A technique where an AI system learns to plan in one setting and then adapts that experience to a new but related context.
- **Interactive Planning**: A collaborative style of problem-solving where humans and machines work side by side, each contributing their strengths.
- **Resolution Algorithm**
This elegant method uses a knowledge base of logical statements and infers new knowledge by systematically combining and simplifying existing clauses.
- **Value Iteration**
A cornerstone of Markov decision processes, value iteration computes the best action at each state by iteratively refining estimates of future rewards.
---
## 4. Foundations of Propositional Logic
- **Core Principles**
Propositional logic is built on true/false statements. Each proposition—like “It is raining”—can only be true or false in a given scenario.
- **Symbols and Notation**
- **v** means “or”
- **→** means “implies”
- **^** means “and”
- **¬** (or “not”) indicates negation
- **↔** (or “<-->”) indicates a bi-conditional (equivalence)
- **Models**
A model assigns truth values to all propositions. A propositional logic sentence is true or false depending on whether it matches the model’s assignments.
- **Implication Nuance**
An implication `P → Q` is false only if `P` is true while `Q` is false. Otherwise, it’s considered true.
---
## 5. Terminology in Propositional Logic
- **Valid**
A statement is valid if it’s true in every possible model.
- **Satisfiable**
A statement is satisfiable if there exists at least one model where it’s true.
- **Unsatisfiable**
A statement is unsatisfiable if it’s false in every possible model.
---
## 6. Limitations of Propositional Logic
1. **[[uncertainty]]**
It can only handle boolean values, making it hard to capture the shades of gray or probabilistic elements of reality.
2. **Objects**
Propositional logic doesn’t let you talk directly about objects or their properties, like size and color.
3. **Efficiency**
There’s no concise way to describe multiple objects or repeated patterns without explicitly listing every possibility.
---
## 7. First-Order Logic: Expanding the Framework
- **Addressing Objects and Shortcuts**
First-order logic overcomes the object and representation challenges by allowing quantified statements about items, their properties, and their relationships (e.g., “For all cars, if it’s red then it’s fast,” or “There exists a person who can solve this puzzle”).
- **Ontological and Epistemological Commitments**
Different logics define what can be said about the world (ontological commitment) and what an agent can know about those statements (epistemological commitment). By moving from propositional to first-order logic, one gains the power to represent structured relationships between objects, but also accepts more complex reasoning requirements.
---
## 8. Types of Representations in AI
1. **Atomic Representation**
- Treats each state as an indivisible unit with no internal structure.
- Used in search and simple problem-solving approaches.
- Identifies goal states only as matching that one specific pattern.
2. **Factored Representation**
- Splits the world into a set of variables or facts that may be true or false.
- Propositional logic and [[probability]] theory both use this approach.
3. **Structured Representation**
- Captures relationships and complex structures, typical of first-order logic.
- Lets you express how objects relate to one another in detail (like in databases or traditional programming languages).
- Offers the richest way to encode knowledge, though at a higher complexity cost.
---