AI Module 3 Final
AI Module 3 Final
ENVIRONMENTS
(Slides are based on Artificial
Intelligence A Modern Approach
by Stuart Russell & Peter Norvig)
Dr. K. Venkateswara Rao
Professor CSE
Contents
• Local search algorithms and optimization problems
– Hill-climbing search
– Simulated annealing
– Local beam search
– Evolutionary algorithms
• Optimal decisions in games
– The minimax search algorithm
– Optimal decisions in multiplayer games
• Alpha-Beta pruning
– Move ordering
• Monte Carlo tree search
• Kalman Filter
Systematic Algorithms
• Systematic Algorithms are characterized by Observable,
deterministic, known environments where solution (goal
configuration) and path (a sequence of actions) to the goal are
important.
• Observable: In an observable environment, the agent (the
entity trying to solve the problem) can directly observe the
current state of the environment. This means that the agent
has complete information about the state of the environment
at any given time.
• Deterministic: In a deterministic environment, the outcome
of an action is fully determined by the current state of the
environment and the action taken by the agent. There is no
randomness or uncertainty in the environment's response to
the agent's actions.
Systematic Algorithms
• Known: In a known environment, the agent has complete
knowledge of the environment's rules and dynamics. There
are no hidden states or unknown elements in the
environment.
• Solution as a sequence of actions: In such environments, the
solution to a problem is typically represented as a sequence
of actions that the agent can take to transition from the initial
state of the environment to the goal state.
• Local search, on the other hand, is a problem-solving
technique used in optimization and search problems. It differs
from the scenario (characterized by Observable,
deterministic, known environments where a solution is a
sequence of actions ) described above in several ways
Local Search
• Local search is an optimization technique used in artificial
intelligence to find solutions to problems by iteratively exploring
the space of possible solutions, focusing on improving the current
solution by making small incremental changes.
• It is particularly useful for problems where the search space is
large and it is impractical to explore all possible solutions.
• Characteristics of local search algorithms
1. Iterative Improvement
2. Exploration of Neighborhoods
3. No Backtracking
4. Heuristic Guidance
5. Stochastic or Deterministic
6. Convergence to Local Optima
Local Search
• Local search algorithms start with an initial solution and
iteratively explore the neighborhood of the current
solution by applying small changes to the current
solution.
• At each iteration, the algorithm evaluates neighboring
solutions and selects the one that offers the most
improvement according to some evaluation function or
objective.
• Local search algorithms often use heuristic information
to guide the search process.
• One of the main limitations of local search algorithms is
that they may converge to local optima, solutions that are
locally optimal but not globally optimal.
Local Search
• Local search algorithms do not backtrack.
– They only move forward by considering neighboring
solutions and selecting the one that offers the most
improvement. This can make them more efficient in large
search spaces but also means they may get stuck in local
optima.
• Local search algorithms can be stochastic or deterministic.
– Stochastic algorithms introduce randomness into the
search process, which can help escape local optima and
explore a broader range of solutions.
– Deterministic algorithms, on the other hand, follow a fixed
set of rules for selecting neighboring solutions and may be
more predictable in their behavior.
Local Search
• Local Search Algorithms are not Systematic. The path
followed by the agent is not retained. Two key
advantages of local search algorithms are:
1. They use very little memory, usually constant.
2. They can often find reasonable solutions in large or
infinite search spaces
• A state space landscape has both location (defined by
state), and elevation (defined by value of the heuristic
cost function (if aim is to find global minimum) or
objective function (if aim is to find global maximum)).
• A complete local search algorithm always finds a goal if
one exists
Local Search Algorithms
1. Hill-climbing search
2. Simulated Annealing
3. Local beam search
4. Evolutionary algorithms
Hill Climbing Search
Hill-Climbing Search
• This loop will run forever until you reach a terminal state.
Steps in MCTS: BackPropagation
Backpropagation:
In this phase, update the result found in the simulation phase at all
the nodes in the random path (traversed and up till the root node).
This sets the value vi which is then used in the selection phase of
the formula.
•Backpropagation steps:
• Backpropagates the value from the new node to the root node.
• Increment the number of simulation stored in each node
• Increment the number of wins, if the new node’s simulation
results in a win.
MCTS Flowchart
Where:
• xk|k is the current state vector.
• F is the state transition matrix, which describes how the
state vector changes from one time step to another.
• ẋ is the rate of change of the state vector.
The Update Step
• The Kalman filter uses
new observations to refine
its prediction of the state
vector. This is done using
the equations given here.
Benefits and Applications of Kalman Filter
• One of the main benefits of the Kalman filter is its ability to
handle noisy or incomplete data. The Kalman filter is able to
estimate the state of a system even when the measurements are
uncertain or incomplete.
• Another benefit of the Kalman filter is its ability to model
complex systems using a simple set of equations.
• One of the most common applications of the Kalman filter is in
navigation systems. The Kalman filter is used to estimate and
correct the position, velocity, and acceleration of a vehicle using
GPS measurements and other sensors. The Kalman filter is also
used in robotics to estimate the position, velocity, and orientation
of a robot.
• The Kalman filter is also used in tracking systems, such as
tracking aircraft, missiles, and other objects.