3 Remaining CommonLisp AI
3 Remaining CommonLisp AI
processing, and working with symbols. This type of AI, also known as Symbolic AI, processes
symbols (like letters or numbers) to represent real-world things or ideas. These symbols are
organized in structures like lists or networks to show how they are related.
General Problem Solver (GPS) was a computer program developed in 1957 by Simon and
Newell to create a machine that could solve any type of problem. It was designed to handle
problems that could be expressed using logic, like solving puzzles, proving theorems, and even
playing chess. One example of a puzzle GPS could solve was the Towers of Hanoi, where disks
of different sizes must be moved between rods in a specific order.
Although GPS could handle simple problems, it wasn’t able to solve complex real-world issues
like climate change, healthcare, or food insecurity.
1. Define the problem: Clearly state what the problem is and what needs to be achieved.
o Example: If you want to buy chocolate, the problem is to get chocolate from the
store.
2. Analyze the problem: Identify the important details and steps needed to solve the
problem.
o Example: You’ll need transportation and make sure the store has chocolate in
stock.
3. Gather knowledge: Collect all the necessary information or resources you need to solve
the problem.
o Example: You need to know how to drive to the store and have money to pay for
the chocolate.
4. Choose the best method: Select the best way to solve the problem and apply it.
1. Transform one object into another (for example, from not having chocolate to having
chocolate).
2. Reduce differences between the current situation and the goal (if you're far from the
store, you move closer).
3. Apply the operator (the steps needed to achieve the goal).
Simple Search in AI refers to methods that help problem-solving agents find the best solution to
a given problem. These techniques are often used by AI systems to explore different possibilities
and choose the most efficient solution.
1. Search: The process of solving a problem by exploring possible solutions step by step.
o Search Space: All the possible solutions to a problem.
o Start State: The point where the search begins.
o Goal Test: A check to see if the goal has been reached.
2. Search Tree: A tree-like diagram that represents the problem, with the starting point at
the root and branching out into possible actions.
3. Actions: The options available to the AI agent at each step.
4. Transition Model: Describes how each action changes the situation.
5. Path Cost: The total cost (in terms of time, resources, etc.) of a specific path from start to
goal.
6. Solution: A series of steps that leads from the start to the goal.
7. Optimal Solution: The best solution with the lowest cost.
1. Uninformed Search (Blind Search): These algorithms don't have any extra information
beyond the basic problem description. They explore all possible solutions until they find
the goal.
2. Informed Search (Heuristic Search): These algorithms use additional information, such
as how far the current state is from the goal. They are faster and more efficient at solving
problems because they use "heuristics," or rules of thumb, to guide the search towards
better solutions.
Informed search is especially helpful when dealing with large problems, while uninformed
search methods are more basic and don't rely on extra data to find the solution.
Means-End Analysis is a problem-solving method where you start by comparing your current
state to your end goal. Then, you break the big goal into smaller, manageable steps or sub-goals.
Each sub-goal is tackled one by one, moving closer to the final goal. MEA uses both forward and
backward actions, meaning it can address bigger issues first or handle smaller ones depending on
the situation.
1. Identify the Difference: Look at the gap between where you are now (current state) and
where you want to be (goal state).
2. Choose Operators: Pick the actions (operators) that can reduce this gap.
3. Apply Operators: Use the chosen actions to reduce the difference between the current
and goal state.
Sometimes, a direct action cannot be applied, so MEA breaks the task into smaller sub-problems.
This process of breaking it down is called Operator Sub-Goaling, where specific steps are
taken to prepare for applying the chosen actions.
Example of MEA:
Suppose you want to transform an object from the initial state to a goal state:
1. Delete Operator: Remove unnecessary elements (like a dot from the initial state).
2. Move Operator: Shift elements around (move a square closer to the circle).
3. Expand Operator: Adjust the size or shape to match the goal (resize the square).
Turing Test:
The Turing Test, created by Alan Turing in 1950, checks if a machine can think like a human.
The test involves three people:
The interrogator is in a different room and asks questions to both the machine and the human
through a computer. Based on their answers, the interrogator must figure out which one is the
machine and which one is the human. If the interrogator can't tell the difference, the machine
passes the test and is considered to think like a human.
If the interrogator can't tell which is the machine, the computer is said to "think" like a human.
Pattern Matching:
Pattern Matching is a simple technique in AI used to find specific patterns in data. It's like
searching for a match between a set of rules and the actual data. You can think of it as finding
words or symbols that follow a certain pattern, like finding all the names that start with "A" in a
list.
(match '(likes bill wine) '(likes bill wine)) → returns true, as both sentences are the same.
(match '(likes bill wine) '(likes bill milk)) → returns false, because "wine" and "milk" don't
match.
(match '(likes bill ?) '(likes bill wine)) → returns true, because the ? can match anything.
Pattern matching helps to check if certain patterns fit data, making it useful for tasks like text
searching or fixing errors in programs.
RBMT is a method for translating text by using a set of programmed rules to map words and
sentences from one language (source language) to another (target language). This approach does
not simply replace words but considers the grammar and meaning of both languages.
1. Morphological: Looks at the structure of the words (e.g., how words change form).
2. Syntactic: Focuses on the grammatical rules (e.g., word order in a sentence).
3. Semantic: Considers the meaning of the sentence.
Process of RBMT:
Types of RBMT:
Components of RBMT:
OPS-5
OPS-5 is a programming language used in rule-based systems (also called production systems)
where decisions are made based on rules. Developed by Charles Forgy in the late 1970s, it is one
of the first languages used in expert systems.
In OPS-5, rules consist of conditions and actions. The system checks its memory for conditions
that match any rule. When a match is found, the rule’s action is carried out.
Key Features:
Forward Chaining: OPS-5 uses this method to make decisions. It means starting with existing
information and applying rules until a conclusion or goal is reached.
Working Memory: Stores data that is used by the system to match rules.
Production Memory: Contains the rules, which are executed when conditions are met.
OPS-5 was notably the first language used in successful AI expert systems.