CS 370 - Spring 2025. 2/12/2025


[Home]

Welcome to CS 370!

Video of the Day

Constraint Satisfaction early work from the London School of Economics.

I hereby solicit suggestions for the video of the day. Please email me your ideas with explanations. Selected entries will win 5 homework points. If your video is played at the beginning of class, you must also briefly explain something about the video and something about yourself - in person.

Canvas Quiz of the Day (need daily password)

Most days, there will be a simple canvas quiz related to the lecture. You need a password to activate the quiz, which I will provide in class. These quizzes will count toward your class participation grade. The quiz is available only during class. You get full credit for class participation by completing half of the quizzes.

Click for today's quiz.

Lecture 10: Constraint Satisfaction

Announcements

  • Information Society Project Yale Law School. Weekly Events

    Administrivia

  • I have office hours Wednesdays from 4-6 p.m. via Zoom, meeting ID 459 434 2854.

  • The TF's office hours are posted on Ed Discussion.

  • I am available for lunch on Mondays at 1 pm in Morse.

  • Homework assignments: [Assignments]. hw3 is now available. The final paper is now linked in the assignments page as well. Note: I have amended the final paper assignment to permit you to argue against the premise.

  • A pdf of the third edition of AIMA is available on canvas in the files folder.

  • The great ideas in AI list now appears on the course index page.

    Asides from previous lectures

  • A Realistic Model of Rationality Slade (1994). Overview of the VOTE program. (We will return to this later.)

    AI in the news

  • On DeepSeek and Export Controls Dario Amodei, January 2025. [from Eva Dale]
  • Elon Musk-led consortium offers $100bn to take control of OpenAI Financial Times, 2/10/2025. [from Eva Dale]
  • Access to Financial Times
  • Access to Wall Street Journal from Yale.
  • Q and AI Bloomberg.
  • Access to Bloomberg.com from Yale.

    Lecture: Constraint Satisfaction, and Logic

  • decorators and memoization.
  • Google foobar challenge
  • Cryptarithmetic, aka, Verbal Arithmetic.
        T O
      + G O
     ======
      O U T  
    
    Variables: T, O, G, U
    Domain: {0,1,2,3,4,5,6,7,8,9}
    Constraints:
        AllDifferent(T,O,G,U)
        O + O = T
        T + G = U + 10
        int((T + G) / 10) = O
        (ignore carry from O + O)
    
    ## Here is the csp object for TWO + TWO = FOUR from csp.py:
    two_two_four =
        NaryCSP({'T': set(range(1, 10)), 'F': set(range(1, 10)),
                 'W': set(range(0, 10)), 'O': set(range(0, 10)), 'U': set(range(0, 10)), 'R': set(range(0, 10)),
                 'C1': set(range(0, 2)), 'C2': set(range(0, 2)), 'C3': set(range(0, 2))},
                [Constraint(('T', 'F', 'W', 'O', 'U', 'R'), all_diff_constraint),
                 Constraint(('O', 'R', 'C1'), lambda o, r, c1: o + o == r + 10 * c1),
                 Constraint(('W', 'U', 'C1', 'C2'), lambda w, u, c1, c2: c1 + w + w == u + 10 * c2),
                 Constraint(('T', 'O', 'C2', 'C3'), lambda t, o, c2, c3: c2 + t + t == o + 10 * c3),
                 Constraint(('F', 'C3'), eq)])    
      

    Four color theorem 1976 proof had 1,834 reducible configurations! First proof by computer.

    Social processes and proofs of theorems and programs, DeMillo, Lipton, and Perlis, 1979. CACM. Volume 22, Issue 5.

  • 2019 Scassellati Slides:

  • Min-conflicts algorithm used by Hubble Space Telescope

  • Jupyter notebooks:
  • AIMA Slides:
    [Home]