Questions tagged [iterative-deepening]
82 questions
3
votes
1 answer
BFS/IDS Search with Geometric shapes
I have a problem I am working on involving breadth first search and iterative deepening search. I understand the search mechanisms for trees but I don't understand how to apply it to grid and geometric shapes. If I wanted to perform a BFS(breadth…

lucyb
- 333
- 5
- 15
3
votes
2 answers
How can iterative deepening search implemented efficient in haskell?
I have an optimization problem I want to solve. You have some kind of data-structure:
data Foo =
{ fooA :: Int
, fooB :: Int
, fooC :: Int
, fooD :: Int
, fooE :: Int
}
and a rating function:
rateFoo :: myFoo -> Int
I have to optimize…

fuz
- 88,405
- 25
- 200
- 352
3
votes
2 answers
How does iterative deepening affect time complexity?
I have a tree traversal algorithm which generally operates in O(bm) where b is the branching factor and m is the max depth.
Using iterative deepening, this algorithm is run over and over again, m times at increasing depth:
O(bm) = b⁰ + b¹ + b² +…

SemperCallide
- 1,950
- 6
- 26
- 42
3
votes
1 answer
How to search a file system efficiently (algorithm-wise)?
Depth-first search is a horrible way to search a file system -- in practice, a file that might be below a directory very close to the root can take a long time to be found with DFS, because DFS gets distracted by another deep, irrelevant hierarchy…

user541686
- 205,094
- 128
- 528
- 886
3
votes
3 answers
How to store visited states in iterative deepening / depth limited search?
Update: Search for the first solution.
for a normal Depth First Search it is simple, just use a hashset
bool DFS (currentState) =
{
if (myHashSet.Contains(currentState))
{
return;
}
…

colinfang
- 20,909
- 19
- 90
- 173
2
votes
1 answer
Prolog STRIPS planner never completes
Following examples by Ivan Bratko on Artificial Intelligence in Prolog through his book:
"Prolog Programming for Artificial Intelligence - 3rd Edition" (ISBN-13: 978-0201403756) (1st edition 1986 by Addison-Wesley, ISBN 0-201-14224-4)
I've noticed…

sbarnard
- 385
- 3
- 11
2
votes
0 answers
Graph algorithm goes ordinately and not on the level
I try to implement Iterative Deeping A* Search.
The problem is that he goes ordinately and not as I want.
When I declared a node I wrote also the level where he is (adancime).
So my logic would be like, if(the level where he got is the same like…

Wolf Marian
- 147
- 12
2
votes
1 answer
Having trouble optimizing Iterative Deepening Rush Hour algorithm in JavaScript
I have a school assignment to make an iterative deepening algorithm to solve a 6x6 Rush Hour puzzle. I chose to use JavaScript of all things because I need to practice. I am however having trouble optimizing the algorithm big way.
I tried to solve a…

PeterTheLobster
- 1,386
- 16
- 33
2
votes
1 answer
Implementing iterative deepening
To improve performance of Minimax algorithm with Alpha-Beta pruning, I've implemented Iterative deepening:
public Integer iterativeDeepening(int maxDepth, boolean isFirstPlayer) {
Integer bestCell = -1;
for (Integer depth = 1; depth <=…

Sarpy
- 265
- 1
- 7
- 18
2
votes
1 answer
What is wrong with this implementation of IDA* algorithm in Haskell? Bad heuristic or simply bad code?
I am trying to write a haskell program which can solve rubiks' cube. Firstly I tried this, but did not figure a way out to avoid writing a whole lot of codes, so I tried using an IDA* search for this task.
But I do not know which heuristic is…

awllower
- 571
- 1
- 9
- 21
2
votes
1 answer
Iterative deepening with a time limit
I'm working on implementing iterative deepening with principal variation for alpha-beta search for a computer chess program, and I was hoping to include a time limit for the search. I was wondering about the consequences of the time limit being…

wheels
- 198
- 12
2
votes
2 answers
PHP deepening XML structure
given the following XML structure (i have this in an XML-file, with lots of other content - the ... …
tags are just there to indicate that other tags may follow):
..

AZtec
- 73
- 1
- 9
2
votes
3 answers
XSLT deepening content structure
given the following structure:
...
...
...
...
..
...
is there a way to get to this:
...

AZtec
- 73
- 1
- 9
2
votes
2 answers
Iterative deepening search : Is it recursive?
I've searched the internet about the IDS algorithm and I keep finding some example but they are all with recursion, and as I understood iterative is not recursive..
So can you please give me some examples for IDS algorithm ?(implementation would be…

Galactic Void
- 41
- 1
- 1
- 5
2
votes
1 answer
Questions about Iterative Deepening Depth First search in java
I'm looking at the pseudocode on Wikipedia for this and trying to use it to write the algorithm in java. My question comes in a difference in how the result is returned. On wikipedia, one result is returned, and this breaks out of the search. In…

zakparks31191
- 919
- 2
- 21
- 42