My real question is: “Why doesn't it speed up my search?” But I'm not sure if this makes sense without additional context ...
This question is really just academic - the code "works" and my program finds the solutions that I expect .... but I want to make sure that I understand the terminology. To illustrate this, let me use a concrete example where we need a search algorithm - the n-Queens problem.
n-queens problem - Placing n queens on an n × n chessboard so that no queen can attack another.
One solution

There are many code examples on the Internet that can be found searching for “N-queens backtracking,” and the Wikipedia article on refund even uses N-Queens in explaining what happens in the opposite direction ( http://en.wikipedia.org/ wiki / Backtracking ). The idea, as I understand it, is that if the board configuration is incorrect - let them say two places of the queens that can attack each other, the algorithm ignores all the configurations of the boards that will be made by adding additional parts.
I also implemented a (non-recursive / non-reverse) third-first and fifth version of my search. As expected, both options check the exact number of states. I expected that a depth-based recursive algorithm with a backtracking algorithm should test fewer states. But I don’t see it.
Depth First Found 92 solutions in 10.04 seconds Tested 118969 nodes (1.2k nodes per second) Largest Memory Set was 64 nodes BackTracking Found 92 solutions in 9.89 seconds Tested 118969 nodes (1.2k nodes per second) Largest Memory Set was 170 nodes Breadth First Found 92 solutions in 12.52 seconds Tested 118969 nodes (0.95k nodes per second) Largest Memory Set was 49415 nodes
My actual implementation will be general in nature, so I don't use mirrors / rotate boards or anything else smart.
It seems to me that I should be a misunderstanding, but I don’t see what benefit rolls back from me?
Wikipedia explains that as soon as a certain state is considered invalid, its subtree is skipped (trimmed), but rational allocation of queens (except Q1 in a8 and Q2 in a7) seems to prevent any situations that can be cut?
In what configurations of the board should the first attempt to introduce the first breath be implemented to avoid refusal to return?