1/6
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is control strategies ?
Those are the set of rules which tell what to do and when to do the action
What is BFS ?
It is an algorithm in which we check all the possible nodes first and then goes to next level until we find the goal
It uses queue(FIFO)
What is the algorithm BFS?
Start from the initial state and put it into the queue.
Check the first node — if it is the goal, then stop.
If not, add all its direct next-level nodes to the queue.
Repeat steps 2–3 until the goal is found or the queue is empty
What is DFS ?
It is an algorithm in which we go as deep as possible in one path and if we can’t go further , we backtrack
We use stack ( LIFO )
Algorithm of DFS?
Push the starting node into the stack and mark it visited.
Repeat until the stack is empty:
Pop the top node from the stack.
If it is the goal, stop.
Push all its unvisited connected nodes onto the stack and mark them visited.
What is constrain satisfaction problem ?
Its a problem in which we have to put the values to variables in which they obeys all the conditions
ex: cryptarithmetic