Contents of the page

Objectives of the Episode

In this Episode, we learn how to grab a single piece of cheese in a maze using algorithms called traversals. In particular, we study two algorithms: the breadth-first search, and the depth-first search.

Articles to study before the Lab

Test your knowledge of this Episode by taking the following quiz.

Lab description

In this Lab, we program a breadth-first search algorithm for catching a single piece of cheese in a maze, in a minimum number of moves.

As you will see in the articles above, it is very easy to switch between a breadth-first search and a depth-first search if you structure your code well using functions (as we saw in the good programming practices). Try to keep that in mind while you program!

Let’s go!

Work to do for the next episode

  • Finish the implementation of the program in Lab 2;
  • Study the articles of Episode 3.
  • Be prepared for the 5-minute interview during the next Lab, in which you’ll have to present the work done in Lab 2 (see evaluation sheet for details).

Important! It is important to be prepared for this interview. You should have your programs ready for a demo, and have your codes already open not to lose time searching for them. Having figures ready (if you have some) is already a good way of saving time. Remember that 5 minutes is extremely short.