Lightbot Game Assignment
Hey! Let's play a game! :) The game is Lightbot and it is a fun game based on coding/programming!
Your task is to give instructions to a little bot to help her move through a maze to light up designated squares.
While playing we'll be practicing many of the concepts & skills we will be learning & using throughout our journey this year!
This is NOT about coding or programming. This IS about coming up with a way to solve a problem THEN using code to implement the solution.
I do not want you to just play the game. I want you to use and practice your Computational Thinking skills
on each level. Have a piece of paper out and do your thinking and planning on the paper. Before you start actually coding the
instuctions in the Lightbot game interface, you must first work out your plan/algorithm on paper:
- Decomposition:
- Break it down into smaller pieces ... chunk it.
- Describe what you see, the overall maze. Is it a U, is it a square, does it look like bleachers?
- Is it made up of parts? Describe the parts. Is it made of rows, or columns, or ...
- Your main method/procedure/function MUST always be a short concise summary of the program. There should be
very little to no detail in your main(). It should mainly be method/procedure/function calls.
- Procedures are one of the main ways we represent decomposition in software.
- Pattern recognition:
- Look for patterns in the decomposed parts:
- Are there similarities between the parts? Compare and contrast.
- Do the parts overlap?
- Are the transitions from part to part the same/symmetric? Do they all turn the same direction?
- Compare this problem to other problems:
- Have you seen a similar problem before?
- Can you use the same or similar solution?
- Abstraction:
- Generalize:
- Find the general principles that generate or describe the patterns and decomposed parts.
- Are the parts similar enough to use the same set of instructions?
- Are all the transitions identical?
- Can you include the transition to the next part in the repeated steps for the part?
- Algebra is a great example: you can graph a line but you are only showing part of it. When you
write the y=mx+b equation you have now come up with an abstraction of the line. This equation is
a generalization of the points you drew. It captures what you can see and ALSO every other point on the line.
- Algorithm:
- What repetition do you have?
- How do you want to use your procedures? What should Proc1 do? What should Proc2 do?
- Should one procedure use the other?
- Do the transistion steps go in a procedure (Proc1 or Proc2) or do they go in Main?
- Now iteratively refine what you've come up with! Continue using your Computational Thinking skills...
- Do you have repeated set of instructions that could be combined into a procedure?
- Do you have unnecessary/wasted steps?
- Do your steps actually work? Desk-check it! Play computer...and test it on paper.
Once you have gone through this process you are ready to actually code the solution! Some tips:
- Code in baby steps. Code one stage of the solution (say in Proc1) and simply run that (put P1 only in Main)
- ...then add the next piece. As a general rule when we get to bigger more complex problems, if you try to code the
whole thing at once you will generally make a mess. It will be too hard to debug because the more untested parts
you have the harder it is to tell where the problem is and the parts often produce compounding side effects.
- Remember, code is the absolute last step AFTER you have come up with a refined algorithm!
- If you get stuck, and ESPECIALLY if you find things just getting more and more complicated ...
- Stop, back up, and try to come at it from a different angle, try a different approach
- KISS - Keep It Simple Silly
- "Make it as simple as possible and no simpler." - Einstein
Be prepared to share what you've found! You will turn in the paper(s) that have your planning work via the associated (by level) Teams assignment.
Here is a video in which I play through several levels of an older and different version of the game. Heads up: it is long so feel free to take breaks!
I normally do this in class and it takes 1-2 class sessions. In it I try to model how I would apply the CT process to solving levels and expose my thinking.
In this version (the 1st screen capture video I've ever done) I am not recording in writing like I want you to do. 1) I am learning how to do these videos so
maybe next time and 2) I was concerned it would make it even longer. I am verbally processing and articulating my plan.
Here is the link to the game: https://lightbot.com/flash.html