Professional Documents
Culture Documents
3 Artificial Intelligence - Week3
3 Artificial Intelligence - Week3
S is a set of states
s∈ S is the initial state
A is a set of actions
ρ:S×A→S is a partial function, that tells you for each state, which actions will
take you to which states.
G:S→bool is the goal test function, which tells you whether a state is a goal
state or not.
P is the path cost function.
Problem Representation in AI
Before a solution can be found, the prime condition is that the problem
must be very precisely defined. By defining it properly, one converts the
abstract problem into real workable states that are really understood.
• In fact, the human mind adopts this strategy for finding solutions to
majority of problems it encounters.
Examples
The Missionaries and Cannibals Problem
• In the missionaries and cannibals problem,
Three missionaries and Three cannibals must cross a river using a boat
which can carry at most two people.
Under the constraint that,
For both banks, if there are missionaries present on the bank, they
cannot be outnumbered by cannibals (if they were, the cannibals
would eat the missionaries). The boat cannot cross the river by itself
with no people on board.
The Missionaries and Cannibals Problem
Initial
Goal
State Space (Left bank to right bank scenario)
State Space (Right bank to left bank scenario)
The Missionaries and Cannibals Problem
(Combine for both scenario LR or RL)
8 Puzzle Problem
8 Puzzle Problem8 Puzzle Problem
8 Puzzle Problem8 Puzzle Problem