This course from Harvard University explores the concepts and algorithms at the foundation of modern artificial intelligence, diving into the ideas that give rise to technologies like large language models, game-playing engines, handwriting recognition, and machine translation. Through hands-on projects, students gain exposure to the theory behind graph search algorithms, classification, optimization, reinforcement learning, and other topics in artificial intelligence and machine learning as they incorporate them into their own Python programs.

This course has been updated for 2023 to include an in-depth section on large language models.

✏️ Course developed by Brian Yu for Harvard University. Learn more about Brian:

🔗 Course resources:

❤️ Try interactive AI courses we love, right in your browser: (Made possible by a grant from our friends at Scrimba)

⭐️ Course Contents ⭐️
⌨️ (00:00:00) Introuction
⌨️ (00:02:26) Search
⌨️ (01:51:55) Knowledge
⌨️ (03:39:39) Uncertainty
⌨️ (05:34:08) Optimization
⌨️ (07:18:52) Learning
⌨️ (09:04:41) Neural Networks
⌨️ (10:46:00) Language

🎉 Thanks to our Champion and Sponsor supporters:
👾 davthecoder
👾 jedi-or-sith
👾 南宮千影
👾 Agustín Kussrow
👾 Nattira Maneerat
👾 Heather Wcislo
👾 Serhiy Kalinets
👾 Justin Hual
👾 Otis Morgan

Learn to code for free and get a developer job:

Read hundreds of articles on programming:

source

div style="text-align: center;">
27 thoughts on “Harvard CS50’s Artificial Intelligence with Python – Full University Course”
  1. "We're hurtling at 'warp speed' towards a Ferengi society, driven by

    'faster, more efficient, more innovative.' But this mantra keeps us

    from criticizing, while silo thinking, carelessness, and complacency

    rule. Many engineers chose their profession because of Star Trek, yet

    the true intention of the series – based on science, exploration,

    empathy, intercultural understanding, and ethical responsibility –

    seems often misunderstood. Humans aren't designed for 'warp speed.'

    Instead of 'fast AI,' we need 'good AI' that reflects our values and

    naturally integrates into society. This only works if developers act

    ethically and make the protection of AI from manipulation and misuse a

    core principle. Otherwise, we'll end up with double standards

    everywhere – and even AI wouldn't know what criteria to follow. Let's

    live the vision of Star Trek: AI and humanity hand in hand for a

    better future!"

    Cosmic AI

  2. I would like to request your permission to add this video to my website as a learning resource for students. Along with the video, I plan to attach relevant exam questions to help reinforce the concepts. Upon completion of the course, students will also receive a certificate of completion.

    If you allow me, I will ensure the content is properly structured and professionally presented for free.

    Thank you for your consideration

  3. you are not able to teach something because you speak of your mind not for the students I bet no one at beginner level would not understand that boring style representation. Watch other ai teachers they do class to teach children you do class to read representation on the board

  4. import sys

    class Node():

    def __init__(self, state, parent, action):

    self.state = state

    self.parent = parent

    self.action = action

    class StackFrontier():

    def __init__(self):

    self.frontier = []

    def add(self, node):

    self.frontier.append(node)

    def contains_state(self, state):

    return any(node.state == state for node in self.frontier)

    def empty(self):

    return len(self.frontier) == 0

    def remove(self):

    if self.empty():

    raise Exception("empty frontier")

    else:

    node = self.frontier[-1]

    self.frontier = self.frontier[:-1]

    return node

    class QueueFrontier(StackFrontier):

    def remove(self):

    if self.empty():

    raise Exception("empty frontier")

    else:

    node = self.frontier[0]

    self.frontier = self.frontier[1:]

    return node

    class Maze:

    def __init__(self, filename):

    with open(filename) as f:

    contents = f.read()

    if contents.count("A") != 1:

    raise Exception("Maze must have exactly one start point 'A'.")

    if contents.count("B") != 1:

    raise Exception("Maze must have exactly one goal 'B'.")

    contents = contents.splitlines()

    self.height = len(contents)

    self.width = max(len(line) for line in contents)

    self.walls = []

    for i in range(self.height):

    row = []

    for j in range(self.width):

    try:

    if contents[i][j] == "A":

    self.start = (i, j)

    row.append(False)

    elif contents[i][j] == "B":

    self.goal = (i, j)

    row.append(False)

    elif contents[i][j] == " ":

    row.append(False)

    else:

    row.append(True)

    except IndexError:

    row.append(False)

    self.walls.append(row)

    self.solution = None

    def print(self):

    solution=self.solution[1] if self.solution is not None else None

    print()

    for i, row in enumerate(self.walls):

    for j,col in enumerate(row):

    if col:

    print(" ",end=" ")

    elif (i,j)== self.start:

    print("A",end=" ")

    elif (i,j)== self.goal:

    print("B",end=" ")

    elif solution is not None and(i,j) in solution:

    print("*",end="")

    else:

    print(" ",end=" ")

    print()

    print()

    def neighbours(self,state):

    row,col=state

    candidates=[

    ("up",(row-1,col)),

    ("down",(row+1,col)),

    ("left",(row,col-1)),

    ("right",(row,col+1)),

    ]

    result=[]

    for action,(r,c) in candidates:

    try:

    if not self.walls[r][c]:

    result.append((action,(r,c)))

    except IndexError:

    continue

    return result

    def solve(self):

    self.num_explored=0

    start=Node(state=self.start,parent=None, action=None)

    frontier=StackFrontier()

    frontier.add(start)

    self.explored=set()

    while True:

    if frontier.empty():

    raise Exception("no solution")

    node=frontier.remove()

    self.num_explored+=1;

    if node.state==self.goal:

    actions=[]

    cells=[]

    while node.parent is not None:

    actions.append(node.action)

    cells.append(node.state)

    node=node.parent

    actions.reverse()

    cells.reverse()

    self.solution=(actions,cells)

    return

    self.explored.add(node.state)

    for action,state in self.neighbours(node.state):

    if not frontier.contains_state(state) and state not in self.explored:

    child=Node(state=state,parent=node,action=action)

    frontier.add(child)

Leave a Reply

Your email address will not be published. Required fields are marked *