Welcome to the repository for CS50 AI Problem Set 0. This repository contains solutions for two main projects: Degrees of Separation and AI Tic-Tac-Toe.
This repository contains implementations for two projects from the CS50 AI course's Problem Set 0. These projects demonstrate the application of artificial intelligence techniques in solving real-world problems.
The Degrees of Separation project involves finding the shortest path between two actors via their co-stars. This is achieved using a breadth-first search (BFS) algorithm to traverse the graph of actors and movies.
- Utilizes BFS to find the shortest connection between actors.
- Demonstrates practical graph traversal techniques.
- Calculates "degrees of separation" between actors.
To run the Degrees of Separation project:
python degrees.py CS50-AI-ps0
Replace CS50-AI-ps0
with the path to the directory containing your data files.
The AI Tic-Tac-Toe project features a Tic-Tac-Toe game where the computer plays optimally using the Minimax algorithm. The AI ensures it never loses, providing a challenging and engaging gameplay experience.
- Implements the Minimax algorithm for optimal play.
- Ensures the AI never loses.
- Demonstrates AI decision-making processes.
To run the AI Tic-Tac-Toe game:
python tictactoe.py
Follow the on-screen instructions to play the game against the AI.