Missionaries and Cannibals problem-Artificial Intelligence-Unit-1-Problem Solving-Toy problem

Описание к видео Missionaries and Cannibals problem-Artificial Intelligence-Unit-1-Problem Solving-Toy problem

Unit – 1 – Problem Solving
Problem Formulation -Missionaries and Cannibals Problem
Three missionaries and three cannibals wish to cross the river.
They have a small boat that will carry up to two people.
Everyone can navigate the boat.
If at any time the Cannibals outnumber the Missionaries on either bank of the river, they will eat the Missionaries.
Find the smallest number of crossings that will allow everyone to cross the river safely.

States : combination of missionaries and cannibals and boat on each side of river.
Initial State: 3 missionaries, 3 cannibals and the boat are on the near bank
Successor Function : Move boat containing some set of occupants across the river (in either direction) to the other side
Constraint : Missionaries can never be outnumbered by cannibals on either side of river, or else the missionaries are killed.
Action : Raid the boat with maximum two persons (one or two) across the river (in either direction) to the other side
Goal Test : Move all the missionaries and cannibals across the river.
Path cost : Requires minimum number of moves

0 Initial setup: MMMCCC B –
1 Two cannibals cross over: MMMC B CC
2 One comes back: MMMCC B C
3 Two cannibals go over again: MMM B CCC
4 One comes back: MMMC B CC
5 Two missionaries cross: MC B MMCC
6 A missionary & cannibal return: MMCC B MC
7 Two missionaries cross again: CC B MMMC
8 A cannibal returns: CCC B MMM
9 Two cannibals cross: C B MMMCC
10 One returns: CC B MMMC
11 And brings over the third: - B MMMCCC

Subscribe this channel, comment and share with your friends.
For Syllabus, Text Books, Materials and Previous University Question Papers and important questions
Follow me on
Blog : https://dsumathi.blogspot.com/
Facebook Page : https://www.facebook.com/profile.php?...
Instagram :   / dsumathiphd  

Комментарии

Информация по комментариям в разработке