This part shows the pseudocode of Breadth-First-Search algorithm for our  dynamic targets generation (in C++ style).