Skip to content

CHZarles/cs50-ai

Repository files navigation

Intro of this course

Welcome

This course explores the concepts and algorithms at the foundation of modern artificial intelligence, diving into the ideas that give rise to technologies like game-playing engines, handwriting recognition, and machine translation. Through hands-on projects, students gain exposure to the theory behind graph search algorithms, classification, optimization, machine learning, large language models, and other topics in artificial intelligence as they incorporate them into their own Python programs. By course’s end, students emerge with experience in libraries for machine learning as well as knowledge of artificial intelligence principles that enable them to design intelligent systems of their own.

Prerequisites

CS50x or at least one year of experience with Python.

Watch an introduction

How to Take this Course

Even if you are not a student at Harvard, you are welcome to “take” this course for free via this OpenCourseWare by working your way through the course’s seven weeks of material. If you’d like to submit the course’s seven projects for feedback, be sure to create an edX account, if you haven’t already. Ask questions along the way via any of the course’s communities!

How to Teach this Course

If you are a teacher, you are welcome to adopt or adapt these materials for your own course, per the license.

Search

reference

knowledge

Probability

optimization

  • source url

  • Core conception

    • Local search
      • Hill climbing
        • Simulated Annealing
    • Linear Programming
    • Constraint Satisfaction
      • terms of constraint
        • unary constraint
          • Node Consistency
        • binary constraint
          • Arc Consistency
        • Hard / soft constraint
      • revise algorithm
      • arc3 algorithm
      • backtrack search algorithm

Machine learning

  • source url

  • Core conception

    • Supervised learning
      • learn a function to map input to output
      • relative task
        • classification
          • nearest-neighbour classification
          • k-nearest-neighbour classification
          • perceptron learning rule
            • define , weight vector / input vector
              • W dot product X -> Output
            • update a formulation
              • update each weight given data point, (x , y)
                • ie. wi = wi + α(actual_value - estimate) * xi
                  • α is learning rate , a number which we choose
            • end up with a threshold function
          • Support Vector Machines
            • effect: maximum margin separator
              • boundary that maximizes the distance between any of the data points
              • can represent decision boundaries with more than two dimensions
        • regression
          • learning a function mapping an input point to a continuous value
      • Evaluating Hypotheses
        • loss function : expresses how poorly our hypothesis performs
          • 0-1 loss function
          • L1 loss function
          • L2 loss function
        • overfitting : a model that fits too closely to particular data set
          • define cost function, cost(h) = loss(h) + complexity(h)
          • avoid overfitting:
            • regularization : penalizing hypothesis that are more complex to favor simpler, more general Hypotheses
            • holdout cross-validation
              • splitting data into a training set and test set
    • Reinforcement learning
      • define: given a set of rewards or punishments, learn what actions to take the future.
      • Markov Decision Process
        • Set of states S
        • Set of actions Actions(s)
        • Transition model P(s'|s,a)
        • Reward function R(s, a,'s)
      • Q-learning
        • Greedy Decision-Making
        • Explore vs. Exploit
          • ε-Greedy
    • Unsupervised learning
      • given input data without any addtonal feedback , learn patterns
      • relative task
        • Clustering
          • k-means clustering

Neural Networks

  • source url

  • Core conception

    • Artificial Neural Networks
      • Model mathematical function from inputs to outputs based on the structure and parameters of the network
      • Allows for learning the network's based on data
      • ie. h(x1, x2) = w0 + w1.x1 + w2.x2
      • activation function -if g is a activation function , then h(x1, x2) = g(w0 + w1.x1 + w2.x2) [ it is a network that have two inputs , one output ]
    • Gradient descent
      • updates weight, minimize the amount of loss
    • Mini-Batch Grandient descent
    • Perceptron
      • Only capable of learning linearly separable decision boundary
    • Multilayer neural network
      • back-propagation ( algorithm for train Multilayer network )
      • dropput ( temporay remove some units prevent overfitting )
    • Image convolution
      • max-pooling
      • artificial intelligence framework
    • recurrent neural network
  • Quiz (./neural_networks/quiz_5.md)

Language

  • source url

  • Core conception

    • language general
      • Syntax of language
    • sentiment
      • bag-word-model
        • Markov chain, BayesBaseClassfier
        • smoothing
      • word representation
        • convert: a word -> a vector
        • a word -> distribution representation of vector
      • word2vec model
        • learn corpus, word -> a sequence of probability distribution
        • calc distance(words["book"], words["food"])
      • liken Translation problem
        • Input is not fixed -> use RNN (outmoded)
        • Translate a sequence tp another sequence
          • input -> encoder -> decoder -> output
      • Attention
        • give words attention scores
      • Transformers
        • input parallelize
        • self-Attention

About

cs50ai 课程作业记录

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published