0% found this document useful (0 votes)
17 views6 pages

Ai Exam

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views6 pages

Ai Exam

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

UNIT-2

LISP and Other Programming Languages


LISP (List Processing) is one of the oldest high-level programming languages used primarily
for artificial intelligence (AI) research. It is known for its symbolic expression-based syntax
and powerful features for recursion and dynamic typing. In LISP, programs manipulate
symbolic data using lists, and it has built-in support for numerical functions like addition,
subtraction, etc. LISP differs from Prolog, which is a logic programming language. Prolog uses
facts, rules, and queries to solve problems, while LISP is more general-purpose and focuses
on manipulating symbols and recursive functions. Alternative AI languages include Scheme
(a LISP variant), Python, and JavaScript.
Syntax and Numerical Functions
LISP syntax is simple and consists of nested expressions, where functions are written inside
parentheses. For instance, a function call in LISP looks like (function arg1 arg2). Numerical
functions in LISP include basic arithmetic operations such as +, -, *, /. LISP allows the
creation of custom functions using the defun keyword. The language supports recursion,
where a function calls itself to solve sub-problems, a crucial concept in AI for tasks like
searching or problem-solving.
LISP and PROLOG Distinction
LISP and Prolog are distinct in their approach to problem-solving. LISP is a general-purpose
functional programming language, emphasizing symbolic computation and recursion. Its
primary strength is flexibility, allowing the development of AI systems using symbolic data
structures. Prolog, on the other hand, is a declarative logic programming language, focusing
on solving problems using rules and facts. It uses backward chaining and unification as its
primary mechanisms for query processing, making it suitable for AI applications like expert
systems.
Input/Output and Local Variables
In LISP, input and output operations are managed through functions like read (to take input)
and print (to display output). LISP also supports local variables, which can be defined using
the let function. These variables exist only within the scope of the block in which they are
defined. This feature is essential for creating modular and reusable code, where variables do
not interfere with each other across different parts of a program.
Interaction and Recursion
Interaction in LISP is achieved through its interactive REPL (Read-Eval-Print Loop), which
allows developers to test functions and experiment with code dynamically. Recursion is a
central feature of LISP, enabling functions to call themselves as part of their solution. This is
particularly useful for AI tasks like tree traversal, searching, and problem-solving, where
solutions can be built incrementally by breaking down a problem into smaller, similar sub-
problems.
Property List and Arrays
In LISP, property lists are used to associate keys with values, allowing the creation of
associative arrays. These are implemented as lists of pairs, where each pair associates a key
with its corresponding value. Arrays in LISP are more rigid structures used for storing
multiple elements, similar to arrays in other programming languages, but LISP’s property list
system provides more flexibility and is useful for storing knowledge and facts in AI systems.
Alternative Languages
Apart from LISP, other languages like Prolog, Python, and JavaScript are also used in AI.
Prolog is used for logic-based AI, while Python, with libraries like TensorFlow and Keras, is
popular for machine learning and data science. JavaScript is used in web-based AI
applications, especially for real-time processing and interactions.
Formalized Symbolic Logics
Symbolic logic involves representing statements and their relationships using symbols, which
are manipulated to reason about problems. Formalized symbolic logic provides a
mathematical framework for AI to perform tasks like reasoning, proof generation, and
problem-solving. Logic is used extensively in knowledge representation, automated theorem
proving, and inference systems.
Properties of WFRS
WFRS (Well-Formed Formulae) are logical expressions that are syntactically valid. In AI,
WFRS are used to represent facts and rules in knowledge bases. The properties of WFRS
ensure that logical operations can be performed correctly, enabling systems to deduce new
information, perform reasoning, and make decisions based on the available knowledge.
Non-Deductive Inference Methods
Non-deductive inference methods, such as inductive reasoning and abduction, differ from
deductive inference in that they do not guarantee the truth of conclusions. Inductive
inference generalizes from specific examples, while abductive inference seeks the best
explanation for observed facts. These methods are important in AI for learning from data
and reasoning under uncertainty.
Inconsistencies and Uncertainties
In AI, inconsistencies and uncertainties arise when the knowledge base contains
contradictory or incomplete information. Techniques such as non-monotonic reasoning and
truth maintenance systems (TMS) help manage these issues. TMS tracks and updates the
truth of information based on new evidence, ensuring that contradictions are resolved as
new data is processed.
Truth Maintenance Systems (TMS)
Truth Maintenance Systems (TMS) are used in AI to maintain consistency in a knowledge
base. They track dependencies between facts and update the truth values of propositions as
new information becomes available. TMS helps handle inconsistencies, ensuring that
conclusions are revised when new evidence contradicts previous assumptions.
Default Reasoning and Closed World Assumption
Default reasoning allows AI systems to make plausible assumptions in the absence of
complete information, often using default rules. The Closed World Assumption (CWA)
assumes that anything not known to be true is false, which is useful in knowledge
representation where all relevant facts are expected to be explicitly stated.
Model and Temporary Logic
Models in AI are representations of real-world systems used for reasoning, prediction, and
decision-making. Temporary logic refers to the logic used for reasoning about events that
happen over time, where facts may change or evolve. It is critical for applications like
planning, where the system needs to consider the effects of actions in a dynamic
environment.

UNIT-3

Fuzzy Logic – Concepts:


Fuzzy logic is a mathematical framework for dealing with uncertainty, where truth values are
not limited to "true" or "false," but range from 0 to 1. It uses degrees of truth, enabling
more flexible reasoning than classical binary logic. Fuzzy sets represent vague concepts, and
rules are based on human reasoning, such as "if temperature is high, then fan speed is high."
It’s widely used in systems requiring approximate reasoning, such as temperature control,
expert systems, and decision-making processes.
Introduction to Fuzzy Logic with Examples:
Fuzzy logic applies to real-world problems that involve imprecision. For example, in an air
conditioner, a fuzzy logic controller might adjust the fan speed based on the "fuzziness" of
inputs like room temperature, which can be "cold," "warm," or "hot." Instead of discrete
control, the system uses continuous inputs and rules to adjust settings accordingly, providing
smooth transitions.
Probabilistic Reasoning:
Probabilistic reasoning involves drawing conclusions based on uncertainty and probabilities.
It applies mathematical models to describe and infer outcomes in uncertain environments.
By using probability theory, it helps predict events or outcomes even when all information is
not fully available, making it ideal for applications in machine learning, diagnostics, and
decision support systems.
Bayesian Probabilistic Inference:
Bayesian inference uses Bayes’ Theorem to update the probability estimate for an event as
new evidence becomes available. It’s essential in dynamic systems where prior knowledge is
adjusted continuously as new data is observed. For example, in spam email classification,
the system updates the likelihood that an email is spam based on the frequency of certain
words.
Dempster-Shafer Theory:
The Dempster-Shafer Theory, also known as Evidence Theory, is a mathematical framework
for reasoning with uncertain, incomplete, or conflicting evidence. Unlike probability theory,
which requires a single hypothesis, Dempster-Shafer allows for multiple hypotheses and
provides a way to combine evidence from different sources to reach a conclusion.
Possible World Representation:
Possible world representation is used to model and reason about different states of the
world in AI. It assumes that multiple alternative scenarios (possible worlds) exist, and each
represents a potential configuration of facts. This model is useful in reasoning, decision-
making, and planning when the world is uncertain or incomplete.
AdHoc Methods:
AdHoc methods refer to customized, situation-specific approaches used to solve particular
problems. Unlike general-purpose algorithms, AdHoc methods are designed for immediate,
one-time problem solving, often employed when quick, efficient solutions are needed for
specific contexts. Examples include heuristics or special-case algorithms in complex systems
like search engines.

Structured Knowledge: Graphs, Frames, and Related Structures:


Structured knowledge representations use graphs and frames to organize and
store information. Graphs consist of nodes (representing objects) and edges
(representing relationships). Frames are similar but contain structured data
about an object’s attributes and methods. These representations help AI
systems handle complex information efficiently, enabling tasks like natural
language processing and expert systems.
Object-Oriented Representation:
In object-oriented representation, knowledge is structured into objects, which
encapsulate data and methods. Objects belong to classes, which define their
structure and behavior. Communication occurs via messages (function calls).
For example, in a simulation, a "Car" object might have attributes like "speed"
and methods like "accelerate" or "brake." Object-oriented languages like Java
and Python implement this model.
Search and Control Strategies – Concepts:
Search strategies in AI refer to algorithms that explore possible solutions to a
problem. They guide the process of searching through problem spaces. Control
strategies direct how and when to search. This is crucial in optimization and
problem-solving tasks, such as pathfinding or solving puzzles.
Search Problems:
Search problems involve finding a solution from a set of possible states or
actions. In AI, search problems often take the form of finding the shortest path,
solving a game, or reasoning through a sequence of decisions. These problems
are fundamental in fields like robotics and game theory.
Uninformed or Blind Search:
Uninformed search (blind search) algorithms don’t have additional knowledge
about the problem domain. They explore the search space blindly. Examples
include Depth-First Search (DFS) and Breadth-First Search (BFS). These methods
are simple but inefficient for large search spaces, as they don’t prioritize or
optimize the search process.
Searching AND-OR Graphs:
AND-OR graphs represent problems that have both conjunctive (AND) and disjunctive (OR)
relationships between actions or states. In these graphs, an AND node requires all child
nodes to be solved, while an OR node requires at least one child to be solved. These graphs
are used in problems like decision-making and planning, where multiple strategies or
combinations are possible.

UNIT-4

Knowledge Organization and Communication in Expert Systems


Matching Techniques:
Matching in expert systems refers to comparing the input with knowledge stored in the
system to make decisions. Need for matching arises from the need to map user input to
relevant knowledge. Matching problem is about finding the correct rules or data. Partial
matching allows partial input to match rules. Fuzzy matching handles inexact matches using
fuzzy logic. RETE algorithm is an efficient pattern-matching algorithm to handle large sets of
rules by caching intermediate results, enhancing performance.
Knowledge Organization:
Indexing and retrieval techniques optimize how knowledge is stored and accessed. Systems
use memory organization techniques to manage data efficiently. Perception involves
interpreting sensory data, while communication involves exchanging information within the
system. Expert systems use linguistic knowledge to understand and process natural
language.
Linguistics:
Overview of linguistics in expert systems focuses on how systems process human language.
Basic parsing techniques analyze sentence structure, enabling interpretation. Semantic
analysis extracts meaning from sentences. Representation structures are methods for
encoding knowledge, such as semantic networks. Natural language generation focuses on
creating understandable responses from data.
OOP Programs and OOP Languages:
In expert systems, object-oriented programming (OOP) is used to structure knowledge as
objects. OOP languages like Java, C++, and Python support encapsulation, inheritance, and
polymorphism, which organize and manipulate knowledge efficiently.
Search and Control Strategies
Concepts:
Search strategies in expert systems involve exploring possible solutions by systematically
searching the problem space.
Search Problems:
These involve finding a solution from multiple possibilities, often requiring an intelligent
strategy to reduce the search space.
Uninformed or Blind Search:
This search does not use any domain-specific knowledge, and strategies like breadth-first
and depth-first are typical examples.
AND-OR Graphs:
Search problems can be represented as AND-OR graphs, where AND nodes represent tasks
that require multiple sub-tasks, and OR nodes represent alternative possibilities, helping to
structure search paths.

You might also like