Backtracking
Version 1.0.0 · Updated 2026-07-28
CORE DEFINITION
Backtracking is a type of brute-force search. For certain computational problems, backtracking is a general algorithm that can find all (or some) solutions, especially suitable for constraint satisfaction problems (in solving constraint satisfaction problems, we gradually construct more candidate solutions, and after determining that a certain partial candidate solution cannot be completed into a correct solution, we abandon continuing to search this partial candidate solution itself and its sub-candidate solutions, and instead test other partial candidate solutions). In classic textbooks, the eight queens problem demonstrates the use of backtracking. (The eight queens problem is to find all distributions of eight queens on a standard chessboard such that no queen can attack another.) Backtracking adopts the idea of trial and error, attempting to solve a problem step by step. In the process of solving step by step, when it finds through attempts that the current partial answer cannot yield an effective correct solution, it will cancel the previous step or even several steps, and then try again through other possible partial answers. Backtracking is usually implemented with the simplest recursive method. After repeating the above steps, two situations may occur:
SCAFFOLDING EFFECT
Reduce cognitive load
Backtracking is a type of brute-force search. For certain computational problems, backtracking is a general algorithm that can find all (or some) solutions, especially suitable for constraint satisfaction problems (in solving constraint satisfaction problems, we gradually construct more candidate solutions, and after determining that a certain partial candidate solution cannot be completed into a correct solution, we abandon continuing to search this partial candidate solution itself and its sub-candidate solutions, and instead test other partial candidate solutions). In classic textbooks, the eight queens problem demonstrates the use of backtracking.
Anchor fast decisions
Backtracking is a systematic method of trying to solve a problem: go deep along a path, and when encountering a dead end, go back to the previous step (undo the choice) and try a different branch. It is depth-first search plus 'trial and error - undo', suitable for constraint satisfaction and combinatorial problems.
MINIMUM ACTION
In progress 0/5Practice this model in one real situation:
account_treeGenealogyexpand_more
menu_bookReferencesexpand_more
Source support: Explicit
- zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E5%9B%9E%E6%BA%AF%E6%B3%95verified
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS