AI Policy
This course neither bans AI nor waves it through. The policy opens up in three stages across the term, tracking what you are able to judge for yourself. Whenever you are unsure whether you may use it, this page is the answer.
No AI-generated code
Weeks 1–7Do not let an AI write or autocomplete code for you. Turn off AI completion in your editor.
You may ask an AI to explain a concept, look something up in the docs, or make sense of an error message.
These seven weeks are where you build a feel for code and the ability to debug it. Outsource that and it does not come back.
Allowed, with a declaration
Weeks 8–14You may use an AI assistant while programming.
Every submission must carry a short declaration: which tool you used, which parts it produced, and how you checked that they were correct.
By now you can tell whether what the AI hands you is any good. The emphasis shifts to verification and understanding.
No restrictions, declaration still required
Weeks 15–16Use it freely — you are encouraged to.
Every submission still carries an AI declaration: which tools, which parts were generated, and how you checked them.
"No restrictions" is about how much you may use it, not about whether you have to say so.
Marks go to design quality, how you split the work into modules, test coverage, and how well the pieces fit together.
Why it is off limits for the first seven weeks
This is not a discipline rule. It is a question of what has to come first. Weeks 1 to 7 are where you develop a feel for code and the ability to debug — where you can look at a fragment and predict what it will print, or read an error and guess which line caused it. You only get there by writing code yourself, getting it wrong yourself, and tracking down the reason yourself.
Hand that stage to an AI and you end up with a pile of code that runs and no way of telling whether it is right. From week 8 onward, that judgement is the single most valuable thing you bring to working with an AI. Models produce code that looks entirely reasonable and falls apart on an edge case. Without those first seven weeks, you will not spot it.
What the declaration should say
From week 8, attach a short declaration to every submission. Three things:
What you used — which tool, which model
What it produced — name the functions or the specific blocks
How you checked it — the tests you ran, the edge cases you tried
The declaration itself costs you nothing. Leaving it out does — because it means you never stopped to think about the division of labour between you and the tool.
Where the line is
Using AI to generate code during Level 0; submitting code you cannot talk through; being unable to explain your own implementation when a TA asks. All three are handled as academic misconduct.
The test is simple: can you answer for every line you hand in?
This course's own AI declaration
Those three points are what we ask of you. Here is the course answering them first. AI was used in building this website, the lecture notes, the slides and the lab problems.
- What we used
Claude, from Anthropic, mostly through Claude Code.
- What it produced
Most of the code behind this website and the lab judge; first drafts of all sixteen lecture notes and lab handouts, in both languages; the slide rendering engine and first drafts of the decks; first drafts of the lab problems, their test data and their reference solutions.
- How we checked it
No output on a slide is ever typed by hand — every code block is executed at build time, so what you see projected is what CPython printed, and a wrong expected value fails the build on the spot. (That check has caught several real errors, among them
0b1100 | 0b1010written as 1010.) Layout is measured page by page in a real browser, and anything that overflows stops the build rather than reaching the projector. Every internal link is checked. The judge has an automated test suite, and every lab problem ships with a reference solution that has been run through it.
What is taught, in what order, at what difficulty, and every claim made along the way, is the instructor's responsibility. If something a tool wrote does not hold up, that is on the person whose name is on it — the same standard we apply to you from week 8.
The reason for writing this down: a rule that we ask of you but not of ourselves is not a rule, it is just something we impose on other people.
Term timeline
| Week | Lecture / Lab | AI policy | Milestone |
|---|---|---|---|
| 1 | L1 / Lab 1 | Level 0 | |
| 2 | L2 / Lab 2 | Level 0 | |
| 3 | L3 / Lab 3 | Level 0 | |
| 4 | L4 / Lab 4 | Level 0 | |
| 5 | L5 / Lab 5 | Level 0 | |
| 6 | L6 / Lab 6 | Level 0 | |
| 7 | L7 / Lab 7 | Level 0 | Solo assignment 1 opens · Hanoi |
| 8 | L8 / Lab 8 | Level 1 | Solo assignment 1 due · AI policy moves to Level 1 |
| 9 | L9 / Lab 9 | Level 1 | |
| 10 | L10 / Lab 10 | Level 1 | Solo assignment 2 opens · primes |
| 11 | L11 / Lab 11 | Level 1 | Solo assignment 2 due |
| 12 | L12 / Lab 12 | Level 1 | Solo assignment 3 opens · big integers |
| 13 | L13 / Lab 13 | Level 1 | Solo assignment 3 due |
| 14 | L14 / Lab 14 | Level 1 | Team project opens |
| 15 | L15 / Lab 15 | Level 2 | AI policy moves to Level 2 |
| 16 | L16 | Level 2 | Team project due |