Knowledge - Lecture 1 - CS50's Introduction to Artificial Intelligence with Python 2020

Поделиться
HTML-код
  • Опубликовано: 11 ноя 2024

Комментарии • 122

  • @Randystephenson
    @Randystephenson 5 месяцев назад +13

    I just want to say that I'm enrolled in a Cybersecurity Bachelor's Degree at an online college, and the instructor is not doing a good job of explaining the propositional logic, inferences, etc. I've been behind for two weeks now because I'm so thoroughly confused by the textbook and the lectures, in fact many of the things they mentioned have been proven to be false. I knew about CS50, so I figured I'd check to see if they're covering the same thing I'm trying to learn and THEY ARE. The best part is TWO WEEKS of confusion have been relieved by just watching the relevant chapters in this video.
    Thank you guys so much for making this content available for free, online, and for making it accessible and easy to interpret. You are all excellent teachers! I wish Harvard Extension School had a Bachelors of Science in Cybersecurity, because if they did I'd switch to HES in a heartbeat. The quality of instruction that I've seen in CS50 makes me assume that HES must also have excellent instruction quality.

    • @tadasturonis
      @tadasturonis 5 месяцев назад

      Good luck on the degree!

  • @evachen8623
    @evachen8623 10 месяцев назад +7

    came back to this class 2 months later and many parts of it are still brain-storming

    • @thrillingclips7779
      @thrillingclips7779 9 месяцев назад

      me coming after 2 times revision also looks like more brain storming

  • @hunterwu94
    @hunterwu94 Год назад +30

    🎯 Key Takeaways for quick navigation:
    00:00 🤖 Introduction to the lecture on knowledge-based AI.
    00:57 🧠 Intelligence involves drawing conclusions and reasoning based on knowledge.
    01:52 📚 Example from Harry Potter illustrates reasoning based on knowledge.
    03:19 🤔 Logical reasoning uses information to reach conclusions.
    04:17 📖 Introduction to propositional logic and logical connectives (not, and, or, implication, biconditional).
    06:08 ➡️ Explanation of logical connectives using truth tables.
    08:30 ↔️ Explanation of implication and biconditional connectives.
    11:20 ❓ Clarification of implication truth table and handling of false P.
    14:38 🌍 Models, possible worlds, and truth values.
    16:31 🧠 Knowledge bases store true sentences in propositional logic.
    17:56 ➡️ Entailment: If alpha entails beta, alpha being true means beta must be true.
    18:26 ➡️ Example of entailment using if-then statements.
    19:23 🔁 Inference: Deriving new sentences from old ones using knowledge base and logical rules.
    34:57 🧠 Model checking algorithm is used to determine if a knowledge base entails a query. It involves enumerating all possible models and checking if the knowledge base and query hold true together.
    36:18 🤖 The model checking algorithm recursively checks all possible combinations of truth values for propositional symbols in the knowledge base to validate entailment.
    39:12 🌧️ Applying the model checking algorithm to a logical representation, such as in the example of determining rain in Harry's world, shows that it is possible to deduce conclusions using propositional logic.
    40:39 💡 Knowledge engineering involves transforming real-world problems into logical representations with propositional symbols, allowing computers to use inference algorithms to solve those problems.
    41:35 🔍 The game "Clue" involves solving a mystery by deducing the murderer, room, and weapon from a set of cards.
    42:04 🃏 Propositonal symbols represent possible elements in the mystery, like characters, rooms, and weapons.
    44:00 🧠 Inferences are made as cards are revealed. If a card is known or shown not to be in the envelope, it provides valuable information.
    45:28 💻 Implementing the reasoning process in Python involves creating symbols for each possibility and using logical rules.
    52:39 🏠 Combining logical rules and revealed cards can lead to deductions about the contents of the envelope.
    53:08 🔮 The AI model checking algorithm can draw conclusions based on the logical rules and given information.
    54:05 🧙‍♂️ The same logical approach can be used for solving puzzles like assigning people to houses based on given clues.
    59:22 📜 Knowledge about different variables and their possible states can be encoded using propositional logic, aiding in logical reasoning.
    01:00:20 🧙‍♂️ Knowledge Representation: Encoding logical statements about characters (e.g., Harry, Ron) using symbols.
    01:04:37 🎲 Inference Rules: Applying rules like modus ponens, and elimination, double negation elimination, implication elimination, and De Morgan's laws.
    01:15:08 🔍 Theorem Proving as Search: Treating theorem proving as a search problem, using initial state, actions (inference rules), transition model, goal test, and path cost function.
    01:17:32 🔗 Resolution: Using unit resolution rule to resolve conflicting clauses and deduce new knowledge.
    01:20:18 🧠 Resolution rule example: Combining clauses through logical inference, resolving conflicts between clauses with complementary literals.
    01:21:45 🧩 Generalization of resolution rule: If we know P or Q and also know not P or R, we resolve to get Q or R, a new clause.
    01:22:13 📖 Clauses: Disjunction of literals, where disjunction means connected with 'or'. Conjunction means connected with 'and'.
    01:23:08 🧮 Conjunctive Normal Form (CNF): Logical sentences in CNF are conjunctions of clauses connected by 'and', simplifying manipulation and reasoning.
    01:24:07 ⚙️ Converting to CNF: Eliminate biconditionals, implications, and move nots inwards using De Morgan's laws and distributive law.
    01:30:35 🧩 Resolution algorithm: Use resolution to check if knowledge base entails a query. Prove by contradiction, find complementary literals, generate new clauses.
    01:34:18 🔍 Example of resolution: Step-by-step resolution to prove entailment of a query using knowledge base and resolving complementary clauses.
    01:40:24 🧙‍♂️ First-order logic uses predicate symbols to express properties and relations, allowing statements like "Minerva is a person" and "Gryffindor is a house."
    01:41:46 🤝 First-order logic efficiently represents binary relations like "belongs to," reducing the need for excessive symbols and enabling statements like "Minerva belongs to Gryffindor."
    01:43:09 🔍 Universal quantification (∀) expresses statements true for all variable values, like "For all x, if x belongs to Gryffindor, then x does not belong to Hufflepuff."
    01:44:28 ∃ Existential quantification represents statements true for at least one variable value, such as "There exists an x where x is a house and Minerva belongs to x."
    01:45:55 ⚖️ Combining universal and existential quantification allows more complex statements like "For all people, there exists a house that the person belongs to."
    01:46:54 🧠 Logic systems like first-order logic help AI agents represent and reason with knowledge, aiding in drawing conclusions and making inferences based on encoded information.
    01:47:23 🤔 Future exploration includes handling uncertainty in AI systems by accounting for probabilities and extending intelligence further.
    Made with HARPA AI

    • @GG-uz8us
      @GG-uz8us 11 месяцев назад

      Very helpful, thank you!

    • @gauravrawat.7
      @gauravrawat.7 3 месяца назад

      That's the power of AI!

  • @yogendrapawar1738
    @yogendrapawar1738 Год назад +6

    The way he explains without fumbling

  • @msmnazemi
    @msmnazemi 4 года назад +18

    Brian and team, many thanks for sharing your knowledge with us and for your due diligence in covering this material.

  • @TJLSUDAD
    @TJLSUDAD Год назад +13

    WOW!!! I'm 51 and excited about learning how to build powerful AI agents to help eliminate homelessness in New Orleans through education. Thank you for using your life to help me understand something this complexed. Much Love from New Orleans and LET'S GEAUX!

  • @AlokVerma-kw5pt
    @AlokVerma-kw5pt 4 года назад +27

    World class lecture Thank you Bryan and team

  • @worldboy9684
    @worldboy9684 Год назад +10

    Wow, this is amazing... What a masterpiece of a lecture. I'm equally informed and inspired to teach!

  • @GenZ_01_
    @GenZ_01_ 2 месяца назад

    Brian you’re great bro.
    Thanks cs50 team !
    With each lecture I’m getting more passionate about cs

  • @marzenah123
    @marzenah123 3 года назад +16

    Thank you Prof. Yu! 🙏 Your lectures are amazing. 👏

  • @krox477
    @krox477 Год назад +1

    This field is changing so fast

  • @viforchatgptxx
    @viforchatgptxx 29 дней назад

    the intensity of knowledge presented in this lecture is so intense the matrix tries to absorb you through the video inferencing sometimes

  • @TheRamstoss
    @TheRamstoss 4 года назад +104

    Brian your throat is dry! Please take a sip of water, for us. We can wait :) Thanks for teaching us!

    • @aviroxi
      @aviroxi 3 года назад +2

      I was really thinking about that.

  • @ishrarchowdhury4850
    @ishrarchowdhury4850 Год назад +1

    This is GOLD content.

  • @AI-Neurons
    @AI-Neurons 10 месяцев назад

    Really appreciate the extraordinary work of the team behind this to create this amazing presentation. It made the concepts very eazy to understand with well explained practical examples. Many Thanks!🙌

  • @viforchatgptxx
    @viforchatgptxx 29 дней назад

    this is mind blowing, thank you so much Brian and the team

    • @Quasar_Quest
      @Quasar_Quest 25 дней назад

      What is your plan to learn artificial intelligence?

    • @viforchatgptxx
      @viforchatgptxx 23 дня назад

      @@Quasar_Quest first to finish this course and then start deep reinforcement learning course on huggingface

  • @meyubaraj
    @meyubaraj 4 года назад +8

    Thank you so much for this class.

  • @Ixtinkt
    @Ixtinkt 6 месяцев назад +1

    So many topics inside one lecture :) If this is the way how students are taught in Harvard once they are graduated they should be able to calculate a route from Earth to Mars with a piece of paper and a pen :)

  • @nabeelriaz8154
    @nabeelriaz8154 11 месяцев назад

    Thank you CS50 team. Love the engaging presentation.

  • @KashiISC2
    @KashiISC2 11 месяцев назад +2

    Such a beautiful lecture....
    Really, Waiting to complete this AI course!!!!!!

  • @venusliong
    @venusliong 11 месяцев назад +2

    "Every person belongs to a house" -> What about homeless people?
    Joke aside, this lesson reminds me a lot of the set theory class in pure math back in high school but introduces new terminologies. Great explanation from Brian!

  • @ai_enthusiast86
    @ai_enthusiast86 2 месяца назад +1

    amazing course

  • @evachen8623
    @evachen8623 Год назад +1

    This class is so much fun~

  • @aviroxi
    @aviroxi 3 года назад +4

    Thank you so much for this amazing lecture Brian

  • @mohsinzaki2711
    @mohsinzaki2711 8 месяцев назад

    Simply of the best

  • @tensfantasy2384
    @tensfantasy2384 3 года назад +2

    Salute You Master Brian🙏🙏🙏🙏🙏

  • @FarisGhazi
    @FarisGhazi 4 месяца назад +1

    28:22 I think the logic module is not available for public or may be I am not able to find it online, is there any online source for this module ?

  • @raghavendrakaushik4871
    @raghavendrakaushik4871 4 года назад +5

    Why does it sound like First-order logic uses the paradigm of Object-oriented programming and Propositional Logic uses the paradigm of Functional Programming?

    • @patmull1
      @patmull1 Год назад +1

      More like both propositional and first-order logic are part of what's called logic programming (e.g. Prolog). OOP can express properties of an object existing in some universe like first-order logic, however, OOP is a different paradigm thanks to its ability to express the hierarchical system of objects (inheritance, polymorphism...). It is a rather opposite paradigm to both propositional and first-order logic. There is a descriptive logic thought that is basically equivalent to ontologies (e.g. OWL) and that is very close to OOP and there is a possibility to use descriptive logic to model OOP.

  • @GG-uz8us
    @GG-uz8us 11 месяцев назад

    Mathematics is indeed a fundamental cornerstone of artificial intelligence (AI).

  • @ManuelBarros64
    @ManuelBarros64 2 года назад +2

    Great explanation. Thank you very much.

  • @ibiyemisamuel6082
    @ibiyemisamuel6082 Год назад +1

    Please how do I get access to those python files?

  • @abdelhakimkhabir
    @abdelhakimkhabir 10 месяцев назад

    Question:
    Should i program the inference by resolution?

  • @johnmayfield7662
    @johnmayfield7662 2 месяца назад

    Great lecture Prof

  • @srourganoush5941
    @srourganoush5941 2 года назад +1

    Thank you for your great explanation, God bless you

  • @alejandraossajimenez858
    @alejandraossajimenez858 Год назад +1

    could anyone be so kind as to share the name of the repository where the code for this class is? thank you!

  • @famouspeople8611
    @famouspeople8611 10 месяцев назад

    Appreciate everyword u said

  • @holderstown643
    @holderstown643 Год назад +1

    I love Brian

  • @sharfaraazs9367
    @sharfaraazs9367 3 года назад +2

    How many of u here.
    From edx... Platform...
    Where the video is not working properly
    .. Plzz mention...

  • @ijustawannaprivicie8031
    @ijustawannaprivicie8031 10 месяцев назад +1

    What's the diference between "implication elimination" vs "Material implication (as described on wikipedia)

  • @sanjitrao2761
    @sanjitrao2761 4 года назад +2

    So just to clarify, for De Morgan's Law, it works when either one or both of the statements are not true, i.e., that either Harry failed the test of Ron did or both of them did, while the reverse of the law only works when BOTH of them did not pass the test?

    • @patmull1
      @patmull1 Год назад

      What do you mean by the "reverse of the law"? There is a biconditional relationship (equivalence) for a NOT(A^B) NOT(A)vNOT(B) and also for NOT(AvB) NOT(A)^NOT(B), so both of the things hold true. It means:
      If we suppose that A = "Harry passed" and B = "Ron passed"
      De-Morgan is saying that:
      "Harry and Ron (both) failed the test is equivalent to saying neither Harry passed the test nor Ron passed the test."
      And the relationships go both directions, so:
      "Neither Harry passed the test, neither Ron passed the test is equivalent to saying: Harry and Ron (both) failed the test."
      The second one is saying:
      "It is not true that Harry or Ron passed the test (neither of Harry or Ron passed the test) is equivalent to saying: Harry did not pass the test and also Ron did not pass the test."
      And also:
      "Harry did not pass the test and also Ron did not pass the test is equivalent to saying: It is not true that Harry or Ron passed the test (neither of Harry or Ron passed the test)."

  • @sumukha-infotech
    @sumukha-infotech 3 года назад +1

    Awesome Thank you for the video

  • @pain._amegakure45
    @pain._amegakure45 2 месяца назад

    where to do model check by writing a code

  • @idkidkidk3333
    @idkidkidk3333 4 года назад +2

    Thank you so much !!!

  • @FriskDreemurr66669
    @FriskDreemurr66669 Год назад

    underrated

  • @paros-content
    @paros-content 11 месяцев назад

    This resembles a lot of Rule Based programming

  • @roy-ub7sy
    @roy-ub7sy 4 года назад +1

    Super interesting! thanks brian!

  • @1one1yh1tchh1ker
    @1one1yh1tchh1ker Год назад

    How can ı access to this code to look again?

  • @johnpasir3207
    @johnpasir3207 7 месяцев назад

    very good!

  • @SahaabMansha
    @SahaabMansha 4 месяца назад

    from where can we get the code

  • @abdelhakimkhabir
    @abdelhakimkhabir 10 месяцев назад

    Do someone program the inference by resolution?

  • @krishnagupta1735
    @krishnagupta1735 5 месяцев назад

    Where can I get code?

  • @akierowan9143
    @akierowan9143 2 года назад +10

    So computer science is basically butchering the English language so that complex ideas can be simplified enough for computers to solve them for us 😂😂😂

    • @patmull1
      @patmull1 Год назад

      Basically TRUE 😂

  • @mohammed545
    @mohammed545 5 месяцев назад

    cool !

  • @vivekrai1974
    @vivekrai1974 Год назад

    17:58 Why don't we use implies (symbol ->) instead of entailment? Don't they mean the same?

    • @jamil5522
      @jamil5522 Год назад +1

      I like to think about it in this way:
      An entailment is like saying: if bob is a poodle, then bob is a dog. It's like a fact derived from another sentence.
      An implication is like saying: if it is raining, then bob will stay indoors. It's not based on anything, it's just a claim made.

  • @rayenlahgui2292
    @rayenlahgui2292 9 месяцев назад

    please where can i find his codes ?

  • @Lolwutdesu9000
    @Lolwutdesu9000 Месяц назад

    The entire first half of the lecture could be reduced to: How to check for when something could be true? Just AND all your propositions and statements, iterate through all possibilities and check where the KB is true. That's literally it.

  • @MrSaladdin
    @MrSaladdin 6 месяцев назад

    In 36:47 why we return true if the knowledge is not true, shouldn’t we return false?

    • @shalombharathi
      @shalombharathi 2 месяца назад

      It only returns True when knowledge base is already true, remember that we can only return once in an if statement, so the code is same as
      If (knowledgeBase):
      Return True
      Else:
      Return False

  • @aiof21
    @aiof21 2 года назад

    Great stuff, easy to understand. Brian seems to have a hard time swallowing...

  • @clovemao329
    @clovemao329 Год назад

    wow cs50 now with AI? holy, amazing water

  • @taruncharan4262
    @taruncharan4262 4 года назад +1

    why this whole series is unlisted ???

    • @BT23MA005
      @BT23MA005 8 месяцев назад

      This is unlisted and you commented that means you got link and we got access now in 2024😅😅

  • @FizaMemon-z3i
    @FizaMemon-z3i 8 месяцев назад

    Is this course worth to take as a beginner?

  • @martinvardanyan8889
    @martinvardanyan8889 4 года назад

    Where i can will see this and past lections code? @CS50

    • @preetsutariya3332
      @preetsutariya3332 4 года назад +1

      ruclips.net/p/PLhQjrBD2T382Nz7z1AEXmioc27axa19Kv

  • @as_if
    @as_if 8 месяцев назад +1

    1:21:20 harry is sleeping with hermione in the library 💀

    • @explorer_1113
      @explorer_1113 8 месяцев назад +2

      💀💀💀take your mind out of the gutter 😆😆

  • @evachen8623
    @evachen8623 Год назад +1

    real brain storming but so much fin as well

  • @HaiderAli-lr9fw
    @HaiderAli-lr9fw 3 года назад

    I didn't understood the KB output how it came at 25:42 . Can anybody explain.

    • @rafaelrohr1137
      @rafaelrohr1137 2 года назад

      Still want some help?

    • @HaiderAli-lr9fw
      @HaiderAli-lr9fw 2 года назад

      @@rafaelrohr1137 yeah

    • @vanderferreira3094
      @vanderferreira3094 Год назад

      still want some help?

    • @ameer4955
      @ameer4955 Год назад

      Here KB is (P ∧ ¬Q) → R ∧ P ∧ ¬Q. Now try to understand it by making truth table

    • @EatDrinkCook
      @EatDrinkCook 9 месяцев назад +1

      I applied this (P ∧ ¬Q) → R to online calculators and it give me absolutely oposite results: 7 true and only 1 false.

  • @patmull1
    @patmull1 Год назад +4

    "Every person belongs to a house." Moments of silence for all the homeless people.

  • @kietngoquang7190
    @kietngoquang7190 11 месяцев назад

    woowwww

  • @rezamaleki5015
    @rezamaleki5015 10 месяцев назад

    where are the codes?

  • @not_amanullah
    @not_amanullah 7 месяцев назад

  • @explorer_1113
    @explorer_1113 8 месяцев назад

    Someone really loves Harry Potter, but, who wouldn't?

  • @SarahCornnor
    @SarahCornnor Год назад

    Good morning. Thanks. For sharring. CassieKassuim

  • @gayathriv3539
    @gayathriv3539 8 месяцев назад

    This guy reminds me of Iain armitage

  • @SphereofTime
    @SphereofTime Год назад

    1:24:21

  • @bombarded_human
    @bombarded_human 3 года назад +2

    Hi

  • @rafaelcarvalho2040
    @rafaelcarvalho2040 4 года назад +2

    33:29

  • @sanskarkhandelwal
    @sanskarkhandelwal 10 месяцев назад +2

    So basically I have to read Harry Potter before studying artificial intelligence 😅

  • @ycsea
    @ycsea 4 года назад

    we have p and we have not p.....ed

  • @SphereofTime
    @SphereofTime Год назад

    20:01

  • @MCInferno
    @MCInferno 8 месяцев назад

    E

  • @triangle4studios
    @triangle4studios 3 года назад +3

    Hello CS50!
    Brian and David, I want to offer a piece of constructive criticism. As much as I value your information, and realize you are an Ivy League school, you need to approach object oriented programming in a more object oriented way.
    It is implied, that if we are implementing AI, we are using OOP. Neural Networks are too complex, and KBs too large to not use it.
    And so with that, the implication is that no matter who watches this series and/or takes the course, they will be using Object oriented programming.
    With that clarification out of the way, you are NOT approaching this lesson using OOP. One perfect example, is @24:50 when you offer a real world example with no variables that can be logically associated with what you are teaching.
    It makes it much harder to grasp the concepts, and thus, makes the topic less accessible to the general community. IF the purpose of Edx and Cs50 is to bring education to the masses, and make some money in the process, this approach will close the doors to those of us who depend on OOP variables to grasp the concepts.
    TLDR:
    Simply put. Next year, please replace the variables with words that help us more intuitively comprehend the subject you are presenting. Instead of using R, use response(R). Instead of using Q use Question(Q), Instead of using P use propositionalLogic(P). and Implies(implies Symbol here).
    I know you can justify it by saying that you are Harvard and have a level of standard to uphold. However to truly teach the world, you need to reach them on a level everyone can understand, and thus that standard is really falling short here.
    More understanding = more money!
    Love you guys, you rock, so long and thanks for all the fishes!

    • @DuarteMolha
      @DuarteMolha 3 года назад +14

      Apologies but this is completely wrong. Brian is simply explaining normal statements not even using pseudo code
      Why would he make it more complex than it needs to be to satisfy OOP ?

    • @triangle4studios
      @triangle4studios 3 года назад

      @@DuarteMolha I stand by what I said.

    • @DuarteMolha
      @DuarteMolha 3 года назад +2

      @@triangle4studios as is your right to do so.

    • @daophung3140
      @daophung3140 3 года назад +8

      okay why did u assume R stands for Response, Q stands for Questions v..v it didn't even make sense, don't u understand the concept in this lesson?

    • @minchulkim87
      @minchulkim87 3 года назад +12

      1. He does use OOP features of Python during the coding parts of the lecture.
      2. Variable naming conventions have nothing to do with OOP.
      3. P, Q, R do not stand for anything. They are like x, y, z in algebra. P, Q, R are just commonly used in logic for generic statements.
      4. Ivy League or not, this lecture is the most clear and concise explanations of the topic in the most introductory manner I have seen thus far. Yes there are some symbols and formalisms being introduced here that could confuse first-timers. But this is an introduction to artificial intelligence course. It is a bit like teaching basic algebra. At some point, the teacher needs to introduce 'x'. You can't keep writing "number of apples" - the whole point is to abstractify. What the statement are that are represented by P (Q and R) are ultimately trivial and not important to the logic. Brian balanced that introduction of these symbols by parsing what was written with symbols with the example equivalent English statements. Good thing about this being a recording is that you can replay bits as many times as needed to let the information sink in (the opposite is also possible by skipping or speeding up).
      5. Whilst programming paradigm is a matter of preference, the programming community (and the industry) is slowly moving away from OOP (at least from strict forms OOP). It stands to reason that students should seek to be proficient in multi-paradigm programming style - maybe even strive for a bit more functional style where appropriate.

  • @billpapamokos8054
    @billpapamokos8054 2 месяца назад

    if I have some questions and I want to speak with Brian can someone give me his email?

  • @SphereofTime
    @SphereofTime Год назад

    29:35