Welcome to CMPT 383, Summer 2019!

Welcome to CMPT 383: a discussion of the fundamental problems of artificial intelligence (AI), and approaches to solving them.

The course marking scheme, along with weights and due dates for assignments, quizzes, etc. are on Canvas.

Here is the official course outline. Please note a couple of things:

Assignments

The course marking scheme, along with weights and due dates for assignments, quizzes, etc. are on Canvas.

Midterm exam

Closed-book, in-class during a regular lecture time. Please note that you will be asked to place all books, jackets, computers, cell phones, etc. at the side of the room.

Some basic exam rules that will be followed:

  • You cannot leave in the first 30 minutes (in order to give people who arrive late a chance to write the exam).
  • In the last 10 minutes of the exam, no one can leave. This is to avoid disturbing people who are still working on the exam.

Importantly, you may not have a cell phone with you when you write the exam. You must put your cell phone in your bag, or keep it at the front of the room.

There will not be time during the midterm to allow people to use the washroom, so please be prepared!

  • The date of the exam is in Canvas.

  • The exam could have any type of questions, such as:

    • Reading or writing code.
    • Defining important terms, or giving examples of them.
    • Short answer, true/false, multiple choice, etc.

    This is not necessarily an exhaustive list. There could be other types of questions, and not all these questions types will necessarily occur on the exam.

  • The midterm exam will cover all topics discussed in the lectures and notes up to, and including, writing basic Haskell functions (and their signatures).

    • Nothing about Haskell type classes, or beyond, will be on the midterm.
  • The midterm will have 4 question related to Scheme, and 1 related to writing a Haskell function.

  • Here is a sample midterm exam (solutions).

  • Here is the Summer 2019 CMPT 383 midterm exam (solutions).

Please read the grading FAQ for answers to commonly asked question about how grades are calculated.

Final exam

Closed-book, at a time set by SFU during exam schedule. Please note that you will be asked to place all books, jackets, computers, cell phones, etc. at the side of the room.

Some basic exam rules that will be followed:

  • You cannot leave in the first 30 minutes (in order to give people who arrive late a chance to write the exam).
  • In the last 10 minutes of the exam, no one can leave. This is to avoid disturbing people who are still working on the exam.

Importantly, you may not have a cell phone with you when you write the exam. You must put your cell phone in your bag, or keep it at the front of the room.

Here are some details about the final exam:

  • two-third of the marks on the exam are about Haskell and Prolog (same amount of marks for each)
  • one-third of the marks on the exam are for Scheme and Go (same amount of marks for each)
  • since there was no assignment to practice with Go, the Go questions are all multiple choice or true/false
  • the notes on Go cover more examples and details than were covered in the lecture, so
  • here are a few practice questions (including solutions)

Please read the grading FAQ for answers to commonly asked question about how grades are calculated.

Software

Assignments for this course should be done on Ubuntu Linux. If you don’t already have it installed, you can set it up using a virtual machine (such as Virtual Box) on your computer.

If you are unfamiliar with the Linux shell, here are a few basic Linux shell commands.

For assignments, you’ll likely be using these languages: Go, Scheme, Haskell, and Prolog. They can be installed from the Ubuntu command-line with these commands:

$ sudo apt-get update
$ sudo apt install golang-go haskell-platform mit-scheme swi-prolog

Depending upon the speed of your Internet connection, this could take a few minutes.

If you would like a more recent version of Go then check here for instructions on adding a more up-to-date Go archive.

Using MIT Scheme with Sublime Text

MIT Scheme is meant to be used inside a text editor. Here’s how you can set it up to work with Sublime Text:

  • Make sure you have the most recent version of Sublime Text, to ensure that you have the package manager used in the next step.

  • Install SublimeREPL by typing ctrl-shift-P in Sublime, then typing “install”, and then selecting “Install Package”. Then type “sublimerepl”, and select it; it should be automatically downloaded and installed in a few seconds. This will let you run a Scheme command-line in Sublime: open the Tools menu, choose SublimeREPL, and then select Scheme from the list of REPLs.

  • Using the same process as in the previous step, also install the Scheme package.

  • While not strictly necessary, it is convenient to add the following key-binding to Sublime that will evaluate a Scheme file when you type ctrl-shift-e:

    [
      { "keys": ["ctrl+shift+e"],
        "command": "repl_transfer_current",
        "args": {"scope": "file"}
      }
    ]
    

    Place the above code into the following place in Sublime: select Preferences, then Key Bindings. Then paste the above code in the right-side window, and then save it. Re-starting Sublime should now make it active.

    If you happen to have other user-defined bindings, then insert only the code from { to } after the [ in the right-hand window, and put a , after the }.

    Now when you have a Scheme repl running in a Sublime window, if you type ctrl-shift-e in a Scheme file window, everything in that file will be evaluated in the repl.

Dealing with Parentheses in Scheme

Getting all the parentheses to match correctly in Scheme can be a challenge even for experienced programmers. So here are two suggestions to help you with all those parentheses:

  • Carefully line-up matching end-parentheses on their own line, so that the indentation visually indicates which parentheses match.
  • Try parinfer, a Sublime plugin that usually does a good job of automatically getting parentheses right.