Lego Algorithm#

Overview#

This lab allows you to hone your skills devising an algorithm using the first four of The Seven Steps.

  1. Work an instance yourself.

  2. Write down exactly what you did.

  3. Generalize your steps from (2).

  4. Test your steps.

With a group, you will use Lego bricks to build patterns, which will help you visualize the algorithm you are devising. Once you have written an algorithm in English, you will swap algorithms with a partner group who will test it and give you feedback. Individually, you will revise your algorithm, type it up, and reflect on your experience.

Instructions#

Meet your group#

Meet your group members, and write their names in your notebook. Do the same for your partner group.

Develop an algorithm#

During the first class session, do the following as a group:

  1. (STEP 1) Work some examples by hand (even though N=0 through N=5 are given!)

  2. Given the printed patterns, form the pattern for N=6 on the board. Take a picture.

  3. (STEPS 2–3) Generalize the steps you followed into an algorithm.

    • If you get stuck, it may be helpful to try writing some tables. Make a table where each row is a value of N, for example, and columns communicate other attributes.

  4. (STEP 4) Test your algorithm for any N.

Note

The exact way that blocks form the pattern of colors on the board does not matter. In other words, it doesn’t matter if someone puts two 2x2 squares side by side or puts down one 2x4 rectangle.

Note

Each group member should have notes about the draft algorithm. Do not share a typed version in a Google Doc because refining the algorithm is individual work.

Give and receive feedback#

During the second class session, do the following as a group:

  1. Trade algorithms and bricks (but not handouts) with your partner group.

  2. Test their algorithm on N=6.

  3. Meet with your partner group to give feedback.

Revise#

Do the following outside of class:

Individually use your partner group’s feedback to revise your algorithm until you are satisfied that it is correct and precise.

What to submit#

The submission for this lab should be a single PDF with three sections:

  1. Algorithm

  2. Reflection

Algorithm#

Include either a drawing of the pattern for N=6 or the photo you took in class.

The algorithm itself should use formatting that helps the reader follow the logic. You can use numbering, bullets, or indentation to help a human reader understand it. It must be in English, not pseudocode; that is, someone with no knowledge of programming languages should be able to read and execute your instructions.

Reflection#

Your reflection should answer the following questions in paragraph form, in 200–300 words:

  • What was your process for developing the algorithm?

  • How did you apply concepts and strategies from this course?

  • Where did you or your group get stuck in identifying or describing the algorithm?

  • What revisions did you make to your algorithm after receiving your partner group’s feedback?

  • Did anything about this activity surprise you? (If not, describe what you expected that turned out to be true.)

  • How do you think the skills you worked on for this lab will transfer to future work?