Hi,
I'm trying to implement this searching method in C++ but didn't get that far into the code. I have a configuration of a puzzle that is passing in to a solver and from there the solver do the breadth-first search to find the path.I'm using std::deque to store the root but I don't know where to start in the right way.
**Configuration object has a method that change the current state and return a new Configuration state.**
Here's a little code I have wrote:
PuzzleSolver::Solve(Configuration *config) {
deque<Configuration> theQueue;
theQueue.push_front(config);
//left- do I need another queue here
//right - do I need another queue here
}
Thanks.
I'm trying to implement this searching method in C++ but didn't get that far into the code. I have a configuration of a puzzle that is passing in to a solver and from there the solver do the breadth-first search to find the path.I'm using std::deque to store the root but I don't know where to start in the right way.
**Configuration object has a method that change the current state and return a new Configuration state.**
Here's a little code I have wrote:
PuzzleSolver::Solve(Configuration *config) {
deque<Configuration> theQueue;
theQueue.push_front(config);
//left- do I need another queue here
//right - do I need another queue here
}
Thanks.