Guidelines for artificial intelligence programming assignments
David Leake

To avoid any confusion on the expectations for the programming assignments, here is a summary of some major points:

Separation of data and program/generality of code:

The assigned programs are designed to illustrate very general processes. The range of examples that they can handle will depend on the knowledge they have, but one of the goals of of the assignments is to make programs that would be easy to ``scale up'' by adding new knowledge without having to revise any of the other code. Because of that, programs should use processing methods as independent as possible from the specific knowledge they use.

For example, if an assignment asks for a program that can generate plans to control a robot arm moving blocks, the program should be able to handle any scenes with any number of blocks and any configuration, not only the example given to demonstrate its function. For an assignment involving writing a syntactic parser, the parser should be able to function correctly with any any grammar provided to it, not only with the grammar used as an example.

The more general code is seldom more difficult to write than special-purpose code, and is much more useful: One result of writing general programs is that at the end of the course, you will have a library of building blocks for AI systems. In AI research, the micro-programs have often been used that way, making it possible to build complete systems while concentrating effort on new research points.

If you have any questions about the level of generality expected on a particular assignment or part of an assignment, please don't hesitate to ask!

Documentation:

Code should be clearly documented with comments.  Revisions of existing code should also be documented with comments.  See “collaborative work and use of external resources” for additional required documentation.

Style:

Real AI applications generally involve large programs, sometimes written and maintained by numerous people. Consequently, programming style can be the difference between success and failure of an AI project, so style of programs will be a consideration in grading. It will not be a substantial component of the grading---what we stress are the ideas and algorithms---but some comments on the style will be made for your benefit. There are different ideas about what makes good programming style, and the purpose of the course is not to teach a particular style, so there will be considerable latitude for how the assignments are coded. However, some points may be awarded or subtracted for particularly good or bad style.

Collaborative work and use of external resources:

It is fine to discuss high-level aspects of algorithms or to help your colleagues track down specific bugs, provided all help is acknowledged and described in the comments at the start of your solution. However, unless instructed otherwise (e.g., for a project to be submitted jointly), all code should be written completely independently. You may not consult or reuse any code on external web sites, etc., without permission from the instructor. Before you do any assignment you should read the CS program statement on academic integrity, available from the administration page. If you are unsure about what is permissible, please ask us.