Generative AI Usage

Exams and quizzes. You may not use generative AI for exams or quizzes. This prohibition covers both LLMs (e.g., ChatGPT, Gemini, Claude) and AI code assistants (e.g., Copilot, Cursor, and JetBrains Assistant).

Programming assignments. We do not ban LLMs for programming assignments, but we strongly discourage using them in ways that substitute for doing the programming work yourself. Our grading is built around understanding: code reviews ask you to demonstrate that you understand how your code works and how it behaves on real inputs. In practice, the fastest and most reliable way to succeed is to write your own solution, using course resources (Ed, office hours, lab TAs) when you're stuck.

LLMs have a habit of "solving the problem for you" even when you don't ask them to. For example, if you paste in your code and ask for help, or even ask a seemingly harmless question like "what should I try next?", the model often responds by handing you an outline of the solution or dropping in code patterns that go beyond what we cover in COS 226, making it easy to end up with a working program you don't truly understand.

As a rule of thumb:

Disclosure requirement. When you submit code to TigerFile, you must disclose any use of an LLM in your acknowledgments.txt file. There is no penalty for disclosure, even if you used an LLM heavily, we care about transparency. In code reviews, we won't ask about LLM use; we'll just ask you to demonstrate understanding of what you submitted. It's always better to be upfront about what you didn't implement than to present code you can't explain.

Participation

Lectures. Your lecture participation score is determined by answering iClicker polls during lecture. The score is based on participation (and not whether your responses are correct). You must answer at least 75% of the polls in a lecture to earn credit for it. Please enable location sharing with iClicker. Using a classmate’s iClicker account (or allowing someone else to use your iClicker account) during lecture is prohibited.

Precepts. Your precept participation score is determined by attending and participating in precept. You are expected to attend and participate in the precept for which you have officially registered. To earn participation credit, you must mark yourself present at the beginning of precept.

Automatic waivers. We waive automatically your lowest four lecture participation scores and your lowest two precept participation scores. This accounts for illnesses, religious observances, varsity athletic competitions, weather issues, and late course enrollment, and technical issues with your iClicker app.

Special waivers. To request a lecture (or precept) participation waiver (beyond the automatic ones), we require a recommendation from your Assistant Dean for Studies. Please have them contact the course instructors directly with their recommendation. Do not request a special waiver until after you have used up all of your automatic waivers.

Quizzes

Collaboration policy. You must complete each question variant (that is randomly assigned to you) entirely on your own, with no outside help beyond the course materials; in particular, use of generative AI tools (such as ChatGPT or Google Homework Helper) are prohibited. However, you are permitted to discuss a question variant after it is submitted (and you are assigned a new question variant). If you wish discuss a question variant on Ed Discussion, post the entire question, answer, and explanation, including the question and variant IDs (the numbers after instance_question/ and variant_id= in your browser's address bar), which the course staff can use to uniquely identify your submission.

Grading policy. You may attempt each question in each quiz as many times as you like, but there is a delay between attempts (the exact period depends on the question, but it is usually 2 or 15 minutes). On each attempt, you will receive a randomly assigned variant of the same question. After submitting yout answer, you will receive the correct answer and an explanation. We will record your best score for each question.

Late submissions. Quizzes are due at 11:59pm ET on Saturday evenings. Your maximum possible score decreases by 10% for each day (or part of a day) past the deadline. For example,

When computing the quiz componenent of your course grade, we will drop your lowest quiz (one week of questions). This accounts for illnesses, religious observances, varsity athletic competitions, late course enrollment, and technical issues. Please do not request a quiz extension unless you have special circumstances for more than one week of quizzes. Quiz extensions are considered only with the recommendation from your Assistant Dean for Studies.

Assignments

Grading. Programming assignments are worth 35% of your total course grade, split into two components:

The autograder does not determine your grade, it is a tool for feedback only. Your understanding and ability to explain your code is what matters most.

Code Reviews

Each student completes three code reviews over the semester, scheduled as shown on the assignments page. Code reviews are approximately 20 minutes and are conducted one-on-one with a TA.

What to expect. You may open your code, run it, and use notes during the code review. The TA will ask you to demonstrate specific components of your submission. The goal is to get clear evidence that you understand how your code works; the TA is not trying to trick you.

Component-based grading. Your code review grade is based on demonstrating individual components of the assignment. A component earns credit only if you can show a real connection between your code and its behavior.

Partial credit for honest incomplete work. If you didn't finish a component, say so. You earn 25% partial credit on that component for acknowledging incomplete work, and additional partial credit if you can demonstrate that you attempted it and understand what went wrong. Claiming you implemented something but being unable to demonstrate it earns no credit. Honest partial progress is always better than pretending something works or showing code that you don't understand.

Submission

Submit your solutions electronically via TigerFile, using your Princeton NetID and password for authentication. You may resubmit files without penalty up until the completion deadline.

Submitting with a partner.  On assignments that permit working with a partner, you must register your partnership in TigerFile. Either partner may submit files. Both partners receive the same score and must attend the code review together.

Autograder.  Clicking the Check All Submitted Files button compiles your Java programs, runs a battery of tests, and reports the results. You may click this button at most 10 times per assignment; if you are working with a partner, this limit applies to the group. The autograder is available only before the completion deadline.

Acknowledgments file. All assignments must include a file named acknowledgments.txt, which includes your acknowledgement of original work (as specified in Rights, Rules, Responsibilities), any citations, the names and dates of those who provided help, and any LLM usage.

Completion deadlines. Assignments are "due" at 11:59pm ET on Monday evenings. Each assignment has 2 late days built in: the autograder remains open and we accept submissions with no penalty until Wednesday at 11:59pm ET. After Wednesday, the autograder closes and no further submissions are accepted for completion credit.

Extensions are considered only with the recommendation from your Assistant Dean for Studies and granted under special circumstances. Requests made at the last minute are less likely to be approved, and extensions for the final assignment are particularly rare due to grading constraints. For such a request, please have your Assistant Dean for Studies email the senior course staff with the following information:

  1. Number of additional late days requested.
  2. Justification for the extension, including why the built in late days were insufficient.

Classwide competitions.  On some assignments, you may (optionally) submit your code to a classwide competition. We will time your programs and display the results in a public leaderboard. To enter the competition, submit your code along with a file nickname.txt. Whatever you put in nickname.txt will be used as your alias in the leaderboard. There is no official reward for doing well in the competition.

Coursera policy.  You are not permitted to use the Coursera autograders from Algorithms, Part I or II.

Collaboration policy.  This course permits and encourages many forms of collaboration, including from course staff, classmates, and lab TAs. However, you must be careful to collaborate only as authorized below. Here is an executive summary.

activity your partner course staff 226 alums class-mates other people
discuss concepts with ...
acknowledge
collaboration with ...
expose solutions to ... no no
view solutions from ... no no no no
plagiarize code from ... no no no no no

For the policy on generative AI / LLMs, see the Generative AI Usage section above.

Your solutions.  You must individually compose all of your solutions. The term solutions refers to any of the products created when completing a programming assignment, such as source code (including comments). It includes both finished and unfinished products, regardless of correctness or completeness.

These rules continue to apply even after the semester is over.

Collaboration with course staff.  You are welcome to discuss your solutions with course staff members (instructor and preceptors) in office hours or via a private post in the course discussion forum. Do not post or email us your code; instead, submit it via TigerFile.

Collaboration with classmates.  We encourage you to discuss common concerns with classmates either privately via personal interactions or publicly in the course discussion forum. These discussions must be kept at a general level, without exposing your solutions.
For example, you may discuss: But, you may not:
  • How to interpret an error message. For example, “What does StackOverflowError mean?”
  • The meaning of a piece of Java syntax. For example, “What is the purpose of the clause implements Iterable?”
  • How to use a feature in IntelliJ or bash. For example, “How do I increase the memory available to Java?”
  • Clarifications for the lectures, textbook, or assignment specifications.
  • Solutions to book/booksite/precept exercises or old exam questions.
  • Access a classmate’s solutions (or allow a classmate to access your solutions).
  • Lead a classmate step-by-step through any part of the assignment (or allow a classmate to do the same for you).
  • Refer to your solutions while helping a classmate (or receive help from a classmate while they are referring to their solutions).

Collaboration with COS 226 graduates (including lab TAs and peer tutors).  You are permitted to show your solutions to anyone who has successfully completed COS 226. So, for example, you may receive help from lab TAs in debugging your code. Of course, you must still individually compose your solutions. So, for example, you may not allow another individual to write, type, or dictate code; lead you step-by-step through any part of the assignment; or communicate solutions (including their solutions from a previous offering). Other individuals may help you under these same conditions, provided they are not taking COS 226 now and never will in the future.

Collaboration with a partner.  On those programming assignments designated as partner, the collaboration policy is relaxed to permit working with a classmate, subject to the following rules:

Both partners are responsible for understanding all parts of the submitted assignment and receive the same grade. Both partners must attend the code review together.

Collaboration with yourself.  If you took COS 226 (or Algorithms, Part I or II from Coursera) during a previous offering, you may refer to your old programming assignment only if you wrote all of the code on your own in the previous offering (and you are not working with a partner in this offering). Though, in our experience, students who re-do all of the assignments from scratch are much more likely to succeed in the course, so this is what we strongly recommend.

Collaboration with generative AI.  See the Generative AI Usage section above.

Collaboration acknowledgement.  You must acknowledge all collaboration in the acknowledgments.txt file for that week’s assignment.

Outside sources and citations.  Copying or adapting code that is not yours is permitted only if it comes from the course materials (i.e., the course textbook, companion booksite, programming assignment specifications, checklists, lecture slides, and precepts). You must cite any code that you copy or adapt; the only exception to this rule is for code that appears in the assignment specification or checklist, which you may use without citation.

Plagiarism.  Programming is a creative work and the academic regulations that apply to plagiarizing prose also apply to plagiarizing code. Rights, Rules, and Responsibilities defines plagiarism as “the use of any outside source without proper acknowledgment.” It ranges from “verbatim copying” (e.g., cutting-and-pasting code) to “thorough paraphrasing” (e.g., changing variable names or rearranging code). We use sophisticated tools to flag similar programs and our teaching staff takes the issue very seriously.

Penalties.  We refer alleged academic violations (including plagiarism) to the Faculty-Student Committee on Discipline. If found responsible, you will receive a zero (0) on the assignment adjudicated by the CoD, plus whatever penalty that the CoD imposes. A finding of responsible on multiple assignments can result in more serious course penalties, including an F as a course grade.