![]() |
VOOZH | about |
Artificial Intelligence (AI) refers to the simulation of human intelligence processes by machines, especially computer systems. AI encompasses tasks like learning, reasoning, problem-solving, perception, and language understanding. The ultimate goal of AI is to create systems that can perform tasks that would typically require human intelligence, such as recognizing speech, making decisions, and visual perception.
Search problems in AI involve finding a path from an initial state to a goal state. It consists of defining the environment, the available actions, and the rules for transitioning between states.
Uninformed search algorithms do not have any additional information about the goal beyond the problem's definition. They explore the search space without any heuristics.
BFS uses a queue (FIFO structure) to explore all nodes at the current depth level before moving on to nodes at the next level. It starts at the root node and explores its neighbors first, then their neighbors, and so on.
The algorithm ensures that the shallowest goal is found first, making it complete for finite search spaces.
UCS uses a priority queue where nodes are prioritized by their path cost (g(n)). Unlike BFS, it expands the node with the least cumulative cost, ensuring that it always finds the optimal path.
DFS uses a stack (LIFO structure) to explore as far down a branch as possible before backtracking. It is memory efficient but may fail to find a solution in infinite-depth spaces or loops.
Depth limited search is a variation of DFS, where a depth limit is imposed to prevent infinite recursion or exploring too deep. It stops searching when the depth limit is reached, even if the goal is not found.
e) Iterative Deepening Depth-First Search (IDDFS)
IDDFS combines the memory efficiency of DFS and the completeness of BFS. It performs a series of depth-limited searches, incrementally increasing the depth limit until the goal is found.
Bidirectional search runs two simultaneous searches: one from the start state and the other from the goal state. The searches meet in the middle, significantly reducing the search space.
Informed search algorithms use problem-specific knowledge (heuristics) to find the solution more efficiently by guiding the search process.
Heuristic Function is used to guide the search algorithm by estimating the cost to reach the goal from a given state.
- Heuristic values should be greater than or equal to zero.
- Heuristic value depends on the current state.
Greedy best-first search prioritizes nodes based on heuristic functions that estimates the cost to reach the goal from a node. The algorithm does not guarantee an optimal solution, as it focuses solely on the heuristic.
A* search algorithm combines uninformed cost search and greedy best-first search by evaluating nodes using , where is the cost to reach the node and is the heuristic estimate of the cost from the node to the goal. A* search guarantees optimality if the heuristic is admissible (never overestimates) and consistent.
c) Iterative Deepening A* Search (IDA*)
IDA* search combines A* and iterative deepening to overcome A*'s memory limitation. IDA* performs a series of depth-limited searches where the depth limit is based on the value instead of depth in the search tree.
In each iteration, nodes are explored only if their value is within the current threshold. The threshold is updated iteratively to the smallest value that exceeded the current threshold, ensuring an optimal solution.
Adversarial search is used when multiple agents compete to maximize their payoff while minimizing the opponent’s payoff.
Minimax algorithm computes optimal decisions in two-player games, assuming both players play optimally. The algorithm recursively evaluates all possible moves to choose the best one for the current player.
Alpha-beta pruning optimizes Minimax by pruning branches that do not influence the final decision. It uses two values, (best already explored option for the maximizer) and (best for the minimizer), to prune irrelevant nodes.
Propositional Logic(Boolean Logic) deals with statements that are either true or false. The simplest form of logic used to represent facts about the world and manipulate those facts.
Common logical connectives are:
Truth table is used to determine the truth value of compound propositions. For example for :
| P | Q | P → Q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
Propositional logic cannot handle environments of unlimited size effectively because it lacks the ability to express concepts related to time, space, and universal relationships between objects in a concise manner.
Predicate Logic represent and reason about statements involving objects, their properties and their relationship. The object represent entities in the domain of discourse (e.g., "John," "car," or "number").
It extends propositional logic by introducing:
First-order logic is a specific type of predicate logic with additional restrictions:
Inference in Predicate Logic
AI systems often work with uncertain information. This uncertainty arises due to:
To handle uncertainty, AI uses tools like probabilistic reasoning to make inferences about the most likely outcomes.
Conditional independence representation deals with uncertainty and probabilistic models. It allows us to simplify complex probabilistic relationships by assuming that two events are independent given some third event.
Two variables and are conditionally independent given if the probability of given is unaffected by :
In a Bayesian network, conditional independence is encoded by the network structure:
D-separation to determine conditional independence in a directed acyclic graph (DAG). For example, a set of nodes Z blocks a path between X and Y if:
X --- A --- Y (Collider at A)
|
Z (Z blocks the path between X and Y)
X --- A --- Y
|
Z (Z blocks the path between X and Y)
Variable elimination is a method used in probabilistic graphical models for exact inference. It allows for the computation of marginal probabilities by systematically eliminating variables that are not of interest.
The variable elimination algorithm can be summarized in the following steps:
Approximate inference is used to estimate probabilities or make decisions when exact inference is too computationally expensive. Sampling methods randomly sample from the probability distribution to estimate the result. This allows us to estimate complex probabilities quickly, even in large models.
1. Direct sampling methods involve generating random samples from the probability distribution of a model and using these samples to approximate the desired probability.
For example: If you want to estimate P(A), you would generate random samples from the model, count how many times A is true, and divide by the total number of samples to get the approximate probability of A.
2. Rejection Samplingis a technique used to sample from complex distributions by generating samples from a simpler, easier-to-sample distribution and rejecting those that do not meet certain criteria. The process of random sampling involves following steps
3. Likelihood Weightingis an advance sampling technique used in Bayesian networks to handle observed evidence. The process involves following steps:
This method allows for more efficient inference in Bayesian networks compared to basic rejection sampling.