Saturday, March 13, 2010

0 Nifty Assignments

One of the most popular sessions at SIGCSE, which has been running for 11 years! The Nifty Assignments session is about promoting and sharing successful assignment ideas, and more importantly, making the materials available on the web.

Nifty Assignments website from previous SIGCSE conferences - http://nifty.stanford.edu/

Picobot - Zach Dodds (Harvey Mudd College)
http://nifty.stanford.edu/2010/dodds-picobot/
Context - CS1, Assignment 1, Problem 1



Goals
  • hands-on, algorithmic programming challenge
  • meaningful engagement with core CS ideas (ie. program state, locality, conditionals, loops, recursion....)
Picobot is a 2d state machine. It can only sense the NEWS (North, East, South, West). The challenge is to write a set of rules so that Picobot will cover its whole environment from any starting position. Problem two is the same thing, but for a different environment, similar to a maze. Next, the students are challenged to solve these environments in as few rules as possible.

Why do students like Picobot? It breaks expectations twice; accessible and inviting; challenging, but doable.


"Picobot was so frustrating but so satisfying to complete."
- student

********************************************************************
The Game of Pig for CS1
Todd W. Neller (Gettysburg College)
http://cs.gettysburg.edu/projects/pig/
http://cs.gettysburg.edu/~tneller/resources/pig/
http://nifty.stanford.edu/2010/neller-pig/

As educators we are looking for good games/puzzles with simple rules that can be pedagogical treasures. Such as, Towers of Hanoi and mazes.
  • The first player to reach 100 points wins.
  • On a turn, a player rolls a die repeatedly until: (a) the player holds, scoring the sum of the rolls, or (b) a 1 ("pig") is rolled, and there is no score change.
  • A player's decision is always to roll/hold
  • Roll: possibly increase turn total, or lose it
  • Hold: definitely score current turn total
  • Pig is the simplest of a class of jeopardy dice games
  • Hold at 20 - a simple (suboptimal) strategy that maximizes expected points per turn.
  • Good for teaching bottom up development
  • CS1 student hurdle: nested loops
  • Stages (a) Hold at 20 turn: single loop (b) Hold at 20 or goal turn: add score, stop for win (c) Solitaire game: nest turn loop within game loop (d) Two-player game: toggle players/scores, factor out common code.
  • Make code cognitively simple by adding comments FIRST.
  • Monte Carlo Explorations- (a) probability distribution of hold-at-20 turn scores? (b) average turns in solitair game (c) first-player advantage in two-player games
  • Used to teach object oriented concepts - interfaces, gui, etc.
  • Keep pace and end race policy - either score GT 71? Go for Goal! OTHERWISE, hold at 21 + round ((your score - my score)/8)
  • Applications of PIG - Used in AI to teach reinforcement learning; Networking - fun client-server game.
Sound Processing
Daniel Zingaro
University of Toronto
http://nifty.stanford.edu/2010/zingaro-song-generator/
  • Language: Python
  • Students use get_sample(i) to get a sample object at index i.
  • Sample objects have get_value and set_value methods
  • Several filters are used to change the volume of a sound, mix sounds together and add echo to a sound.
  • 10-15 lines of code each filter
  • Students write filters so that (a) they practice writing code with loops, (b) they get familiarized with our media library, (c) they understand how digital sounds are stored and manipulated (d) they can use them in a larger program to generate songs.
  • The song is generated by a "notestring" that specifies the language for songs and includes rests, notes, octaves, etc.
  • Students reuse functions to create songs
"I'm in your crime scenz" - Crime Scene Investigation
David Malan
http://nifty.stanford.edu/2010/malan-csi/
  • Jpegs are uniquely identified by a 4 digit code at the beginning
  • BMP files are 1's and 0's in a grid
  • First assignment: give students a BMP file, open it, read first few bytes and compress/enlarge
  • Take pictures on campus and give students the scenario that you accidentally lost the data.
  • 0xff 0xd8 0xff 0xe0 OR 0xff 0xd8 0xff 0xe1 (starting bytes)
  • Once students recover photographs, it is up to them to find these locations on campus. They have to take photographs themselves at the locations and if they are the first to submit, they win the contest.
***********************************************************************
The Great Encryption Case
Mark Sherriff
http://nifty.stanford.edu/2010/sherriff-encryption-chase/
  • The class covers the basics of encryption in a "scavenger-hunt" like active learning activity.
  • Appropriate for any group which basics of encryption is being taught.
  • little to no coding; more about mathematics and usage of encryption
  • Teams of 4-ish are given a clue packet with a number of starter clues for "clue threads"
  • At the end of each thread, a final piece to the overall chase puzzle is given.
  • The answer to the overall chase puzzle is submitted back for credit.
  • Can do whatever cipers and techniques you want.
  • Promotes active learning outside of the classroom.
  • The strength of this assignment is that students are working together on teams to solve logic problems. This assignment can almost be seen as a reward for students, and yet they still do grasp the material. Further, they are visible around campus as they are working on the assignment, which I have found to be good exposure for computing.
****************************************************************
Chatting Aimlessly (IM)
Thomas Murtagh (Williams College)

  • Students implement a simple IM client that interacts with AOL's IM system.
  • Completed over the course of 2 lab periods inour CS1
  • Explores string processing, loops, and interactions between multiple class definitions
  • Log in: toc2_signon murt74 secretPassword
  • Send a message: toc2_send_im thommurtagh "Still there?"
  • Week 1 - write a simple version of the program, where everything is in one window.
  • Week 2-

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.