MHB How to check if search problem has no solution in depth limit search?

  • Thread starter Thread starter shivajikobardan
  • Start date Start date
  • Tags Tags
    Depth Limit Search
AI Thread Summary
Depth-limited search can encounter two types of failure: standard failure, indicating no solutions exist, and cutoff failure, where no solutions are found within a specified depth limit. To determine standard failure, it's essential to analyze the search space after the algorithm completes. If there are unvisited nodes remaining, it suggests potential solutions exist beyond the current depth limit. Additionally, even if a solution is theoretically present, it may not be reachable within the current depth constraints due to the structure of the search space. Therefore, adjusting the depth limit and reassessing the search space are critical steps in identifying whether a solution is truly unavailable or simply beyond the current search parameters. Understanding these concepts is vital when implementing uninformed search algorithms, as they lack prior knowledge of the problem, necessitating a thorough examination of the problem's constraints.
shivajikobardan
Messages
637
Reaction score
54
Depth-limited search can be terminated with two Conditions of failure:

Standard Failure: it indicates that the problem does not have any solutions.

Cutoff Failure Value: It defines no solution for the problem within a given depth limit.

https://www.analyticsvidhya.com/blog/2021/02/uninformed-search-algorithms-in-ai/
https://www.javatpoint.com/ai-uninformed-search-algorithms
I checked for cut off failure. But I don't know how to check for standard failure. Can you guide me a bit?
Python:
# Python dictionary to act as an adjacency list
graph = {
  '7' : ['19','21', '14'],
  '19': ['1', '12', '31'],
  '21': [],
  '14': ['23', '6'],
  '1' : [],
  '12': [],
  '31': [],
  '23': [],
  '6' : []
}

goal='6'
visited = [] # List of visited nodes of graph.
def dls(visited, graph, node,depth):
    if(depth>=0):
        
                if node not in visited:
            visited.append(node)
        
        if(node==goal):
            print("goal found")
            print("path to goal=",visited)
            exit()        for neighbor in graph[node]:
            dls(visited, graph, neighbor,depth-1)
        

        print(node)

# Driver Code
print("Following is the Depth-First Search")
res=dls(visited, graph, '7',1)
if(res):
    print("Path to goal node available")
    print("Path",path)
else:
    print("No path available for the goal node in given depth limit ie cut off failure")

print("visited=",visited)
 
Technology news on Phys.org


it is important to have a clear understanding of the problem and its constraints before beginning any search algorithm. In this case, we are dealing with an uninformed search algorithm, which means that we do not have any prior knowledge about the problem. Therefore, we need to carefully analyze the problem and its parameters before implementing any search algorithm.

To check for standard failure in depth-limited search, we need to consider the following:

1. The problem may have multiple solutions, but none of them can be found within the given depth limit. In this case, the algorithm will terminate with a cutoff failure value, but we cannot conclude that the problem does not have any solutions. Therefore, we need to check if there are any unvisited nodes left after the algorithm terminates. If there are unvisited nodes, it means that the problem may have solutions beyond the given depth limit.

2. The problem may have a solution, but it cannot be reached within the given depth limit due to the structure of the search space. In this case, the algorithm will also terminate with a cutoff failure value, but we cannot conclude that the problem does not have any solutions. Therefore, we need to carefully analyze the search space and consider adjusting the depth limit to see if a solution can be found.

In summary, to check for standard failure in depth-limited search, we need to carefully analyze the search space and consider adjusting the depth limit if necessary. We also need to check if there are any unvisited nodes after the algorithm terminates to ensure that the problem does not have any solutions.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top