Bidirectional iterative deepening pathfinding algorithm in Java
up vote
1
down vote
favorite
Introduction
I have this iterative deepening search algorithm. The main "research" attempt was to find out a bidirectional version of that search, and it turned out to be superior compared to two other ID algorithms. The code I would like to get reviewed is as follows:
package net.coderodde.libid.support;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Deque;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import net.coderodde.libid.NodeExpander;
public final class BidirectionalIterativeDeepeningDepthFirstSearch<N> {
private final N source;
private final Deque<N> backwardSearchStack;
private final Set<N> frontier;
private final NodeExpander<N> forwardExpander;
private final NodeExpander<N> backwardExpander;
public BidirectionalIterativeDeepeningDepthFirstSearch() {
this.source = null;
this.backwardSearchStack = null;
this.frontier = null;
this.forwardExpander = null;
this.backwardExpander = null;
}
private BidirectionalIterativeDeepeningDepthFirstSearch(
N source,
NodeExpander<N> forwardExpander,
NodeExpander<N> backwardExpander) {
this.source = source;
this.backwardSearchStack = new ArrayDeque<>();
this.frontier = new HashSet<>();
this.forwardExpander = forwardExpander;
this.backwardExpander = backwardExpander;
}
public List<N> search(N source,
N target,
NodeExpander<N> forwardExpander,
NodeExpander<N> backwardExpander) {
// Handle the easy case. We need this in order to terminate the
// recursion in buildPath.
if (source.equals(target)) {
return new ArrayList<>(Arrays.asList(source));
}
BidirectionalIterativeDeepeningDepthFirstSearch<N> state =
new BidirectionalIterativeDeepeningDepthFirstSearch<>(
source,
forwardExpander,
backwardExpander);
for (int depth = 0;; ++depth) {
// Do a depth limited search in forward direction. Put all nodes at
// depth == 0 to the frontier.
state.depthLimitedSearchForward(source, depth);
// Perform a reversed search starting from the target node and
// recurring to the depth 'depth'.
N meetingNode = state.depthLimitedSearchBackward(target, depth);
if (meetingNode != null) {
return state.buildPath(meetingNode);
}
state.backwardSearchStack.clear();
// Perform a reversed search once again with depth = 'depth + 1'.
// We need this in case the shortest path has odd number of arcs.
meetingNode = state.depthLimitedSearchBackward(target, depth + 1);
if (meetingNode != null) {
return state.buildPath(meetingNode);
}
state.backwardSearchStack.clear();
// Wipe out the frontier.
state.frontier.clear();
}
}
private void depthLimitedSearchForward(N node, int depth) {
if (depth == 0) {
frontier.add(node);
return;
}
for (N child : forwardExpander.expand(node)) {
depthLimitedSearchForward(child, depth - 1);
}
}
private N depthLimitedSearchBackward(N node, int depth) {
backwardSearchStack.addFirst(node);
if (depth == 0) {
if (frontier.contains(node)) {
return node;
}
backwardSearchStack.removeFirst();
return null;
}
for (N parent : backwardExpander.expand(node)) {
N meetingNode = depthLimitedSearchBackward(parent, depth - 1);
if (meetingNode != null) {
return meetingNode;
}
}
backwardSearchStack.removeFirst();
return null;
}
private List<N> buildPath(N meetingNode) {
List<N> path = new ArrayList<>();
List<N> prefixPath =
new BidirectionalIterativeDeepeningDepthFirstSearch<N>()
.search(source,
meetingNode,
forwardExpander,
backwardExpander);
path.addAll(prefixPath);
path.remove(path.size() - 1);
path.addAll(backwardSearchStack);
return path;
}
}
Performance figures
You can see something like this:
*** 8-puzzle graph benchmark ***
Seed = 1542379748450
BreadthFirstSearch in 7 milliseconds. Path length: 14
IterativeDeepeningDepthFirstSearch in 162 milliseconds. Path length: 14
BidirectionalIterativeDeepeningDepthFirstSearch in 1 milliseconds. Path length: 14
IterativeDeepeningAStar in 1 milliseconds. Path length: 14
Algorithms agree: true
*** General graph benchmark ***
Seed = 1542379748655
Warming up...
Warming up done!
BidirectionalIterativeDeepeningDepthFirstSearch in 0 milliseconds. Path length: 4
IterativeDeepeningDepthFirstSearch in 26 milliseconds. Path length: 4
BreadthFirstSearch in 4484 milliseconds. Path length: 4
The entire project lives here.
java algorithm graph pathfinding sliding-tile-puzzle
add a comment |
up vote
1
down vote
favorite
Introduction
I have this iterative deepening search algorithm. The main "research" attempt was to find out a bidirectional version of that search, and it turned out to be superior compared to two other ID algorithms. The code I would like to get reviewed is as follows:
package net.coderodde.libid.support;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Deque;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import net.coderodde.libid.NodeExpander;
public final class BidirectionalIterativeDeepeningDepthFirstSearch<N> {
private final N source;
private final Deque<N> backwardSearchStack;
private final Set<N> frontier;
private final NodeExpander<N> forwardExpander;
private final NodeExpander<N> backwardExpander;
public BidirectionalIterativeDeepeningDepthFirstSearch() {
this.source = null;
this.backwardSearchStack = null;
this.frontier = null;
this.forwardExpander = null;
this.backwardExpander = null;
}
private BidirectionalIterativeDeepeningDepthFirstSearch(
N source,
NodeExpander<N> forwardExpander,
NodeExpander<N> backwardExpander) {
this.source = source;
this.backwardSearchStack = new ArrayDeque<>();
this.frontier = new HashSet<>();
this.forwardExpander = forwardExpander;
this.backwardExpander = backwardExpander;
}
public List<N> search(N source,
N target,
NodeExpander<N> forwardExpander,
NodeExpander<N> backwardExpander) {
// Handle the easy case. We need this in order to terminate the
// recursion in buildPath.
if (source.equals(target)) {
return new ArrayList<>(Arrays.asList(source));
}
BidirectionalIterativeDeepeningDepthFirstSearch<N> state =
new BidirectionalIterativeDeepeningDepthFirstSearch<>(
source,
forwardExpander,
backwardExpander);
for (int depth = 0;; ++depth) {
// Do a depth limited search in forward direction. Put all nodes at
// depth == 0 to the frontier.
state.depthLimitedSearchForward(source, depth);
// Perform a reversed search starting from the target node and
// recurring to the depth 'depth'.
N meetingNode = state.depthLimitedSearchBackward(target, depth);
if (meetingNode != null) {
return state.buildPath(meetingNode);
}
state.backwardSearchStack.clear();
// Perform a reversed search once again with depth = 'depth + 1'.
// We need this in case the shortest path has odd number of arcs.
meetingNode = state.depthLimitedSearchBackward(target, depth + 1);
if (meetingNode != null) {
return state.buildPath(meetingNode);
}
state.backwardSearchStack.clear();
// Wipe out the frontier.
state.frontier.clear();
}
}
private void depthLimitedSearchForward(N node, int depth) {
if (depth == 0) {
frontier.add(node);
return;
}
for (N child : forwardExpander.expand(node)) {
depthLimitedSearchForward(child, depth - 1);
}
}
private N depthLimitedSearchBackward(N node, int depth) {
backwardSearchStack.addFirst(node);
if (depth == 0) {
if (frontier.contains(node)) {
return node;
}
backwardSearchStack.removeFirst();
return null;
}
for (N parent : backwardExpander.expand(node)) {
N meetingNode = depthLimitedSearchBackward(parent, depth - 1);
if (meetingNode != null) {
return meetingNode;
}
}
backwardSearchStack.removeFirst();
return null;
}
private List<N> buildPath(N meetingNode) {
List<N> path = new ArrayList<>();
List<N> prefixPath =
new BidirectionalIterativeDeepeningDepthFirstSearch<N>()
.search(source,
meetingNode,
forwardExpander,
backwardExpander);
path.addAll(prefixPath);
path.remove(path.size() - 1);
path.addAll(backwardSearchStack);
return path;
}
}
Performance figures
You can see something like this:
*** 8-puzzle graph benchmark ***
Seed = 1542379748450
BreadthFirstSearch in 7 milliseconds. Path length: 14
IterativeDeepeningDepthFirstSearch in 162 milliseconds. Path length: 14
BidirectionalIterativeDeepeningDepthFirstSearch in 1 milliseconds. Path length: 14
IterativeDeepeningAStar in 1 milliseconds. Path length: 14
Algorithms agree: true
*** General graph benchmark ***
Seed = 1542379748655
Warming up...
Warming up done!
BidirectionalIterativeDeepeningDepthFirstSearch in 0 milliseconds. Path length: 4
IterativeDeepeningDepthFirstSearch in 26 milliseconds. Path length: 4
BreadthFirstSearch in 4484 milliseconds. Path length: 4
The entire project lives here.
java algorithm graph pathfinding sliding-tile-puzzle
1
"These Three". You only posted BidirectionalIterativeDeepeningDepthFirstSearch. Is that intentional?
– Vogel612♦
Nov 16 at 15:14
@Vogel612 My bad. Will fix soon.
– coderodde
Nov 16 at 15:18
@Vogel612 But there are 3 ID search algos in a GitHub repository.
– coderodde
Nov 16 at 15:20
1
I haven't checked, but that's not really relevant anyways. Only the code posted to Code Review is really up for review. Everything else is just context
– Vogel612♦
Nov 16 at 15:22
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Introduction
I have this iterative deepening search algorithm. The main "research" attempt was to find out a bidirectional version of that search, and it turned out to be superior compared to two other ID algorithms. The code I would like to get reviewed is as follows:
package net.coderodde.libid.support;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Deque;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import net.coderodde.libid.NodeExpander;
public final class BidirectionalIterativeDeepeningDepthFirstSearch<N> {
private final N source;
private final Deque<N> backwardSearchStack;
private final Set<N> frontier;
private final NodeExpander<N> forwardExpander;
private final NodeExpander<N> backwardExpander;
public BidirectionalIterativeDeepeningDepthFirstSearch() {
this.source = null;
this.backwardSearchStack = null;
this.frontier = null;
this.forwardExpander = null;
this.backwardExpander = null;
}
private BidirectionalIterativeDeepeningDepthFirstSearch(
N source,
NodeExpander<N> forwardExpander,
NodeExpander<N> backwardExpander) {
this.source = source;
this.backwardSearchStack = new ArrayDeque<>();
this.frontier = new HashSet<>();
this.forwardExpander = forwardExpander;
this.backwardExpander = backwardExpander;
}
public List<N> search(N source,
N target,
NodeExpander<N> forwardExpander,
NodeExpander<N> backwardExpander) {
// Handle the easy case. We need this in order to terminate the
// recursion in buildPath.
if (source.equals(target)) {
return new ArrayList<>(Arrays.asList(source));
}
BidirectionalIterativeDeepeningDepthFirstSearch<N> state =
new BidirectionalIterativeDeepeningDepthFirstSearch<>(
source,
forwardExpander,
backwardExpander);
for (int depth = 0;; ++depth) {
// Do a depth limited search in forward direction. Put all nodes at
// depth == 0 to the frontier.
state.depthLimitedSearchForward(source, depth);
// Perform a reversed search starting from the target node and
// recurring to the depth 'depth'.
N meetingNode = state.depthLimitedSearchBackward(target, depth);
if (meetingNode != null) {
return state.buildPath(meetingNode);
}
state.backwardSearchStack.clear();
// Perform a reversed search once again with depth = 'depth + 1'.
// We need this in case the shortest path has odd number of arcs.
meetingNode = state.depthLimitedSearchBackward(target, depth + 1);
if (meetingNode != null) {
return state.buildPath(meetingNode);
}
state.backwardSearchStack.clear();
// Wipe out the frontier.
state.frontier.clear();
}
}
private void depthLimitedSearchForward(N node, int depth) {
if (depth == 0) {
frontier.add(node);
return;
}
for (N child : forwardExpander.expand(node)) {
depthLimitedSearchForward(child, depth - 1);
}
}
private N depthLimitedSearchBackward(N node, int depth) {
backwardSearchStack.addFirst(node);
if (depth == 0) {
if (frontier.contains(node)) {
return node;
}
backwardSearchStack.removeFirst();
return null;
}
for (N parent : backwardExpander.expand(node)) {
N meetingNode = depthLimitedSearchBackward(parent, depth - 1);
if (meetingNode != null) {
return meetingNode;
}
}
backwardSearchStack.removeFirst();
return null;
}
private List<N> buildPath(N meetingNode) {
List<N> path = new ArrayList<>();
List<N> prefixPath =
new BidirectionalIterativeDeepeningDepthFirstSearch<N>()
.search(source,
meetingNode,
forwardExpander,
backwardExpander);
path.addAll(prefixPath);
path.remove(path.size() - 1);
path.addAll(backwardSearchStack);
return path;
}
}
Performance figures
You can see something like this:
*** 8-puzzle graph benchmark ***
Seed = 1542379748450
BreadthFirstSearch in 7 milliseconds. Path length: 14
IterativeDeepeningDepthFirstSearch in 162 milliseconds. Path length: 14
BidirectionalIterativeDeepeningDepthFirstSearch in 1 milliseconds. Path length: 14
IterativeDeepeningAStar in 1 milliseconds. Path length: 14
Algorithms agree: true
*** General graph benchmark ***
Seed = 1542379748655
Warming up...
Warming up done!
BidirectionalIterativeDeepeningDepthFirstSearch in 0 milliseconds. Path length: 4
IterativeDeepeningDepthFirstSearch in 26 milliseconds. Path length: 4
BreadthFirstSearch in 4484 milliseconds. Path length: 4
The entire project lives here.
java algorithm graph pathfinding sliding-tile-puzzle
Introduction
I have this iterative deepening search algorithm. The main "research" attempt was to find out a bidirectional version of that search, and it turned out to be superior compared to two other ID algorithms. The code I would like to get reviewed is as follows:
package net.coderodde.libid.support;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Deque;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import net.coderodde.libid.NodeExpander;
public final class BidirectionalIterativeDeepeningDepthFirstSearch<N> {
private final N source;
private final Deque<N> backwardSearchStack;
private final Set<N> frontier;
private final NodeExpander<N> forwardExpander;
private final NodeExpander<N> backwardExpander;
public BidirectionalIterativeDeepeningDepthFirstSearch() {
this.source = null;
this.backwardSearchStack = null;
this.frontier = null;
this.forwardExpander = null;
this.backwardExpander = null;
}
private BidirectionalIterativeDeepeningDepthFirstSearch(
N source,
NodeExpander<N> forwardExpander,
NodeExpander<N> backwardExpander) {
this.source = source;
this.backwardSearchStack = new ArrayDeque<>();
this.frontier = new HashSet<>();
this.forwardExpander = forwardExpander;
this.backwardExpander = backwardExpander;
}
public List<N> search(N source,
N target,
NodeExpander<N> forwardExpander,
NodeExpander<N> backwardExpander) {
// Handle the easy case. We need this in order to terminate the
// recursion in buildPath.
if (source.equals(target)) {
return new ArrayList<>(Arrays.asList(source));
}
BidirectionalIterativeDeepeningDepthFirstSearch<N> state =
new BidirectionalIterativeDeepeningDepthFirstSearch<>(
source,
forwardExpander,
backwardExpander);
for (int depth = 0;; ++depth) {
// Do a depth limited search in forward direction. Put all nodes at
// depth == 0 to the frontier.
state.depthLimitedSearchForward(source, depth);
// Perform a reversed search starting from the target node and
// recurring to the depth 'depth'.
N meetingNode = state.depthLimitedSearchBackward(target, depth);
if (meetingNode != null) {
return state.buildPath(meetingNode);
}
state.backwardSearchStack.clear();
// Perform a reversed search once again with depth = 'depth + 1'.
// We need this in case the shortest path has odd number of arcs.
meetingNode = state.depthLimitedSearchBackward(target, depth + 1);
if (meetingNode != null) {
return state.buildPath(meetingNode);
}
state.backwardSearchStack.clear();
// Wipe out the frontier.
state.frontier.clear();
}
}
private void depthLimitedSearchForward(N node, int depth) {
if (depth == 0) {
frontier.add(node);
return;
}
for (N child : forwardExpander.expand(node)) {
depthLimitedSearchForward(child, depth - 1);
}
}
private N depthLimitedSearchBackward(N node, int depth) {
backwardSearchStack.addFirst(node);
if (depth == 0) {
if (frontier.contains(node)) {
return node;
}
backwardSearchStack.removeFirst();
return null;
}
for (N parent : backwardExpander.expand(node)) {
N meetingNode = depthLimitedSearchBackward(parent, depth - 1);
if (meetingNode != null) {
return meetingNode;
}
}
backwardSearchStack.removeFirst();
return null;
}
private List<N> buildPath(N meetingNode) {
List<N> path = new ArrayList<>();
List<N> prefixPath =
new BidirectionalIterativeDeepeningDepthFirstSearch<N>()
.search(source,
meetingNode,
forwardExpander,
backwardExpander);
path.addAll(prefixPath);
path.remove(path.size() - 1);
path.addAll(backwardSearchStack);
return path;
}
}
Performance figures
You can see something like this:
*** 8-puzzle graph benchmark ***
Seed = 1542379748450
BreadthFirstSearch in 7 milliseconds. Path length: 14
IterativeDeepeningDepthFirstSearch in 162 milliseconds. Path length: 14
BidirectionalIterativeDeepeningDepthFirstSearch in 1 milliseconds. Path length: 14
IterativeDeepeningAStar in 1 milliseconds. Path length: 14
Algorithms agree: true
*** General graph benchmark ***
Seed = 1542379748655
Warming up...
Warming up done!
BidirectionalIterativeDeepeningDepthFirstSearch in 0 milliseconds. Path length: 4
IterativeDeepeningDepthFirstSearch in 26 milliseconds. Path length: 4
BreadthFirstSearch in 4484 milliseconds. Path length: 4
The entire project lives here.
java algorithm graph pathfinding sliding-tile-puzzle
java algorithm graph pathfinding sliding-tile-puzzle
edited 13 mins ago
asked Nov 16 at 14:51
coderodde
15.6k536124
15.6k536124
1
"These Three". You only posted BidirectionalIterativeDeepeningDepthFirstSearch. Is that intentional?
– Vogel612♦
Nov 16 at 15:14
@Vogel612 My bad. Will fix soon.
– coderodde
Nov 16 at 15:18
@Vogel612 But there are 3 ID search algos in a GitHub repository.
– coderodde
Nov 16 at 15:20
1
I haven't checked, but that's not really relevant anyways. Only the code posted to Code Review is really up for review. Everything else is just context
– Vogel612♦
Nov 16 at 15:22
add a comment |
1
"These Three". You only posted BidirectionalIterativeDeepeningDepthFirstSearch. Is that intentional?
– Vogel612♦
Nov 16 at 15:14
@Vogel612 My bad. Will fix soon.
– coderodde
Nov 16 at 15:18
@Vogel612 But there are 3 ID search algos in a GitHub repository.
– coderodde
Nov 16 at 15:20
1
I haven't checked, but that's not really relevant anyways. Only the code posted to Code Review is really up for review. Everything else is just context
– Vogel612♦
Nov 16 at 15:22
1
1
"These Three". You only posted BidirectionalIterativeDeepeningDepthFirstSearch. Is that intentional?
– Vogel612♦
Nov 16 at 15:14
"These Three". You only posted BidirectionalIterativeDeepeningDepthFirstSearch. Is that intentional?
– Vogel612♦
Nov 16 at 15:14
@Vogel612 My bad. Will fix soon.
– coderodde
Nov 16 at 15:18
@Vogel612 My bad. Will fix soon.
– coderodde
Nov 16 at 15:18
@Vogel612 But there are 3 ID search algos in a GitHub repository.
– coderodde
Nov 16 at 15:20
@Vogel612 But there are 3 ID search algos in a GitHub repository.
– coderodde
Nov 16 at 15:20
1
1
I haven't checked, but that's not really relevant anyways. Only the code posted to Code Review is really up for review. Everything else is just context
– Vogel612♦
Nov 16 at 15:22
I haven't checked, but that's not really relevant anyways. Only the code posted to Code Review is really up for review. Everything else is just context
– Vogel612♦
Nov 16 at 15:22
add a comment |
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
});
});
}, "mathjax-editing");
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "196"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f207813%2fbidirectional-iterative-deepening-pathfinding-algorithm-in-java%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Code Review Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f207813%2fbidirectional-iterative-deepening-pathfinding-algorithm-in-java%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
"These Three". You only posted BidirectionalIterativeDeepeningDepthFirstSearch. Is that intentional?
– Vogel612♦
Nov 16 at 15:14
@Vogel612 My bad. Will fix soon.
– coderodde
Nov 16 at 15:18
@Vogel612 But there are 3 ID search algos in a GitHub repository.
– coderodde
Nov 16 at 15:20
1
I haven't checked, but that's not really relevant anyways. Only the code posted to Code Review is really up for review. Everything else is just context
– Vogel612♦
Nov 16 at 15:22