Questions tagged [iterative-deepening]
82 questions
1
vote
0 answers
Issue with an AI with Alpha-Beta pruning - Java
I'm taking an Artificial Intelligence class where we need to create an AI that plays Tic-Tac-Toe.
The instructor specified to use alpha-beta pruning for the AI's decision making process when placing it's next move. The issue I'm running into at this…

level1cleric
- 11
- 2
1
vote
1 answer
Iterative deepening depth first search in a 2d array
I am trying to implement iterative deepening search in a 2d array (a maze).
static void Run_Ids(int x, int y)
{
int depth_limit = 0;
while(!cutoff)
{
out.println("Doing search at depth: " + depth_limit); …

pdhimal1
- 229
- 4
- 9
- 19
1
vote
1 answer
How to time-box an algorithm in Ruby?
I have an algorithm that can potentially run for an unbounded period of time, updating results as it goes. It's using something similar to an Iterative Deepening Search. After a specified amount of time, I'd like the algorithm to stop so I can use…
user1454117
1
vote
1 answer
iterative deepening depth first search higer time complexity than depth first search?
It seems that iterative deepening search should have a higher asymptotic time complexity than BFS because every time the depth-limit is increased, it must start its search from the beginning.
But wiki says otherwise, why?

vincentleest
- 925
- 1
- 8
- 18
1
vote
1 answer
Iterative Deepening Search in C++
OK, so, first off, I have no real idea what I'm doing with iterated deepening. I've been working on trying to get this piece of code to work, but I can't. I looked online and couldn't find any reference for this search in C++.
void Graph::IDS(int…

Sam
- 387
- 1
- 6
- 15
1
vote
1 answer
java iterative deepening on tree without recursion
I currently have a depth first search implemented as followed:
protected void algorithmLogic() {
currentNode = ((Stack) expanded).pop();
if(atGoal()) {
// Goal reached so stop
return;
}
else {
…

DTC
- 87
- 2
- 8
1
vote
1 answer
Astar vs IDAstar performance
I cant seem to get around the reason why A* outperforms IDA* most of the time. My proffessor has said that the reason is not because of the fact that the early(closer to root) nodes keep been reexplored as IDA* backtracks after reaching the f-limit…

Teererai Marange
- 2,044
- 4
- 32
- 50
1
vote
2 answers
Iterative deepening depth-first search in binary tree
i am having a normal binary tree that i am trying to apply iterative deepening depth first search on using c :
struct node {
int data;
struct node * right;
struct node * left;
};
typedef struct node node;
and i am using a function to…

Heidar
- 689
- 4
- 12
1
vote
2 answers
Deepening XSLT Structure using Attribute as Key
I've seen some variations of this quesiton asked here, but I'm not sure how to apply them to my situation, so I'm hoping maybe someone can help me here.
I have a flat XML file in a format similar to this one:
-

NestorDRod
- 166
- 1
- 14
1
vote
1 answer
Iterative deepening or trial and error?
I am coding a board game. I have generated a game tree using alpha-beta pruning and have 2 options:
Use iterative deepening to optimize the alpha-beta so that it keeps generating one more ply until time is over.
By trial and error, I know the…

PALEN
- 2,784
- 2
- 23
- 24
1
vote
1 answer
Iterative-deepening depth first search using limited memory
This is a follow-up to Find first null in binary tree with limited memory.
Wikipedia says that iterative-deepening depth first search will find the shortest path. I would like an implementation that is limited in memory to k nodes and accesses the…

Eyal
- 5,728
- 7
- 43
- 70
0
votes
0 answers
Iterative deepening with time limit, minimax algorithm with alpha beta pruning and heuristics
I am trying to implement the game Othello and I encountered some problems. AI is not making the best possible moves and keeps losing.
I tried adding some print statements. It seems like evaluation of every valid move results in the same score, so AI…

emily
- 1
0
votes
0 answers
Understanding space complexity within IDDFS (Iterative Deepening Depth First Search)
I'm trying to understand the space complexity for IDDFS. This is stated as being O(bd) in many sources, for example:…

Crocs123
- 105
- 7
0
votes
0 answers
How to make non iterative code faster than the iterative when using line by line backslash inverse?
This code creats a matrix B contains the product of the each line of A by the backslash inverse of a aline of x
A = [1,2,3,8,1;10,45,7,3,1;9,8,15,75,65,];
x = [14,5,11,15,33;7,1,9,1,1;87,45,11,0,65];
B=zeros(3,1);
% the iterative code
tic
for k =…

Nekkache Abdesslem
- 301
- 2
- 3
0
votes
0 answers
How to count the total nodes generated in an iterative deepening search?
I was trying to use the same way as breadth first search (BFS) or binary tree, but the count gave me a huge number, way bigger than BFS, which does not make sense, since IDS and BFS have similar number of nodes generated. I realized that the count…

ilm
- 1
- 1