CS 202 Fall 2011
Homework Assignment #3 : Due Monday 9/26 by 9:55 am
This homework has three parts. In the first part, you'll use your creativity to design and implement your own interactive story with your own characters and plot. In the second part, you'll explore different web sites that can be used for recommending movies, songs, and books. In the third part, you'll analyze how variables change in a script written in Scratch.Part A: Create your Own Interactive Story (4 points + up to 2 points Extra Credit)
The purpose of this homework assignment is to implement an "interactive story". An interactive story is an animated story in which the reader controls the future action, much like a Choose Your Own Adventure. As an example, you may want to take a look at this mystery.
Specification
You can implement any action or any story with any characters that you find interesting. Please avoid any offensive material. We wish we didn't need to have any specification other than "be creative and have some fun!" However, it seems to be useful for us to give you some guidelines so that your interactive story is sufficiently complex. You are welcome and encouraged to go beyond this minimum specification.At a minimum, we expect that your interactive story will include:
- At least two Sprites. You may either draw your own Sprites or import your own images (in .jpg or .gif format) to make Sprites. You can not use images that are included in Scratch, so be creative. Each Sprite must do more than simply "show" itself.
- At least one of the Sprites must contain and show more than one costume.
- You must use instruction blocks from at least the Motion, Looks and Sounds categories. You can use more block categories if you desire.
- You must have at least three backgrounds other than white.
- Your story must allow the user to make (at least) three decisions. That is, each time the program is run (regardless of how the user answers the questions), it must ask (at least) three questions. Each question can have two (or more) possible answers. Each answer should lead to some state with an associated script (it is okay if some combination of answers lead to the same state).
- Your story must have at least five different possible endings or final states.
Hints
We expect that you will use the ask block to ask the user different questions. You'll then probably use the answer variable as part of a question in an if statement to control which instruction blocks execute depending on their answer.We expect that you will use the broadcast and When I receive blocks to activate scripts across sprites. Remember to use good names for the broadcast and receive messages!
In your story, you may not use existing code that you find elsewhere, including the Scratch website. You may look at the behavior of existing Scratch projects for inspiration, but you should develop all of your code as a completely new project and not modify, re-mix, or build from any one else's code.
Extra Credit (Optional)
For extra credit, you may share your interactive story with the class. You can obtain up to two points of extra credit: one point just for correctly sharing (and voting!) and one point for being selected as a winner to advance to the second round of voting.To correctly share your picture, follow these steps carefully:
- Save your complete project.
- "Share" this project on the Scratch website by clicking "Share" and then selecting "Upload project to website". (Of course, you must be connected to the network to do this!)
- Use a web browser to go to the Scratch website and visit the gallery F11-HW3. Click on the button on the right-side of the page saying "add my projects". In the pop-up box, select your project that you want to add and click "Accept".
- Verify that your project with the picture you like is showing up the gallery.
Round 1 Voting
Second, you must vote by Thursday midnight.
Figuring out which projects are the "favorites" of the class is tricky; with about 50 projects in the gallery, we need a way to do some voting without overwhelming everyone with too many choices. No one wants to look at 50 projects, no matter how good they are (the TAs have to, but you don't! :)
The way computer systems (or sports or any competition) often solve this problem is to use a hierarchy (or a tournament). So, we're going to hold voting rounds to select a few winners...
In Round 1, we have 10 brackets (lettered A-J) and each bracket has about 5 projects (for a total of 48 projects -- the last two lucky brackets have only 4 projects). Identify your bracket by finding your Scratch project's location in the gallery F11-HW3; in its comments, you'll see your bracket name (A-J) as a comment from me. Look for the 4 other projects in your bracket (they will be the ones to your left or right in the Gallery list; I tried to number each project as Project 1-5 within a bracket to help you keep track).
Play the 4 other projects in your bracket and pick which is your favorite (only consider the projects in your bracket). Mark your favorite by adding a comment (on its Scratch project page) saying something like "This is my favorite from Bracket A (or whatever bracket). I am voting for this project." You can add positive, constructive comments to other projects as long as it doesn't sound like you are voting for more than 1.
The project that gets the most votes in each bracket will advance to Round 2. The student with the winning project in each bracket should copy their project over to a new gallery HW3-Round2-Fall11. These 10 (or so) winners will receive another extra credit point and vote to pick the final winners -- I'll post more details about this when we get there.
Note, if you don't vote in your Bracket by Thursday midnight, you won't get the extra credit. You can only vote in your Bracket and you cannot vote for your own project!
Round 2 Voting : Due before Sunday midnight
The 11 projects (there were some ties) that won their brackets will now advance to Round 2 where we will select the 3 best projects overall. This will be the final vote! Students who voted in Round 1 should continue to vote in Round 2 according to the brackets below (you need to continue voting in order to get extra credit).To vote this time, please add a Comment for your chosen project, using the exact phrase:
round_2_vote bracket xyzwhere you'll replace "xyz" with either x y or z depending upon the bracket you are in.
Again, vote once and only once and in the bracket where you are listed as a voter. (Note: If you won in Round 1 and your PROJECT is now in a Round 2 bracket, you are VOTING in a different bracket. So, you don't have any weird incentives for voting for bad projects!)
BRACKET X Projects
ASHLEY IMME (AshleyImme) KAMEKO BLAIR (KameBlair) ALEXANDER GUNDERSON (AlexGunderson) RONGJIE LU (rongjielu)BRACKET X Voters:
ADAM VESOLE (AdamVesole) ALICIA BINGEN (AliciaBingen) AMBER ARNOLD (AmberArnold) CHEEMENG XIONG (stevexiong) CHRISTOPHER CAPORALE (chriscaporale) DAMIAN RUSSELL (DamianRussell) DAVID PRECIADO (davidpreciado) DREW OLSTEAD (DrewOlstead) EMILY OVERKAMP (EmilyOverkamp) ERIC SCHWIERSKE (ericschwierske)BRACKET Y Projects
KYLE SPERL (KyleSperl) JAKE HILBORN (JakeHilborn) ADAM VESOLE (AdamVesole) TANNER O'BRIEN (TannerOBrien),BRACKET Y Voters:
ASHLEY IMME (AshleyImme) ALEXANDER GUNDERSON (AlexGunderson) HAYLEY YOUNG (Hayley_Y) HONGYI SUN (HongyiSun) JAMIE JACOBSON (JamieJacobson) JOSHUA JOHANNING (JoshuaJohanning) KARL FOSS (karlfoss) KELLEY DENNIS (KelleyDennis) LAURA GUNDLACH (LauraGundlach) MEGAN DUFFY (MeganDuffy)BRACKET Z
CHRISTOPHER CAPORALE (chriscaporale) JULIA RUSSELL (jprussell) JOSHUA JOHANNING (JoshuaJohanning)BRACKET Z Voters:
KYLE SPERL (KyleSperl) JAKE HILBORN (JakeHilborn) NATALIE CONANT (NatalieConant) NEIL LASSEN (neillassen) QUINN ELSE (QuinnElse) RONGJIE LU (rongjielu) TAE-YANG YOU (TaeyangYou) TANNER O'BRIEN (TannerOBrien) XU ZHANG (sunggon91) ZACH EHLER (ZachEhler)
Part B: Exploring Recommendation Systems (3 points)
There are dozens of recommendation systems on the web for helping you to find a movie, book, or song that you might like. This article contains fascinating details about the Netflix competition and how these recommendation systems tend to work.In this part of the assignment, you will explore two out of three different movie recommendation systems: Nanocrowd, Tastekid, or Jinni. The main purpose is for you to experience the type of input each of them requires and to see how good of a recommendation each of them makes.
Imagine that you and a group of three friends are in the mood to see a new movie tonight. One of your friends really wants to see a comedy (or at least something funny). Another friend wants to see an ensemble movie with a large cast of characters. Another friend wants to see a movie that is somewhat picturesque or visually interesting. And, you want to see whatever it is that you like to see (e.g., action or science fiction or romance or whatever).
Your task is to use two of the three search engines to find a satisfactory movie and to describe your experience. You can choose any two of the following systems: Nanocrowd, Tastekid, or Jinni.
For each of the two recommendation systems, answer the following questions (be sure you specify the two systems you are using):
- What collection of search terms or keywords did you use to direct you to an appropriate movie? You may need to try more than one set of terms to find an appropriate movie. It might not be straight-forward to translate your friends interests to the information that the web site expects. Do your best!
- How did you come up with these search terms?
- What movie did this site finally recommend? (Don't worry: We aren't expecting a particular movie.)
- Do you think this movie fills the requirements of all four people? Why or why not?
- What did you like about using this site? What did you not like (or think could be improved)?
- Overall, would you recommend this site or use it again? Why or why not?
Please write up your responses using an editor of your choice, save in format .pdf, and submit the .pdf file through Learn@UW as described below.
Part C: Variables in Scratch (3 points)
Variables are an important aspect of programming languages. A variable can be viewed as a container for a value and the value that a variable holds can change (or vary) as the program executes or runs. Variables allow a program to remember different values; variables enable a program to then act differently depending on the current value of a variable.
Given a script in Scratch, you can execute the instruction blocks in your head and predict exactly how Scratch will execute those same blocks. The following script takes as input the initial value for the variable a. This script then calculates the value of i as a function of a. Depending on the value of a the script performs some number of iterations of a repeat until loop. During each iteration of the repeat until loop, the script modifies the current value of a and i.
Hint: The a mod 2 block divides the current value of a by 2 and returns the remainder. In other words, if a is even, it returns 0; if a is odd, it returns 1.
Imagine the program is run three different times, each time with a different input value for a.
- a = 8
- a = 32
- a = 12
- The values of variables a and i at the end of each iteration of the repeat until loop. For example, if the repeat until loop iterates 4 times, you will state the values of a and i at the end of each of those 4 iterations.
- What is the final value of i that is calculated for this value of a?
- How many times did the repeat until loop iterate for this value of a?
Turning in your Homework
You should turn in this assignment through your Learn@UW account. To do this, we think you can follow these steps:- Login into LearnUW : "learnuw.wisc.edu" using UW NetID and password.
- Click on the link "compsci202:Introduction to Computation" under student tab.
- Click the Dropbox option which is on Top-Left of your web page.
- Click the link to the corresponding HomeWork you need to upload. It directs you to a page where you can upload files.
- Upload the desired files and submit them. Your Scratch program will be saved in a file with the extension ".sb". For example, if you named your program "homework3", then you will see a file with the name "homework3.sb" that you should upload. Your write-up for Part B and C should be in a file (or two) with an extension of ".pdf".
Menu
Fall 2010Time: MWF 9:55-10:45
Room: 1221 CS
Lab: 1370 CS (1st floor)
Instructor:
Prof Andrea Arpaci-Dusseau
Office Hours
Mon 11-12, Wed 11-12
Office:
7375 Computer Sciences
Email: dusseau "at" cs.wisc.edu