I am currently taking an Artificial Intelligence course and learning about DFS and BFS.
If we take the following example:
From my understanding, the BFS algorithm will explore the first level containing $B$ and $C$, then the second level containing $D,E,F$ and $G$, etc., till it reaches the last level.
I am lost concerning which node between $B$ and $C$ (for example) will the BFS expand first?
Originally, I thought it is different every time, and, by convention, we choose to illustrate that it's done from the left to the right (so exploring $B$ then $C$), but my professor said that our choice between $B$ and $C$ depends on each case and we choose the "shallowest node first".
In made examples, there isn't a distance factor between $A$ and $B$, and $A$ and $C$, so how could one choose then?
My question is the same concerning DFS where I was told to choose the "deepest node first". I am aware that there are pre-order versions and others, but the book "Artificial Intelligence - A Modern Approach, by Stuart Russel" didn't get into them.
I tried checking the CLRE algorithms book for more help but the expansion is done based on the order in the adjacency list which didn't really help.