Exploration Sessions

Exploration session time/place:
Tuesdays, 3:30 - 4:20pm, in MUE 153

Each week we will offer a different opportunity to explore extra topics in computer science. There will be a homework assigned each week. You will accumulate one "exploration point" for each week that you attend the lecture and do the homework. At the end of the quarter, your total exploration points will be divided by 3 and will be added to your homework points. There will be 166 homework points total, so this isn't adding a lot to your potential score. As an example, if you were to participate in 3 exploration sessions, you would have 1 point added to your homework points, which is like getting one more point on a weekly programming assignment. The idea is to give people a small reward, but not something that is so large that people feel obligated to participate in these optional sessions.

Week 9 ([no session]) -- 3/9/2010


Week 8 (Scala) -- 3/2/2010 icon Turn in Exploration HW8 here.

  • Java is popular, professional, Object-Oriented Programming language. As such, Java has its own set of rules that you must follow to make a program compile. However, some of these decisions are arbitary. This week, we'll take a look at Scala. Scala is a variation of Java that borrows some ideas from Functional Programming languages. In particular, it allows you to write some kinds of code that Java doesn't. The homework will involve a very short Scala programming assignment using these some of these features.
  • Homework -- complete 3 short Scala programming problems
    • Turn in Exploration HW8 here. (due: Tuesday 3/9/2010 at 3:30pm)
    • Windows Instructions
      • Download and install Scala (choose the IzPack Installer).
      • More instructions for Windows (Mac is finished after the link above)
      • Update the PATH environment variable to know about Java (tutotial). Your path may vary slightly from the tutorial (e.g. Windows 7 will probably use "Program Files (x86)" instead of "Program Files"
      • Update the PATH environment variable to know about Scala. This is just like with Java, but now you're directing it to Scala. On my Windows 7 machine, this path is C:\Program Files (x86)\scala\bin, and my entire PATH variable looks like C:\Program Files (x86)\Java\jdk1.6.0_18\bin;C:\Program Files (x86)\scala\bin;\bin
      • Delete the SCALA_HOME environment variable
      • You should now be able to run the Scala interpreter by opening a command prompt and typing "scala" (you can open the command prompt by typing cmd into the search bar in the start menu.
    • Mac Instructions
      • Download and install Scala (choose the IzPack Installer).
      • Navigate to directory you installed scala to (the default is /Applications/[your-username]/scala/bin where [your-username] is replaced by your actual username on your Mac)
      • Double click on the item named "scala". This should open a terminal running Scala.
      • Put the file scala-homework.scl into /Applications/[your-username]. This will let the :load command find this file.
    • You can see a transcript of what I ran in the session in this file: scala-output.txt
    • Complete this file: scala-homework.scl. To load this file, type ":load scala-homework.scl" while in the Scala interpreter. You may need to specify the location of scala-homework.scl on your machine. You can re-load this file multiple times, and it will re-create the code according to the current saved version of the file. Also, make sure you actually edit the file (using an editor like Notepad)! Typing things into the interpreter (like I did in the session) alone won't save your code anywhere!
      • use the map, filter, and reduceLeft methods for arrays (API here) to solve these problems
      • quick examples:
        • Array(1, 2, 3, 4).map((x : Int) => x * 2) produces Array(2, 4, 6, 8)
        • Array(1, 2, 3, 4).filter((x : Int) => x % 2 == 0) produces Array(2, 4)
        • Array(1, 2, 3, 4).reduceLeft((x : Int, y : Int) => x + y) produces 10
    • Turn in your completed version of scala-homework.scl. If you're having a lot of trouble with one of the problems (*cough* Problem 3 *cough*), just submit the work you've got.

Week 7 (Machine Learning) -- 2/23/2010 icon Turn in Exploration HW7 here.

  • This week we'll be talking about machine learning. Machine learning is the study of writing programs that learn how to do a specific task based on examples. For example, one application of machine learning is automatically diagnosing a patient's disease based on the patient's symptoms, after learning from many previous diagnoses. We'll discuss a few fundamental machine learning models at a high level and explore some specific examples in a language called Prolog. The homework will involve running the n-grams program on the book of your choice.
  • Homework -- produce some text with the n-gram program after feeding it the book of your choice.
    • Turn in Exploration HW7 here. (due: Tuesday 3/2/2010 at 3:30pm)
    • Download a (free, legal) book from Project Gutenberg.
    • Run the n-grams program on it
      • Windows users: use Ngram.exe
      • Other users: use Ngram.jar -- you'll need to either use Eclipse (see exploration week 1) or the command line to run
    • Turn in the ngram-output.txt file that is produced. This file is a transcript of your interactions with the Ngram program. (Note: the ngram-output.txt file is part of a new version of the Ngram program. If an ngram-output.txt file doesn't appear, try re-downloading the Ngram program).
  • Related fun: check out SCIgen. SCIgen is an automatic research paper generator. Its claim to fame is that one of the papers it produced was actually accepted to a conference.

Week 6 ([no session]) -- 2/16/2010


Week 5 (Cryptography) -- 2/9/2010 icon Turn in Exploration HW5 here.

  • How can I send sensitive information (my credit card number, my social security number, etc) to someone else without letting anyone else know this same information? One way through cryptography. Cryptography is the art of using ciphers to encode information. This makes the information hard to read. We'll learn some some of the basic ciphers, as well some of the techniques used to break them. We'll also talk about some of the limitations of cryptography. The homework will involve using the techniques you've learned to decode a message.
  • Homework -- decrypt an encrypted message
    • Turn in Exploration HW5 here. (due: Tuesday 2/16/2010 at 3:30pm)
    • decrypt this encrypted message: code.txt.
      If you'd like a little help, here's a partially solved version: codeHint.txt.
      • This message is poorly encrypted. As such, I'm not telling you how I encrypted it. However, I did not use any transposition (i.e. I didn't change the position of any character in the message)
      • This is a little harder than what we did during the session, but many of the techniques we talked about will be effective
      • You're free to use a computer to help you decrypt, but this message isn't encrypted securely enough to require anything more than a little patience. In fact, it might even be easier to do this by hand than with the help of a program. Also, writing helpful code may be considerably more difficult than the assignments you've been given in class so far.
      • If you've spent a lot of time on this and are having trouble, e-mail me (eapter at cs.washington.edu) for a hint. Make sure to tell me things you've already discovered about the message so that I don't tell you something you already know.
    • turn in your version of the decrypted message

Week 4 (Computer Graphics and Animation) -- 2/2/2010 icon Turn in Exploration HW4 here.

  • This week we'll be exploring the technology behind computer graphics and computer animation. What kinds of things do the artists have to think about during the creative process? What kinds of effects are easy (or difficult) to draw/render? To aid in our exploration, we'll be watching a few Pixar shorts, including Geri's Game and Partly Cloudy. The homework will involve watching a computer animated film of your choice and commenting on the techniques used in its creation.
  • Homework -- watch an animated film of your choice and discuss the techniques you see in it's creation. What about the film seems "easy" for computers? What seems "hard"?
    • Turn in Exploration HW4 here. (due: Tuesday 2/9/2010 at 3:30pm)
    • Make sure to include your name and the name of the film you watched
    • Some possible film suggestions:
      • Animusic (check YouTube)
      • Antz
      • A Bug's Life
      • Cars
      • Final Fantasy: The Spirits Within
      • Finding Nemo
      • The Incredibles
      • Monsters, Inc
      • Ratatouille
      • Shrek
      • Toy Story
      • Up
      • WALL-E

Week 3 (Automata) -- 1/26/2010 icon Turn in Exploration HW3 here.

  • This week we will be playing with automata. Automata are abstract machines that we use to explore different kinds of problems. We're going to learn about a few kinds of automata, and we'll see what they can and can't do. In particular, we'll start with John Conway's Game of Life (a famous cellular automaton). From there we'll quickly explore finite state machines, which will help us think about the Turing machines. Turing machines are crucial to computer science, as they can compute anything that the world's most powerful super computer can compute. The homework will involve creating your own cellular automaton for the Game of Life.
  • Homework -- create your own automaton in the Game of Life
    • Turn in Exploration HW3 here. (due: Tuesday 2/2/2010 at 3:30pm)
    • Download and install Golly, which simulates the Game of Life.
    • Create and submit your own custom automaton

Week 2 (Thinking Machines/Artificial Intelligence) -- 1/19/2010 icon Turn in Exploration HW2 here.

  • This week we will be thinking about thinking. In particular, can machines think? If they can, how would we know? These kinds of questions are central to artificial intelligence, which is a field of computer science. We'll discuss some of the most famous opinions on the subject, and we'll have conversations with a few programs that appear intelligent. The homework will involve having a conversation with one of these programs and writing a few sentences about whether you think machines can think.
  • NEW: check out this short (but awesome) YouTube video about Milo. Keep in mind that the interaction you're seeing is likely somewhat scripted. That is, Claire likely knows some things that make Milo respond well. Thanks to Sylvia Tashev for finding this!
  • Homework -- talk with A.L.I.C.E. and write about whether you believe computers can think/be intelligent
    • Turn in Exploration HW2 here. (due: Tuesday 1/26/2010 at 3:30pm)
    • Talk to A.L.I.C.E..
    • Answer the question "Can computers think?" with your own opinion
      • Your opinion must consist of at least 3 sentences, though you may write as much as you wish
      • You can submit your opinion in any reasonable form (.txt, .doc, etc)

Week 1 (Grammars) -- 1/12/2010 icon Turn in Exploration HW1 here.

  • This week we will be exploring grammars. Computer scientists are interested in grammars because we produce our own languages (like Java) and we want to understand various programming languages that we work with. We will explain how to express a grammar in a formal manner and the homework will involve writing your own grammar file for a language that you make up.
  • NEW: GrammarSolverMain.exe for Windows users. Mac and Linux users will still need to use Eclipse, or they can use the command "java -jar GrammarSolverMain.jar" if they know how to use the command line.
  • grammar.zip -- contains the files you need, including:
    • GrammarSolverMain.jar -- the actual program
    • expression.txt -- a grammar for generating Java expressions
    • grammar.txt -- a grammar for generating some basic English
    • zerosAndOnes.txt -- a grammar for generating zeros and ones
  • To actually run the GrammarSolverMain.jar program:
    • You should install Eclipse (Ethan can't figure out how to run it with jGRASP. He'll add instructions for jGRASP if anyone else figures it out). Daniel Otero wrote some great instructions for installing Eclipse here.
    • Create a new Java project in Eclipse (File -> New -> Java Project) with a name of your choice.
    • Make sure your new project is highlighted (click on it once if it isn't).
    • Open the project's properties menu (Projects -> Properties)
    • Select the Java Build Path option
    • Select the Libraries tab
    • Click on the Add External JARs... button
    • Find and select GrammarSolverMain.jar in the menu
    • Now you can run the program by selecting the Run command (Run -> Run)
  • Homework -- create your own grammar file
    • Turn in Exploration HW1 here. (due: Tuesday 1/19/2010 at 3:30pm Tuesday 1/26/2010 at 3:30pm)
    • Your file must have at least 8 rules (one rule per line)
    • Recall that each rule is of the following form:
      non-terminal : terminal | terminal | terminal
      Although the "terminal"s above can also include non-terminals
    • Try to be creative! Some possible ideas:
      • An excuse generator
      • A valley girl speech generator
      • A Java generator