AI Lecture 3
AI Lecture 3
INTELLIGENCE Lecture #3
CS-414
• Reflex-based models in AI refer to
systems that operate based on predefined
rules or reactions to specific stimuli, rather
than making decisions through complex
reasoning or learning.
• These models are typically characterized
by their simplicity and efficiency in
environments where the rules are well-
defined and do not change frequently.
key aspects of reflex-based models:
1. Rule-Based Systems:
•Reflex-based AI often relies on a set of if-then rules. For
example, in a game like chess, a reflex-based AI might
have rules for capturing pieces or moving to certain
positions based on the opponent's moves.
2. Reactive Behavior:
•These models respond to specific inputs with predefined
outputs. They don't analyze or learn from past experiences
but instead execute a direct response based on the current
state of the system.
3. Applications:
•Reflex-based models are often used in scenarios where
decisions need to be made rapidly and where the
Applications and Limitations
•Applications:
• Reflex models are commonly used in simple systems
where complexity is minimal, and rapid response is
crucial. They are often found in embedded systems, basic
robots, and simple control systems.
•Limitations:
• Reflex models are limited in their ability to handle
complex environments or tasks that require planning,
learning, or adaptation. They can only handle situations
they have explicitly been programmed to manage and
may struggle with unforeseen or novel situations.
In summary, reflex models are useful for straightforward,
reactive tasks where immediate responses are needed, but
they are not suitable for more complex scenarios that require
• Modeling takes messy real world problems
and packages them into neat formal
mathematical objects called models
3.Training: This involves feeding data into a model and adjusting its parameters
to minimize the error between the model’s predictions and the actual outcomes.
Techniques like gradient descent are commonly used for this.
Applications:
•Route planning for logistics and delivery services.
•Circuit design in electronics.
•Vehicle routing in transportation and logistics.
Challenges:
•The problem is NP-hard, meaning that finding the exact
optimal solution can be computationally infeasible for large
2. Knapsack Problem
Applications:
•Resource allocation and budget management.
•Investment decisions and portfolio optimization.
•Cutting stock problems in manufacturing.
Challenges:
•The problem can be solved exactly using dynamic
programming for small instances, but becomes
Graph Coloring
Description: Given a graph, the task is to assign
colors to the vertices such that no two adjacent
vertices have the same color, using the minimum
number of colors.
Applications:
•Frequency assignment in wireless networks to avoid
interference.
•Register allocation in compilers to manage CPU
registers.
•Scheduling problems where conflicts need to be
avoided.
Constraint Satisfaction Problems (CSPs)
Description: Involves finding values for variables
such that all constraints are satisfied. Constraints can
be unary (involving a single variable) or binary
(involving pairs of variables), and may be more
complex.
Applications:
•Sudoku and other puzzles.
•Scheduling and assignment problems.
•Configuration problems in systems design.
Challenges:
•CSPs can be solved using backtracking algorithms,
CONTINUOUS OPTIMIZATION
• Continuous optimization in AI focuses on problems
where the decision variables can take any value
within a continuous range.
1.Local Minima:
1.Continuous optimization algorithms may get
stuck in local minima, especially in non-convex
problems.
2.Computational Complexity:
1.High-dimensional problems or problems with
complex constraints can be computationally
intensive.
3.Scalability:
1.Ensuring that optimization algorithms scale
efficiently with problem size and complexity.