Reinforcement Learning and
CMPUT 325: Style and Submission Guidelines - Prolog
These guidelines will be enforced for assignments 4 and on. You
are strongly encouraged to follow them for assignment 3, but you will
not lose marks if you don't.
Style Guidelines (some borrowed from
prior C325 courses):
Most of all, keep your code simple, concise, and easy to
Avoid loops and mutation - we are trying to think in new ways
about programming! Use loops and mutation only when absolutely
necessary to achieve the primary style goals given above.
Documentation: For procedure definitions you provide,
documentation would be
appreciated. (Expecially for procedure (or parts of procedures)
which are complicated.) The best kind of documentation is external documentation
(outside the procedure). External documentation should use
regular prose structures with complete sentences and paragraphs.
Be precise; define and use specialized terminology when it is
helpful. Construct ideas in the reader's head to match the ideas
running in your code!
Put the most important predicate first. Do not begin your program
bunch of utilities.
If predicates consist of both facts and rules, list the facts
first, unless Prolog's execution order prevents you from doing so.
Indent your programs for clarity; use a consistent style.
Use meaningful predicate and variable names.
Marks will be taken off for style problems at the marker's discretion.
All submitted text other than
prolog code must be commented
out in the file submitted.
All predicates must be named exactly as given in the Rules, Guidelines and Suggestions
section of the assignment specification. Case is important.
All predicates must take the same parameters as given in
the Rules, Guidelines and
section of the specs, with the parameters appearing in the proper order.
Every time the submission guidelines are not followed you will lose
one mark off your total from the assignment, up to 25% of the total
marks available. These deductions are separate from the style
deductions mentioned above.
In order to help you ensure that you are following the submission
guidelines, a script will test your code at submission (for assignments
4 on) and will inform you of any problems found. Note that the
script may not be able to detect all instances of improper commenting -
you will be expected to check that on your own.