CS470/570 Introduction to AI, Fall 2016

Schedule Problem Sets Syllabus Canvas

News and Announcements

General Information

Instructor:

Drew McDermott. Office: 508 Watson. Phone 432-1284
Office hours by arrangement. I'm best contacted by e-mail as drew.mcdermott@yale.edu
.

Teaching Assistant:

None this term

Scala

Download

Download Scala here: You have several choices of how to proceed. Pick option 1 (command-line tools) or option 3 (one of the IDEs). (Option 2 is the "Lightbend Activator," which appears to be a commercial product of some kind.) (MacPorts is a convenient way to install all sorts of open-source software; you can get the latest version of Scala there, too.)

Documentation

See the Scala documentation page for links to tutorials, cheat sheets, and places to buy books. One useful tutorial is "A Tour of Scala". The book Programming in Scala: A Comprehensive Step-by-Step Guide, 2nd Edition, by Odersky and Spoon, is the most authoritative source. Scala for the Impatient, by Cay S. Horstmann, is a terrific book for Java programmers. For Python lovers, this Python to Scala guide looks good, but I'm no expert.Love

The Scala API is documented in exhaustive if somewhat bewildering detail in the Scaladoc output for the built-in class library. The packages are listed in lexicographic order down the left of the web page; within each package the classes and traits are listed alphabetically. For each class or trait there is a little "o" and a little c (white font on a green circle) to its left (the "o", or, more rarely, the "c," may be missing). Click on the "c" and the class and its members will be displayed; "value members" are the methods in the API for that class. Click on the "o" and the companion object for the class will be displayed.

Before you panic, try reading the Scala Collections Framework, which describes with reasonable clarity many of the packages and classes we will be depending on. But when you need to flip through a list of methods looking for one to do a job you have in mind, you may find yourself ready for the Scaladocumentation of package scala.collection.immutable.

Environment

The simplest way to proceed is to use the command-line tools scalac and scala plus a text editor such as emacs or vim. (There are a zillion editors oriented around programming, so it's hard to recommend one.) However, many people like integrated development environments (IDEs) such as Eclipse. Most of their bells and whistles will be wasted on us, but these are probably popular in industry, and Scala is rapidly gaining popularity, so perhaps it's useful training.

Zoo

If you don't have a Zoo account, and would like one, apply here.

If You Plan to Present a Paper Soon …

How to Present a Paper

End Notes

Note Love
I am not a Python lover myself. I wrote one python script (the word "program" seems too strong) and that was enough. The language had (and may still have as far as I know) at least two fatal flaws:

  1. Variables' scopes (in so far as they have scopes at all) are defined as an afterthought.
  2. Function literals are syntactically less general than named functions, making them "non-first-class" citizens, purely because Guido van Rossum, the brooding genius overseeing Python, thinks big functions should have names. Even if that is true, it makes debugging a pain because you can't put temporary debugging statements into function literals without naming them (and then un-naming them when you take the temporary hacks out?). Van Rossum's guess as to what "big" means seems arbitrary.
[Back]