0% found this document useful (0 votes)
7 views21 pages

Ai Unit 1 Notes

The document outlines the fundamentals of Artificial Intelligence (AI), covering its introduction, history, intelligent systems, and various subareas and applications. It discusses the evolution of AI from its inception in the 1940s to modern advancements, emphasizing the interdisciplinary nature of AI and its reliance on fields such as mathematics, neuroscience, and linguistics. Additionally, it highlights the problem-solving approaches in AI, including state-space search and the significance of knowledge representation and inference mechanisms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views21 pages

Ai Unit 1 Notes

The document outlines the fundamentals of Artificial Intelligence (AI), covering its introduction, history, intelligent systems, and various subareas and applications. It discusses the evolution of AI from its inception in the 1940s to modern advancements, emphasizing the interdisciplinary nature of AI and its reliance on fields such as mathematics, neuroscience, and linguistics. Additionally, it highlights the problem-solving approaches in AI, including state-space search and the significance of knowledge representation and inference mechanisms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

DCET

2024-2025

ARTIFICIAL INTELLIGENCE (PC503IT)

UNIT - I
UNIT-I

TOPICS

1. Introduction:
2. HistoryofAI,
3. IntelligentSystems,
4.Foundations of AI,
5. SubareasofAI,
6. Applications.
7. ProblemSolving–State-SpaceSearch.Statespacerepresentation.

1. Introduction

 FoundationofAIwas laidwiththedevelopment ofBoolean theory.


 Inventionoffirstcomputerin1943,AIhasbeen ofinterest.
 AIhas been of interest to researchers as they have always aimed to make machines more
intelligent than humans and tried to simulate their behavior.
 OverlastsixdecadesAIhasgrownsubstantiallyfromsimpleprogramstointelligent programs
such as game playing, expert systems , intelligent robots, agents etc.
 AI researchers generally uses one of the two basic approaches Top- down and Bottom
up for creating intelligent machines.
Bottomup approach, the beliefis to achieve artificial intelligence by building electronic
replicas of the human brain.
Top-down approach, the attempt is to mimic human behavior of brain with
computer program.
 AI currently comprises of a huge variety of subfields such as perception, logical
reasoning, to a specific task such as game playing, theorem proving ,diagnosing diseases.
 AI is engaged in two significantly different enterprises, namely a science of human
intelligence and an engineering discipline concerned with building a smarter physical
system.
 AIis multi-disciplinary field and is based on the work done in different discipline such as
logic, cognition, linguistics, philosophy, psychology, anthropology, computing.
 AI program are large and it would have not been possible to work unless there is great
advancement in speed and memory of computers.

2. History of AI
The history of AI had cycles of success and failures but kept introducing newcreative approaches
and systematically refining the best one.
 There was no relation between human and machines till early 1950 even though
philosophers in 400 BC had conceived the ideas that mind operates on some knowledge
encoded in some natural language in the same way as the machine does.
 Psychologists further strengthened the idea that humans and other living creatures can be
considered to be information processing machines.

Page2of 21
UNIT-I

 Jhon McCarthy organized a conference on machine intelligence in 1956 and since


thenthe field was known as Artificial Intelligence.
 In1957GeneralProblemSolver(GPS)firstversionwasdevelopedbyNewelland Simon.
 1958McCarthydevelopedLIStProcessingLanguage (LISP).
 MarvinMinskydemostratedthatcomputerprogramscouldsolvespatialandlogical problems
when confined to a specific domain.
 1960STUDENTwasdeveloped whichcould algebricproblems.
 1960 L.Zadeh developed Fuzzy Sets that had the unique ability to make decisions under
uncertain conditions.
 1960SHRDLUwasdevelopedbyTerryWinogardwhichcarriedoutsimpledialogue (via
teletype) with a user in English,about a smalll world of objects.
 1970Minskydeveopled Frametheoryforstoringknowledgetobeused inAIprograms.
 PROLOGwasdevelopedbyRKowalski in1970.
 1970 Expert systems were designed and developed to predict the probability of solution
under a set of conditions.
 1980ManyexpertsystemsweredevelopedbycompaniessuchasDigitalElectronics using XC
ON.
 New theory about Machine Vision was proposed by David Marr where it was possible to
distinguish an image based on basic information such as shape, colour,edge,texture and
shading of the image.
 1985overhundredsofcompaniesofferedmachine vision systems.
 1986WorkonsimulatinghumanbrainstartedusingNeuralNetworks
 MorerecentlyworkonAgentpointofviewhasstartedinAI.
 Agents are viewed to be entities that receive percepts constantly from dynamic
environment and perform actions. So agents can be used in solving any problem which
requires intelligence. Understanding of a problem is embedded in agents and the problem
is solved.

Page3of 21
UNIT-I

3. IntelligentSystems
 AIisacombination ofcomputerscience,physiologyand philosophy.
 AIisabroadtopic,consistingofdifferentfields ,frommachinevisionto expertsystems.
 AI is the science and engineering of making intelligent machines, especially intelligent
computer programs said by John McCarthy. Further he defines intelligence as the
computational part of the ability to achieve goals in the world.
 Variousauthors havedefined AIdifferentlyas given below:
 AIisthe studyofmentalfaculties throughtheuse computationalmodels.
 The art of creating machine that performs functions, which require intelligence
when performed by people.
 AI is a field of study that seeks to explain and emulate intelligent behavior
interms of computational processes.
 AI isthestudyof howtomakecomputersdo thingsatwhichatthe moment, people
are better.
 AI isthestudyofcomputationsthatmakeitpossibletoperceive,reasonand act.
 AI is the branch of computer science that is concerned with the automation
ofintelligent behavior.

Page4of 21
UNIT-I
 AI is a branch of computer science which is concerned with the study and creation of
computer systems that exhibit some form of intelligence OR those characteristics which
we associate with intelligence in human behavior.
 AI program must have the capability and characteristics of intelligence such as learning,
reasoning, inferencing, perceiving and comprehending information.

UnderstandingAI
 It requires understanding of the related terms such as intelligence, knowledge, coginiton,
learning.
 AIshowsbestoncomplexproblemsforwhichgeneralprinciplesdonothelpmuch, though there
are a few useful general principles.
 AIisalso difficultto understand byits content.
 TheboundariesofAIarenotwelldefined.
 Generallyitisthoughtasadvancedsoftwareengineering,sophisticatedsoftware
techniques for hard problems that cannot be solved in easy way.
 AIalsoinvolves workingindomain inwhichtheproblemis oftenpoorly misunderstood.
 AIprograms-likepeople-areusually notperfect,and evenmake mistakes.
 It often means, nonnumericways ofsolving problems, sincepeople can't handlenumbers
well.
 Nonnumericwaysaregenerally"commonsense"ways,notnecessarily thebestones.
 TwoViewsofAIGoals
 AIisaboutduplicatingwhatthe(human)brainDOES
Cognitive Science
 AIisaboutduplicatingwhatthe(human)brainSHOULDdo
Rationality (doing things logically)
 There are lot of challenges in building system that mimic the behaviour of human
brainwhich is made up of billions of neurons.
 Inordertoclassifymachinesas"Intelligent",itisnecessarytodefineintelligence.
 The earliest best method to gauge intelligence of a system was the Turing Test that was
proposed by Alan Turing in the year 1950.
 AlanTuringdefinedintelligencebehaviorastheabilitytoachievehuman-level
performance in all cognitive task, sufficient to fool the interrogator.

Page5of 21
UNIT-I
AsystemissaidtopassTuringTestifahumanquestionerisunabletodeterminefromrepeated questions
of any kind ,whether he or she is talking to another person or to a machine/system.

Example:ELIZA
ElizawasfirstprogramdevelopedbyJosephWiezbaumtoconverseinEnglishinmid1960's It passed
turing test.
Thefollowing passageshows Eliza’stalking

Elizawasaprogramthatconversedwithuserin English.
Theprogramwasabletoconverseaboutanysubject,becauseitstoredsubjectinformationin data banks.
Elizawasabletopickupspeechpatternfromuserquestionsandprovideresponsesusingthose patterns.
Elizarephrasedtheusersstatements asquestionsandposted thosetotheuser.

TheMaincharacteristicsofELIZAare

1. Simulation of intelligence: These program are not intelligent at all in real sense. They do not
understand the meaning of utterance. Instead they simulate intelligent behavior quite effectively by
recognizing keywords and phrases..

2. Quality of response: It is limited by the sophistication of the ways in which they can process the
input text at a syntacticlevel. For examplethe numberof templates available is aserious limitation.

3. Coherence: The earlier version of the system imposed no structure on the conversation. Each
statement was based entirely on the current input and no context information was used. More
complex version of ELIZA can do a little better.

Page6of 21
UNIT-I

4. Semantics: Such system have no semantic representation of the content of either the user input
orthe reply.But it looks that it imitates the human converstation style.

CategoriesofIntelligentSystems
 Systems thatthinklikehumans
 Systemsthat actlikehumans
 Systemsthatthinkrationally
 Systemsthatact rationally

Systemsthatthinklikehumans
 Mostofthetimeit isablackbox wherewearenotclear aboutourthought process.
 Onehasto knowfunctioningof brainandits mechanismforpossessing information.
 It is an area of cognitive science. The stimuli are converted into mental representation.Cognitive
processes manipulate representation to build new representations that are used to generate actions.
 Neuralnetworkisacomputing modelforprocessinginformationsimilartobrain.

Systemsthatactlike humans
o Theoverall behaviorofthesystemshouldbehumanlike.Itcouldbeachievedbyobservation.
o Turingtest is example.

Systemsthatthinkrationally
o Such systems rely on logic rather than human to measure correctness. For thinking rationally
or logically, logic formulas and theories are used for synthesizing outcomes.
o Forexample, givenJohnisahumanandallhumansaremortalthenonecanconclude logically that
John is mortal
o Notallintelligentbehavioraremediatedbylogical deliberation
Systemsthatactrationally
o Rationalbehaviormeansdoingrightthing.
o Evenifmethodisillogical,theobservedbehaviormustberational.

To summarize, we can define intelligence to be aproperty of mind which encompasses


manymental abilities.
 Reasonanddrawmeaningfulconclusion.
 Plansequenceofactiontocomplete goal.
 Solveproblems.
 Thinkabstractly.
 ComprehendideasandhelpcomputertocommunicateinNaturalLanguage(NL).
 Storeknowledgeprovided beforeorduring interrogation.
 Learnnewideasfromenvironmentandnewcircumstances.
 Offeradvicebased onrulesand situations.
 Learnnewconceptsandtasksthatrequirehighlevelsof intelligence.

Page7of 21
UNIT-I

3.3Components ofAIProgram
 AItechniques mustbeindependentof theproblemdomain as far as possible.
 AIprogramshould have
o knowledge base
o Navigationalcapability which contains Control strategy and inference
mechanism.

KnowledgeBase
 AIprograms should be learning in natureand update its knowledgeaccordingly.
 Knowledgebaseconsists offactsandrules.
 CharacteristicsofKnowledge:
Itisvoluminousinnatureandrequiresproperstructuring It
may be incomplete and imprecise
Itmaykeeponchanging(dynamic)
Control Strategy
 determinestheruletobeapplied
 someheuristics(thump rule)maybeapplied.

Inferencerequires
search through knowledge baseandderive new knowledge using existing knowledgewith
the help of inference rules.

 Inference is a general term representing the derivation of new knowledge from existing
knowledge and axioms (i.e., rules of derivation) within a single step, and can be one of many
kinds, such as, induction, deduction and abduction.
o For example, "modus tollens" is a rule of inference. Thus, one inference is the derivation
of new knowledge using a single step using modus tollens.

 Reasoning is in context of a goal (e.g., decide whether a propositional formula is


satisfiable or not) and is carried out via a search process involving multiple inferences. Choices
during such search have to be made such as which axiom to "fire" along with which knowledge
in order to derive new knowledge.
 Toreasonistodrawinferencesappropriatetothesituation

4. FoundationsofAI
FoundationofAIis based on
 Mathematics
 Neuroscience
 Control Theory
 Linguistics

Foundations-Mathematics
 AIsystemsuseformallogicalmethodsandBooleanlogic,analysisoflimitstowhatcanbe
computed,Probability theory

Page8of 21
UNIT-I
 UncertaintythatformsthebasisformostmodernapproachestoinAIapplicationscanbe handled
by
 ModalandTemporallogics,Fuzzy logic.

Foundations-Neuroscience
 Thisscienceofmedicinehelpsinstudyingthefunctioningofbrain.
 Earlystudies(1824)reliedoninjuredandabnormalpeopletounderstandwhatpartsofbrain work
 Morerecentstudiesuseaccuratesensorstocorrelatebrainactivityto humanthought
 Bymonitoringindividualneurons,monkeyscannowcontrolacomputermouseusingthought alone
 Moore’slawstatesthatcomputerswillhaveasmany gatesashumanshave neuronsin 2020
 Researchersareworkingtoknowastohowtohaveamechanicalbrain.
 SuchsystemswillrequireParallelcomputation,remapping,interconnectionstoalargeextent.

Foundations–Control Theory
 Machinescanmodifytheirbehaviorinresponsetotheenvironment(sense/action loop)
 Water-flowregulator,steam enginegovernor, thermostat
 In1950,controltheorycouldonlydescribelinearsystemsandAIlargelyroseasaresponseto this
shortcoming.
 Thistheoryofstablefeedbacksystems(1894)Buildsystemsthattransitionfrominitialstateto goal
state with minimum energy.

Foundations-Linguistics
 Speechdemonstratessomuchofhumanintelligence
 Analysisofhumanlanguagerevealsthoughttakingplaceinwaysnotunderstoodinother
settings
 Childrencancreatesentences theyhaveneverheardbefore
 Languageandthought arebelievedtobetightlyintertwined

5. SubareasofAI

 Knowledgerepresentation
 Theoremproving Mechanism
 Gameplaying
 Commonsensereasoningdealingwithuncertaintyanddecisionmaking
 Learningmodels,inferencetechniques,patternrecognition, searchandmatching etc.
 Logic(fuzzy,temporal,modal)in AI
 Planningand scheduling
 Naturallanguageunderstanding
 Computer vision
 Modelsforintelligenttutoring systems
 Understandingspokenutterances
 Robotics
 DataMining
 Machinetranslation systems
 Neural Networks, AItoolsetc
 WebAgents

Page9of 21
UNIT-I

6. Applications
 Business:Financialstrategies,giveadvice
 Engineering:checkdesign,offersuggestionstocreatenew product
 Manufacturing:Assembly,inspection&maintenance
 Medicine:monitoring,diagnosingandprescribing
 Mining:usedwhenconditions aredangerous
 Education: Inteaching
 household: Adviceoncooking, shopping etc.
 farming:prunetrees&selectively harvestmixedcrops.
 Frauddetection
 Spaceshuttlescheduling
 Objectidentification
 Informationretrieval
7. ProblemSolving
Problem Solving is a method of deriving solution steps beginning from initial description of the
problem to the desired solution. It has been one of the focus areas of AIand can be characterized
as a systematic search using a range of possible steps to achieve some predefined solution.
The task is solved by a series of actions that minimizes the differencebetween the given
situation and the desired goals.
InAI,theproblemsarefrequentlymodeledasastatespaceproblem.
State space is a set of all possible states from start to goal states. The set of states form a
graph. Two states are linked in a graph if there is an operation which can be executed to
transformonestatetoother.While solvingaproblems,thestatespaceisgeneratedintheprocess of
searching for its solution.

Difference between state space search used in AI and the conventional computer science
search methods.
In AI the states of the graph are generated as they are explored for the solution path and
discarded thereafter. In traditional search methods, search are applied to the existing graphs. The
typical state-space graph for solving problems is to large to be generated and stored in memory.

Twotypesofproblem solvingmethodsthataregenerallyfollowed include


GeneralPurposemethod
SpecialPurposemethod
A general purpose method is applicable to a wide variety of problems whereas a special
purpose method is tailor-made for a particular problem and often exploits very specific features
of the problem.

Themostgeneralapproach to solveaproblem istogeneratethe solutionandtest it.


 For generating a new state in the search space, an action/operator/rule is applied and tested
whetherthestateis thegoal stateornot. In casethestateis not thegoal statetheprocedureis
repeated.
 TheorderofapplicationoftherulestothecurrentstateiscalledControlstrategy.

Page10of 21
UNIT-I

Since AI program involves clean separation of computational components of operation, control


and data it is useful to structure AI programs in such a way that it helps describe search process
efficiently that forms the core of many intelligent processes.

GeneralProblem Solving
 Production system is one of the formalisms that help AI programs to do search
process conveniently in the state space problems. This system comprises of start state
andgoalstatesoftheproblemalongwithoneormoredatabasesconsistingofsuitable and
necessary information for the particular task.
 PSconsistsof anumberofproduction rules.
 Leftsidethatdeterminestheapplicabilityoftheruleandarightsidedescribethe action
to be performed if the rule is applied.
 Leftsideoftheruleiscurrentstatewhereastherightsidedescribethenewstatethat is
obtained from applying the rule.
 Theproductionrulesoperateonthedatabasesthatchangeastheseareapplied. State

space search

 UsingStatespacesearch,onecanfindapathfromstartstatetogoalstatewhilesolvinga problem.
 AStatespacebasically consistsoffour components.
o AsetScontaining start statesoftheproblem.
o Aset G containinggoalstates of theproblem.
o Setofnodes(states)in thegraphortree.Each noderepresentsthestatein problem-
solving process.
o Set of arcs connecting nodes. Each arc corresponds to operator that is a step in a
problem-solving process.

 Asolution path is apath through the graphfromanodein S to a nodein G.


 Themainobjectiveofsearch algorithmisto determinethe solutionpath inagraph.
 Theremay bemorethanonewaysof solving aproblem.
 Onewouldexerciseachoicebetweenvarioussolutionpathbasedonsomecriteriaof
goodness or on some heuristic function.
 Commonlyusedapproachistoapplyappropriateoperatortotransferonestateofproblemto another.

MissionariesandCannibalsProblem
 ItwasusedbySaulAmarel asanexampleofproblemrepresentationin1968.
 Inthemissionariesandcannibalsproblem,threemissionariesandthreecannibalsmustcrossa river.
 Usingaboatwhichcancarryat mosttwopeople,undertheconstraint that,forbothbanks,
 Iftherearemissionaries presentonthebank,theycannotbeoutnumbered bycannibals(ifthey were,
the cannibals would eat the missionaries).
 Theboat cannotcrosstheriverbyitselfwithno peopleon board.
 And,insomevariations,oneof thecannibalshasonlyonearm andcannotrow.
 Ononebankofariver arethreemissionaries(blacktriangles)andthreecannibals (redcircles).
 Thereisoneboatavailablethat canholduptotwopeopleandthattheywouldliketouseto cross the
river.

Page11of 21
UNIT-I
 Ifthecannibalseveroutnumberthemissionariesoneitheroftheriver’sbanks,themissionaries will get
eaten.
 Howcantheboatbeusedtosafely carryall themissionariesandcannibalsacrossthe river?

Initial state:
All missionaries, all cannibals, andthe boat are on theleft bank

5 possible actions:
 onemissionarycrossing
 onecannibal crossing
 twomissionaries crossing
 twocannibalscrossing
 onemissionaryandonecannibal crossing

Final State
Allmissionaries, allcannibals,andtheboatareontheRight bank

 Thepossibleoperatorsappliedinthisproblem are
 {2M0C,1M1C,0M2C,1M0C, 0M1C}.
 HereMismissionary and Ciscannibal.
 Digitbeforethesecharactersmeansnumberofmissionariesandcannibalspossibleatany point
in time.

Page12of 21
UNIT-I

 Theseoperators canbeapplied inboth the situations


 i.e.,ifboatisonleftbankthenwewrite“Operator”andiftheboatison rightbankof the river
then we write “Operator ”.
 Forthesakeofsimplicity,let usrepresentstate (L:R),where
 L=n1Mm1C1B
 R =n2Mm2C0B.
 Hereboatwith1 or0representing presenceofabsenceoftheboat.
 Startstate:(331:000)
 Goalstate:(000:331)
 Invalidstatesuchas(121:210)wouldleadtoonemissionaryandtwo cannibalsonthe left
bank which is not a possible state.
 Givenavalidstate, say,(221:110),theoperator0M1C or0M2Cwould beillegal.
 Loopingsituations areto beavoided.

Page13of 21
UNIT-I

Page14of 21
UNIT-I

TwoPossiblesolutionpaths

SolutionPath 1 SolutionPath 2

1M1C  1M1C 
1M0C  1M0C 
0M2C  0M2C 
0M1C  0M1C 
2M0C  2M0C 
1M1C  1M1C 
2M0C  2M0C 
0M1C  0M1C 
0M2C  0M2C 
0M1C  1M0C 
0M2C  1M1C 

Page15of 21
UNIT-I

The8-Puzzle
ProblemStatement:
The eight puzzle problem consists of a 3 x 3 grid with (1 to 8) consecutively numbered tiles
arranged on it with one empty cell. At any point, the adjacent tile can move to the empty cell
creatinganewemptycell.Solvingthisprobleminvolvesarrangingtilessuchthatwegetthegoal state
from the start state.
Startstate Goalstate

3 7 6 5 3 6

5 1 2 7 2

4 8 4 1 8

 AStateforthis problemshould keep trackof the position ofalltiles onthegame board


 0representingblank(empty cell onboard)
 Startstateandgoalstatemayberepresentedaslistwitheachlistrepresentingcorresponding row.
 Thestartstatecouldberepresentedas:
 [[3,7,6],[5,1,2],[4,0,8]]
 Thegoalstatecouldberepresented as:
 [[5,3,6][7,0,2], [4,1,8]]
 Theoperatorscanbethoughtofmoving{up,down,left,right},thedirectioninwhichblank space
effectively moves.

TryallpossiblepathsandreachGoalstate…

Page16of 21
UNIT-I

StateSpaceSearch:Astatespacerepresentsaproblemintermsofstatesandoperatorsthatchangestates.A state space


consists of:
 Arepresentationofthestatesthesystemcanbein.Forexample,inaboardgame,theboardrepresentsthe current
state of the game.
 A set of operators that can change one state into another state. In a board game, the operators are the legal
movesfromanygivenstate.Oftentheoperatorsarerepresentedasprogramsthatchangeastaterepresentation to
represent the new state.
 Aninitial state.
 Asetoffinalstates;someofthesemaybedesirable,othersundesirable.Thissetisoftenrepresented implicitly
by a program that detects terminal states.

TheWaterJugProblemInthisproblem,weusetwojugscalledfourandthree; fourholdsamaximumoffour gallons of


water and three a maximum of three gallons of water. How can we get two gallons of water in the four jug?
Thestatespaceisasetofprearrangedpairsgivingthenumberofgallonsofwaterinthepairofjugs atany time, i.e., (four,
three) where four = 0, 1, 2, 3 or 4 and three = 0, 1, 2 or 3.
Thestart state is (0, 0) and the goal state is (2, n) wheren may be any but it is limited to three holding from 0 to 3
gallons of water or empty. Three and four shows the name and numerical number shows the amount of water
injugsforsolvingthewaterjugproblem.Themajorproductionrulesforsolvingthisproblemareshownbelow :

Page17of 21
UNIT-I

Theproblemsolvedbyusingtheproductionrulesincombinationwithan appropriatecontrolstrategy,moving through


the problem space until a path from an initial state to a goal state is found. In this problem solving process,
search is the fundamental concept. For simple problems it is easier to achieve this goal by hand but there will be
cases where this is far too difficult.
ControlStrategies
 DepthfirstandBreadthfirst aresystematiccontrolstrategiesbuttheseareblind searches.
 In Depth firststrategy,wefollowasinglebranch ofthetreeuntilityields asolutionorsomepre-
specified depth has reached, then go back to immediate previous node, and explore other
branches using depth first strategy.

 In Breadth first search,a search space tree is generated level wise until we find a solution or some
specified depth is reached.
 Thesestrategiesareexhaustive,uninformedandblindsearchesinnature.

 Iftheproblemissimple,thenanycontrolstrategythatcausesmotionandsystematicwill lead to a
solution
 Buttosolverealworld problemeffectivecontrolstrategymust beused.
 Theproblemcan besolvedbysearching forasolution.
 Themainworkintheareaofsearchstrategiesistofindthecorrectsearchstrategyfora given problem.
 Transforminitialstateofaproblemintosomefinal goalstate.
 Problemcanhavemorethanoneintermediatestatesbetweenstartandgoalstates.
 Allpossiblestatesoftheproblem takentogetheraresaidto form

o astatespaceorproblemstateandsearchiscalledstatespacesearch.

o Search is basically a procedure to discover a path through a problem space from initial
state to a goal state.

o Therearetwodirectionsinwhichsuchasearchcouldproceed.
o Datadrivensearch,forwardchainingfromthestartstate
o Goaldrivensearch,backwardchaining,fromthegoalstate

Page18of 21
UNIT-I

ForwardReasoning(Chaining):
 Itisacontrolstrategythatstartswithknownfactsandworkstowardsaconclusion.
 Forexamplein8puzzleproblem,westartfrominitialstatetogoalstate.
 In this case we begin building a tree of move sequences with initial state as the root of the
tree.
 Generatethenextlevelofthetreebyfindingallruleswhoseleftsidesmatch withrootand use their
right side to create the new state.
 Continueuntilaconfigurationthatmatchesthe goalstateis generated.
 Language OPS5 uses forward reasoning rules. Rules are expressed in the form of “if-
thenrule”.
 Findoutthosesub-goals whichcouldgeneratethe givengoal.

BackwardReasoning(Chaining)
 Itisagoaldirectedcontrol strategythatbeginswiththefinal goal.
 Continuetoworkbackward,generatingmoresubgoalsthatmustalsobesatisfiedin order
to satisfy main goal.
 Prolog(Programming inLogic)usesthisstrategy.

 We can use both data-driven and goal-directed strategies for problem solving, depending on the
nature of the problem.
 Eightpuzzleproblemhassinglestart stateandsinglegoal state
o itmakesnodifferencewhethertheproblemissolvedintheforwardorthebackward direction.
o Thecomputational effort isthesame. Inboth thesecases,samestatespace is searchedbut in
different order.

Page19of 21
UNIT-I

 Iftherearelargenumber ofexplicitgoal statesandoneinitial state,


o then it would not be efficient to try to solve this in backward direction as we don’t know
which goal state is closest to the initial state.So it is better to reason forward.
 Movefromthesmallerset ofstatesto thelargersetofstates.
 Proceed in the direction with the lower branching factor (the average number of nodes that can
be reached directly from single node).
 Ifthere arelargenumberofexplicitgoalstatesandoneinitialstate,
 then it would not be efficient to try to solve this in backward direction as we don’t know
which goal state is closest to the initial state.So it is better to reason forward.
 Ifproblemhasasingleinitialstateandasinglegoalstate,itmakesnodifferencewhetherthe problem is
solved in the forward or the backward direction.
 Thecomputationaleffortisthesame.Inboththesecases,samestatespaceissearchedbutin different
order.
 Movefrom thesmaller setofstates tothelarger set ofstates.
 Proceed in the direction with the lower branching factor (the average number of nodes that canbe
reached directly from single node).
 Inmathematics, supposewehavetoproveatheorem.
 Thereareinitial states assmallsetofaxioms.
 Fromthesesetofaxioms, wecan provelargenumber oftheorems.
 Ontheotherhand, thelargenumberoftheoremsmustgo backtothesmallsetof axioms.
 Sobranchingfactorissignificantlygreater goingforwardfromaxiomstotheoremthangoing from
theorems to axioms.
 Thereforeprovingtheoremsusing backwardstrategyismoreuseful.

CharacteristicsofProblem
Someofthecharacteristics are

1. Typeofproblem
Ignorable
Recoverable
Irrecoverable
Ignorable
 Thesearetheproblemswherewecanignorethe solution steps.
 Ex.Inprovingatheorem,Ifsomelemmaisprovedtoprovethetheoremandlaterwe realize that it
is not useful ,then we can ignore this solution step and prove other lemma.
 Suchproblemscanbesolvedusingasimplecontrol strategy.
Recoverable
 Thesearetheproblemswheresolutionstepscanbeundone.
 Ex. In waterjug problem, ifwehave filled up the jug, wecan empty it also. Anystatecan be
reached again by undoing the steps.
 Theseproblemsareusuallypuzzlesplayedbyasingleplayer.
 Suchproblems can be solved using back-tracking, so control strategy can beimplemented
using a push down stack.

Page20of 21
UNIT-I

Irrecoverable
 Theseproblemswheresolution steps cannotbeundone.
 Ex.Anytwoplayersplayingchess, playingcards,snakeandladders, etc.
 Suchproblemscan besolvedusing aplanning process.

2. Decomposabilityofproblem
 Divide the problem into a set of independent smaller sub-problems, solve them and combine the
solution to get final solution.
 The process of dividingsub problems continuestill we get the set of smaller sub-
problemsforwhich a small collection of specific rules are used.
 Divideandconquer techniqueiscommonly usedmethodforsolvingsuch problems.
 Eachsubproblemissimplertosolveand canbehandedtoadifferent processor.
 Thussuchproblemscanbesolvedinparallelprocessingenvironment.

3.Roleof knowledge
 Knowledgeplaysavitalroleinsolving any problems.
 Knowledgecouldbeintheformsofrulesandfactswhichhelpsgeneratingsearchspacefor finding
solution.

4.Consistencyof KnowledgeBaseusedinsolvingProblem.
 Makesurethattheknowledgebased usedto solvethe problemis consistent.
 Inconsistentknowledgebasewill leadtowrongsolution.
o Ex.Ifitishumid,it willrain
o Ifit is sunny, then it is daytime
o Itissunny,it isnighttime
 Aboveknowledgeisnotconsistentasthereisacontradictionbecauseitisdaytimecanbededuce from
knowledge ,thus both daytime and nighttime is not possible at the same time.

Page21of 21

You might also like