🤖

Exploring AI and CS50 Basics

Mar 15, 2025

Lecture Notes: Introduction to Artificial Intelligence and CS50

Lecturer: David Malan

Event: Family Weekend at Harvard College


Introduction

  • Purpose: Family-friendly lecture on Artificial Intelligence (AI) and an introduction to CS50.
  • Tradition: Introduction of the rubber duck debugging method where students talk to a rubber duck to solve problems by verbalizing them.
  • Virtual Rubber Duck: Implemented in software form, now uses AI to respond in English since 2023.
  • Goal: To give a taste of AI and CS50, and to understand how AI works.

Generative AI

  • Rapid Improvement: Exponential improvements in recent months.
  • Deepfake Example: Introduction with a deepfake video of Tom Cruise.
  • Focus: On how AI generates content, including text, images, video.

AI in Practice

  • Interactive Examples: New York Times image and text discernment examples to identify AI-generated content.
  • Discussion: Challenges in distinguishing AI-generated from human-created content.

AI in CS50

  • Use in Education: AI is integrated into CS50 to assist with teaching, not give direct answers.
  • Policy: Students discouraged from using external AI tools like ChatGPT for direct answers.
  • AI Infrastructure: Utilizes OpenAI's APIs. System prompts are set to guide AI responses to be educational.

Building AI

  • Live Coding Example: Simple Python chatbot that integrates OpenAI to answer questions.
  • AI Architecture: Explanation of how CS50's AI infrastructure operates using APIs and a local vector database.

AI and Machine Learning Concepts

  • Decision Trees: Used for game strategies like Breakout and Tic-Tac-Toe.
  • Minimax Algorithm: Explained with Tic-Tac-Toe, seeks to minimize/maximize outcomes.
  • Reinforcement Learning: Demonstrated with pancake flipping, where feedback is used to improve AI behavior.

AI and Game Strategy

  • Examples: Breakout AI using reinforcement learning to find optimal strategies.
  • Exploration vs. Exploitation: Balancing known strategies with exploring new possibilities to find better solutions.

Advanced AI Learning

  • Deep Learning with Neural Networks: Discussion on how these models are inspired by biological neurons to process inputs and produce outputs.
  • Large Language Models: How these models process vast amounts of data to predict and generate human-like text.

Challenges and Future of AI

  • Hallucinations in AI: AI sometimes generates incorrect outputs confidently.
  • Ethical Considerations: Importance of understanding AI's limits and misinformation.

Conclusion

  • CS50's Approach: Emphasizing educational benefits of AI without compromising learning integrity.
  • Invitation: Parents and families are welcome to explore CS50 and its use of AI further.

Note: The lecture included audience interactions and live coding demonstrations to enhance understanding of AI concepts.