CMPSCI 383: Artificial Intelligence

Fall 2014 (archived)

Assignment 00

This assignment is due by 1700 on Friday, 05 September.

The goal of this assignment is to verify that your Edlab account is working, that you can access it, and that you can submit assignments. It is intentionally trivial. I am going to be nitpicky when grading, so read carefully.

  1. (1 point) Submit a PDF of your most recent resume or curriculum vitae (or an empty PDF if you don’t have one you wish to share), named with your last name and first name, separated by a hyphen. For example, mine would be named liberatore-marc.pdf.

  2. Submit the source code of a program in the language of your choice that has the following behavior:

    • (1 point) When run without arguments, it prints Hello World, terminated by a newline, then exits.
    • (1 point) When run with arguments, it prints on a single line Hello, followed by a space, followed by each additional argument, with a single empty space interposed between each argument, terminated by a single newline, then exits. Do not write two newlines!

    Name the file some reasonable variant of “Hello World,” for example, HelloWorld.java or helloworld.py. I know that some languages (like Java) impose restrictions on naming. Do your best.

  3. If the language of your choice is not Java, Python, Ruby, node.js-compatible JavaScript, or ANSI C or C++, or if you’re concerned it’s not completely obvious to me how to compile and execute it, submit a file named readme.txt that tells me how to compile and execute the program. If it takes me longer than five minutes to follow the instructions in this file, I may reduce your grade.

Below are explicit directions for completing the assignment at the command line. You are welcome to follow them, or to complete the assignment locally and then upload it using the tool of your choice (e.g., a graphical SFTP client like WinSCP).

  • Connect to an Edlab Linux machine using ssh.
1
ssh elnux.cs.umass.edu
  • Change directory into the cs383 directory:
1
cd cs383
  • Create the directory for submitting the assignment, and change directory into it.
1
2
mkdir assignment00
cd assignment00
  • Create an appropriately-named empty text file, and convert it to PDF.
1
2
touch liberatore-marc.txt
convert liberatore-marc.txt liberatore-marc.pdf

convert is a terrible way to make PDFs from text documents, but it does have the virtue of being installed on the Edlab by default.

  • Write the program using the editor of your choice, e.g., nano:
1
nano helloworld.py

In nano, use Control-X to exit and save.

  • Test your program.
1
2
3
4
(the simplest case)
python helloworld.py
(should output) ->
Hello World
1
2
3
4
(the next simplest case)
python helloworld.py foo
->
Hello foo
1
2
3
4
(two arguments)
python helloworld.py foo bar
->
Hello foo bar
1
2
3
4
(spaces between arguments should be irrelevant)
python helloworld.py      foo          bar
->
Hello foo bar

Questions and answers

I’m on the waitlist and don’t have a cs383 directory in my edlab account.

If and only if you are on the waitlist and/or are a Five College student without an Edlab account you may submit this assignment by email to me, CCing the TA. The subject line of your email should be CMPSCI383: Assignment 00. Include each file as a separate attachment in a single email. Do not zip or otherwise compress or concatenate the attached files.

I’m a 5-college student and don’t have an edlab account.

See the answer to the previous question.

Once you’re enrolled, an edlab account will be created for you and I’ll expect you to use it when submitting future assignments. Visit CSCF on the first floor of the CS building for more details, or email CSCF at system@cs.umass.edu for more information.

I am taking CS383 and trying to login to the edlab servers, but can’t seem to get my password. Although I haven’t signed in to edlab in two years, there’s a very short list of passwords I ever use (which I know is bad but I do it anyways) and I also tried my spire ID number and also the default edlab password for new students all to no avail. So I am wondering who I should talk to in order to figure out or reset my password. I apologize for the inconvenience.

If you are having Edlab problems and you’ve exhausted the above options, you probably should go to CSCF, located on the first floor of the CS building, and ask for help. You can also try emailing them (system@cs.umass.edu) with your request for help.