Faculty of Applied Science and Engineering, University of Toronto
CSC181: Introduction to Computer Programming, Fall 2000

Assignment 5 Announcements

Below are announcements and answers to recently asked questions about Assignment 5. If you have a question, please check this page first to see if it has already been answered; if it hasn't, e-mail the instructor or the course newsgroup.


Wednesday, December 6

How do I prevent a file from being #included more than once?

For each of your header files, you should bracket the contents of the file with a couple of preprocessing directives, as shown in the following example.

Suppose your file is called foo.h. Then, as the very first two lines of the file, you should have:

#ifndef FOO_H
#define FOO_H

At the bottom of the file, you should have as your last line:

#endif

This will prevent a file from being included more than once (which causes multiple redefinition errors).

For an example of this, check out the tournament header file.


Reduction in requirements

As announced in class yesterday, there has been a reduction in requirements needed to be eligible for 100% of the marks on this assignment:

  • If you do the assignment alone:

    • Addressing the base requirements qualifies you for 100% of the available marks.

    • For each enhancement you address, you qualify for an additional 10%.

  • If you do the assignment in pairs:

    • Addressing the base requirements qualifies you for 90% of the available marks.

    • For each enhancement you address, you qualify for an additional 10%.


Sunday, December 3

What is a seed and how is it relevant to the random player?

Read pp. 570-571 of your King textbook for an explanation of pseudorandom number generation and the role of seeds in this.


Is there a specific cutoff depth for minimax?

No. As noted in the assignment specification, the depth is specified by the user. The larger the depth, the more moves the minimax algorithm looks ahead in the game tree (which presumably would make the computer play smarter). Your minimax function(s) should therefore be able to carry out minimax to any depth >= 1.


Why are there two getWinner functions in the sample Board module?

Because the documentation wasn't proofread well. :-) Of course, there should only be one. That's been corrected.

 


CSC181 Home Page | Last updated on 2000-12-03 by Ray Ortigas.