Questions tagged [iterative-deepening]

82 questions
1
vote
2 answers

Writing a DFS with iterative deepening without recursion

So currently i have a DFS with the following pseudocode procedure DFS(Graph,source): create a stack S push source onto S mark source while S is not empty: pop an item from S into v for each edge e incident…
1
vote
1 answer

Optimizing iterative deepening depth first search in C++

I am using an implementation of the IDDFS graph algorithm in a project and I noticed that for each node, the function takes around 8 - 10 seconds to compute. And, with a very large dataset with over 7000 nodes, it is proving to be the most…
1
vote
1 answer

Using Iterative deepening DFS for knapsack similar problem

I'm solving a knapsack similar problem: which is to print out the first combination of objects that has value above a number but weight below a limit. I have tried: value = [10, 8, 7, 6, 4] weight = [8, 4, 3, 3, 1] name =…
1
vote
1 answer

Complete Iterative Deepening Depth First Search

At the minute I have an object that looks a bit like this. C# public class Step { int id; List nextSteps; } And I'm trying to convert it into another object that looks pretty similar apart from the fact that it doesn't allow loops. It…
Phil
  • 13
  • 4
1
vote
0 answers

How to I incorporate multithreading into IDA* search algorithm?

I have implemented Korf’s Algorithm (A solving algorithm for the Rubik’s cube that always produced optimal solutions). If a solution requires between 15-20 moves, it can take over a solid day for the computer to generate, test and evaluate each…
1
vote
1 answer

Implementing Minimax search with Iterative Deepening

What I am doing: I am writing a chess engine in C++. I recently updated my engine's minimax search algo that uses alpha-beta pruning to utilize iterative deepening so that it can play under a time constraint. This is how it looks: //I return a…
David Chopin
  • 2,780
  • 2
  • 19
  • 40
1
vote
1 answer

How to stop alpha-beta with a timer in iterative deepening

I have created a minimax function with alpha beta pruning that I call with iterative deepening. The problem is that when timer is done the function keeps running until it finishes on the depth it started with before the timer ran out. What I want:…
eligolf
  • 1,682
  • 1
  • 6
  • 22
1
vote
0 answers

Implement time limited iterative deepening search for chess program

I know i can implement this by checking for time limit before calling move generator in the negamax and quiescence functions. But I would Like to know if there is a way to run the check for time limit on a separate thread and break the execution of…
John Doe
  • 149
  • 2
  • 6
1
vote
0 answers

Java solving 15-puzzle with iterative deppening search

I'm trying to solve 15-puzzle (sliding tile puzzle) with iterative deppening search. This is my initial state : 1 2 12 13 5 6 7 8 9 3 4 0 11 14 15 10 And this os my goal state : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 I have a class of node to…
Daniel16
  • 113
  • 8
1
vote
1 answer

Iterative Deepening Search for K-puzzle

I am trying to implement iterative deepening search for the k - puzzle. I have managed to find the goal node. However, I am unable to backtrack from the goal node to the start node to find the optimal moves. I think it has something to do with…
calveeen
  • 621
  • 2
  • 10
  • 28
1
vote
0 answers

How to store path found from Iterative deepening depth-first search

I am trying to use an array to store the path found from Iterative deepening depth-first search algorithm. I have N vertexs and I want to store the path from vertex X to vertex Y by the array pathTo[N] with pathTo[W] = V means node W will be…
1
vote
0 answers

Complexity of iterative deepening search

I saw a question about "Iterative Deepening Depth-First Search" and I couldn't any answer. If it exists, I am sorry for that. Question: How does the complexity of IDS change when the graph is used instead of tree? Thank you!
Can
  • 145
  • 1
  • 11
1
vote
1 answer

Implementing Iterative deepening depth-first search

I am using the following pseudocode from the wikipedia page to implement iterative deepening depth-first search for graphs function IDDFS(root) for depth from 0 to ∞ found ← DLS(root, depth) if found ≠ null return…
Meryem
  • 477
  • 7
  • 17
1
vote
1 answer

tail call memory managment in haskell

I'm using the following control structure(which I think is tail recursive) untilSuccessOrBigError :: (Eq e) => (Integer -> (Either e a)) -> Integer -> e -> (Either e a) untilSuccessOrBigError f count bigError = case f count of Right x ->…
1
vote
1 answer

Iterative Deepening Without Specified Depth Limit

I have a question regarding the search technique iterative deepening. My question is, what is the difference between normal Depth-First search and Iterative Deepening without a specified depth limit? So I have a tree with a goal node but have no…