problem_solving (1)
problem_solving (1)
▶ Ill-Defined Problems:
▶ The problem lacks a clear initial state, goal state, or set of
actions.
▶ Ambiguous goals or constraints.
▶ Examples: Writing a novel, improving education, defining a
good life.
▶ These problems are harder to solve because they involve
ambiguity and undefined criteria.
Problem Formulation
You are given two jugs, a 4-gallon one and a 3- gallon one, a pump
which has unlimited water which you can use to fill the jug, and
the ground on which water may be poured. Neither jug has any
measuring markings on it. How can you get exactly 2 gallons of
water in the 4-gallon jug?
Water Jug Problem: Solution
Problem Formulation
▶ States: Determined by the position of the farmer, goat, wolf,
and cabbage on each side of the river.
▶ State Representation: Four variables, F , G , W , and C ,
representing the positions of the farmer, goat, wolf, and
cabbage respectively.
▶ Constraints:
▶ Goat and cabbage (GC) cannot be left together alone.
▶ Wolf and goat (WG) cannot be left together alone.
▶ Initial State: [West: FGWC, East: -]
▶ Goal State: [West: -, East: FGWC]
Actions/Operators/Rules
The actions that can be performed in the Farmer, Goat, Wolf, and
Cabbage problem are as follows:
Farmer, Goat, Wolf, and Cabbage problem
Search algorithms are used to explore the state space and find
solutions to a problem.
▶ Uninformed Search:
▶ The algorithm has no additional information about the goal
state other than what is in the current state.
▶ Examples: Depth-first search (DFS), breadth-first search
(BFS).
▶ Informed Search:
▶ The algorithm uses heuristic information to guide its search
toward the goal state.
▶ Example: A* search, which uses both path cost and heuristic
to find the optimal solution.
Search Algorithms (Continued)