YouTube2Text

Lec-4: What is State Space Search | Introduction to Problem Solving in Artificial Intelligence — Transcript

by Gate Smashers · 1,797 words · 271 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Hello friends welcome to Gate Smashers
  2. 0:02In today's video we are going to discuss
  3. 0:05State space searching
  4. 0:06It is one of the major application of artificial intelligence
  5. 0:09Problem solving
  6. 0:10That is how to solve a particular problem
  7. 0:12And if we talk about era of 1960-1970
  8. 0:15At that time the major research that was done in artificial intelligence
  9. 0:19That is done on problem solving
  10. 0:22And in which if we talk related to game
  11. 0:24Like tic tac toe game is there
  12. 0:26Water jug problem, 8 queen problem
  13. 0:28Chess game, Go
  14. 0:29How can we solve these problems
  15. 0:32Through machines
  16. 0:33Through agent
  17. 0:34As human being solves the problem
  18. 0:37In the same way we want that the machine should solve the problem
  19. 0:40So that is called a problem solving area
  20. 0:43In problem solving area
  21. 0:45State space searching is very important
  22. 0:48What is the reason
  23. 0:50What is it's meaning, what is the meaning of state space over here
  24. 0:53Number of states
  25. 0:55In which the problem can go
  26. 0:57All the different states
  27. 0:59If we normally talk on our level also
  28. 1:02Let's say if we start research on any topic
  29. 1:05If we start research
  30. 1:06Then obviously we will not reach at all the places in one time
  31. 1:10We start with a start state
  32. 1:12We have a goal state
  33. 1:14Now it is possible that between start and goal state there are some intermediate state
  34. 1:18We go level by level
  35. 1:20We achieve our goal state
  36. 1:22So all the set of states
  37. 1:24We use them in the form of representation
  38. 1:27Because in artificial intelligence we majorly talk
  39. 1:30How to represent the problem
  40. 1:34Precisely
  41. 1:35Because representing a problem is a major task
  42. 1:38Because if you are giving this problem to your machine or to your agents
  43. 1:42Then you cannot tell it verbally
  44. 1:45That this is the problem
  45. 1:47You see for yourself also
  46. 1:48If you start playing any new game
  47. 1:50You do not know anything about that game
  48. 1:51In your house your elders are playing your brothers and sisters are playing
  49. 1:54So obviously you want someone to tell you that how to play that game
  50. 1:57Tell me all the rules once
  51. 2:00Which are the set of states in it
  52. 2:03How will I play it
  53. 2:03All these points
  54. 2:04It is necessary for you to represent the problem precisely
  55. 2:09And other than that
  56. 2:12If we will represent it precisely
  57. 2:14Then we can also easily analyze it
  58. 2:17How we have to play the game
  59. 2:19How we can take steps one by one
  60. 2:22So to represent the problem precisely
  61. 2:25And if you want to represent the problem in all set of states
  62. 2:29Then we use the 'state space search'
  63. 2:33And over here we use this tupple
  64. 2:36In which S represents total number of states
  65. 2:39And which are the major states in S
  66. 2:42Start state
  67. 2:43Goal state
  68. 2:44Intermediate states are there
  69. 2:47Obviously between start and goal there will be some intermediate states
  70. 2:50Then A
  71. 2:52A is set of actions
  72. 2:54All possible actions
  73. 2:55Let's say we take an example
  74. 2:588 puzzle problem
  75. 3:01If we talk about 8 puzzle problem
  76. 3:03So obviously what I want in it first of all
  77. 3:05That I tell my machine or agent, the problem very clearly
  78. 3:09So what are you telling in 8 puzzle problem
  79. 3:11That we have a board of 3 * 3
  80. 3:14And we have 9 spaces in board of 3*3
  81. 3:18Obviusly the board is of 3*3 so how many places we will have
  82. 3:21We will have 9 places
  83. 3:23In which we have 8 tiles
  84. 3:25Which are numbered
  85. 3:26Lets say we have number 2
  86. 3:283, 4, 1, 6, 7, 8
  87. 3:375
  88. 3:38Let's say in this way
  89. 3:39Now I have random tiles numberd 1,2,3,4,5,6,7,8
  90. 3:43I have numbered tiles
  91. 3:45And I have one empty space
  92. 3:48Now over here first of all I have to represent the problem precisely
  93. 3:52That I have board of 3*3
  94. 3:54And these are the plates that I have
  95. 3:55Next what we have
  96. 3:57I know that this is my start state
  97. 4:01Now I want goal state
  98. 4:03Where I want to reach
  99. 4:04Otherwise you will keep on searching
  100. 4:06Obviously somewhere you should know your goal state
  101. 4:09So let's say if we define our goal state
  102. 4:11That this is my goal state
  103. 4:13Then you can easily start your search from goal state
  104. 4:18So that you can reach to goal state
  105. 4:20Let's say this is my goal state 1,2,3,4,5,6,7,8
  106. 4:26This is my goal state
  107. 4:28This is my start state
  108. 4:29Now when we start searching
  109. 4:32When we start exploring it
  110. 4:34Then obviously my intermediate states will start forming
  111. 4:37So I will compare each intermediate state with this
  112. 4:41Whether it is my goal state or not
  113. 4:43When I will get, then the searching will stop over there
  114. 4:45So this is the basic concept
  115. 4:47Of searching
  116. 4:47Actions
  117. 4:49If we talk about all possible actions
  118. 4:51What A? All possible actions
  119. 4:52What are all possible actions
  120. 4:54That my empty space
  121. 4:56Either I can move it upward
  122. 4:59I can move it downward
  123. 5:00I can move it left
  124. 5:02Or I can move it right
  125. 5:05These are my 4 possibilities
  126. 5:07These are the 4 possibilities I have
  127. 5:09You should know about legal and illegal moves
  128. 5:12Obviously, you will say that I can take 5 over here, and I will move 2 over here
  129. 5:16No
  130. 5:17That is a illegal state
  131. 5:18So you should know all the rules over here
  132. 5:22You will have to predefine them
  133. 5:23So over here what am I saying
  134. 5:25That the empty space can be replaced by left, right, up or down
  135. 5:31Now I will choose any one action from that
  136. 5:34I will have to choose any one action
  137. 5:36Let's say in this
  138. 5:38First of all move upward
  139. 5:41So what is the meaning of moving upward
  140. 5:43That this my new state
  141. 5:45Which you can say it is an intermediate state
  142. 5:48In which what I have done
  143. 5:49I have moved the space upward
  144. 5:51That means 3 came here
  145. 5:52Other places are as it is
  146. 5:57In this way
  147. 5:57What can be the second one
  148. 5:59Let's say if I move it downwards
  149. 6:01Then I can move it this way
  150. 6:03Like this
  151. 6:06I will take the space down
  152. 6:087 will come up
  153. 6:09Rest of the concept is the same
  154. 6:115, 1, 8, 6
  155. 6:14So this I ahve bought space downward
  156. 6:17In the same way if we keep the space on left side
  157. 6:19Then this will be formed over here like this
  158. 6:25If I do it on left then 5 will come here
  159. 6:262,3,4,1,6,7,8
  160. 6:31In the same way you can move it to right side
  161. 6:34What are doing actually
  162. 6:36You are starting to explore your searching
  163. 6:40And these are different branches
  164. 6:42These different branches are getting formed
  165. 6:44Then what you can do ahead in this
  166. 6:47Look here carefully
  167. 6:48You can either move the space in left
  168. 6:51Or you can move it right
  169. 6:52Or you can move it down
  170. 6:54You cannot move it up
  171. 6:55In the same way if we talk over here
  172. 6:57You cannot move down
  173. 6:58You can go up, left and right
  174. 6:59If we talk in this then, you can do up
  175. 7:01You can do right and down
  176. 7:03But you cannot do left
  177. 7:04So this is set of all possible
  178. 7:06But from that which one you have chosen
  179. 7:08In this which one you have chosen?
  180. 7:10You moved upward
  181. 7:12So which ever set of action you choose, it will be this Action(s)
  182. 7:17Then result
  183. 7:18Result means you are reaching on which result
  184. 7:21On which resultant state you are reaching
  185. 7:23So let's say these all are resultant only
  186. 7:26Now after this if you move it left side
  187. 7:29Then the next state
  188. 7:30That will be one of my resultant state
  189. 7:32Then comes cost
  190. 7:34We measure it in cost
  191. 7:35What is the meaning of cost
  192. 7:36Generally we consider that
  193. 7:38That I have moved this once on the left side
  194. 7:40Then let's say we will take its cost
  195. 7:421
  196. 7:43Generally in spanning tree we find the distance
  197. 7:46Then at the time of distance
  198. 7:47We generally use
  199. 7:49If I want to go from one place to another place or from one edge to another edge
  200. 7:52Or from One node I want to reach to another node
  201. 7:55Then how much distance I am covering
  202. 7:57That can be time
  203. 7:59Anything, we will consider a general constant value
  204. 8:01That is called a cost
  205. 8:03So obviously we want that our searching
  206. 8:06It should be in minimum cost
  207. 8:08The obviously that solution
  208. 8:11That we will count as best solution
  209. 8:14So what benefit you are getting from state based search
  210. 8:18One is that you are precisely defining
  211. 8:20Your agent can properly analyze that how we can move
  212. 8:24And we talk in artificial intelligence
  213. 8:27Next important point
  214. 8:29That when we start the searching
  215. 8:31In any problem
  216. 8:33Water jug or 8 queen
  217. 8:34Or you consider 8 puzzle
  218. 8:3615 puzzle, chess
  219. 8:37In any of them
  220. 8:38Now we have started exploring this
  221. 8:39Ahead of this also state will be formed in this
  222. 8:41Further states of this also will be formed
  223. 8:43So all the states that are formed
  224. 8:45That means you are going on searching
  225. 8:47You are searching for goal state
  226. 8:48So we do searching in how many ways?
  227. 8:51We do searching in 2 ways
  228. 8:53Either we do it uninformed
  229. 8:55Which we call as blind search
  230. 8:57What is the meaning of blind
  231. 8:59I don't know anything about the domain about my problem
  232. 9:02I just know start and goal
  233. 9:03I keep on exploring
  234. 9:05And I am matching each state with this
  235. 9:08Or we have informed search
  236. 9:11In informed search we use concept of heuristic
  237. 9:15Due to which we try to solve the problem quickly
  238. 9:19In which we go towards benefit towards local benefit
  239. 9:23So that my problem can get solved quickly
  240. 9:25Because uninformed takes exponential time
  241. 9:29Because in uninformed
  242. 9:30B^d
  243. 9:32Time complexity is O(b^d)
  244. 9:34In which b is branching factor
  245. 9:36If we talk about this when we started how many branches were formed
  246. 9:404 branches will be formed
  247. 9:42It is possible after this next there can be 3-4 branches
  248. 9:44In the same way the number of branches that are formed
  249. 9:47And depth
  250. 9:49Depth means till how much depth this will go
  251. 9:52Which is it's tree
  252. 9:53If we talk over here
  253. 9:54What is it's depth 1
  254. 9:56Then we explored it ahead
  255. 9:57Then over here this is one depth
  256. 9:58That means from root till leaf how much depth is going
  257. 10:03That is called depth
  258. 10:04So in this I will tell you about uninformed over here
  259. 10:07Although I have explained uninformed and informed in the next video
  260. 10:11Their all the differences
  261. 10:12Basically uninformed
  262. 10:14Non-polynomial that means it grows exponential time
  263. 10:18Like if we talk about this problem
  264. 10:21When you will make state spaces
  265. 10:23When you will make number of states
  266. 10:25Then it can grow upto 3^20 number of states
  267. 10:30That means more then 3.5 billion states can be covered
  268. 10:34Somewhere for a machine or agent
  269. 10:39It is more time consuming to cover so many states
  270. 10:42That's why we prefer to
  271. 10:44Use informed searching

About this transcript

This page contains the full transcript of Lec-4: What is State Space Search | Introduction to Problem Solving in Artificial Intelligence by Gate Smashers, generated from the public captions YouTube serves with the video. The transcript has 1,797 words across 271 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.