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

  Рет қаралды 206,901

CS50

CS50

Күн бұрын

Пікірлер: 116
@Randystephenson
@Randystephenson 4 ай бұрын
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 3 ай бұрын
Good luck on the degree!
@evachen8623
@evachen8623 9 ай бұрын
came back to this class 2 months later and many parts of it are still brain-storming
@thrillingclips7779
@thrillingclips7779 8 ай бұрын
me coming after 2 times revision also looks like more brain storming
@worldboy9684
@worldboy9684 Жыл бұрын
Wow, this is amazing... What a masterpiece of a lecture. I'm equally informed and inspired to teach!
@TheRamstoss
@TheRamstoss 4 жыл бұрын
Brian your throat is dry! Please take a sip of water, for us. We can wait :) Thanks for teaching us!
@aviroxi
@aviroxi 2 жыл бұрын
I was really thinking about that.
@AI-Neurons
@AI-Neurons 8 ай бұрын
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!🙌
@meyubaraj
@meyubaraj 4 жыл бұрын
Thank you so much for this class.
@johnmayfield7662
@johnmayfield7662 Ай бұрын
Great lecture Prof
@FarisGhazi
@FarisGhazi 2 ай бұрын
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 ?
@nabeelriaz8154
@nabeelriaz8154 9 ай бұрын
Thank you CS50 team. Love the engaging presentation.
@raghavendrakaushik4871
@raghavendrakaushik4871 4 жыл бұрын
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 Жыл бұрын
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 10 ай бұрын
Mathematics is indeed a fundamental cornerstone of artificial intelligence (AI).
@sanjitrao2761
@sanjitrao2761 3 жыл бұрын
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)."
@famouspeople8611
@famouspeople8611 8 ай бұрын
Appreciate everyword u said
@aiof21
@aiof21 2 жыл бұрын
Great stuff, easy to understand. Brian seems to have a hard time swallowing...
@ibiyemisamuel6082
@ibiyemisamuel6082 Жыл бұрын
Please how do I get access to those python files?
@1one1yh1tchh1ker
@1one1yh1tchh1ker Жыл бұрын
How can ı access to this code to look again?
@not_amanullah
@not_amanullah 5 ай бұрын
@rafaelcarvalho2040
@rafaelcarvalho2040 4 жыл бұрын
33:29
@bombarded_human
@bombarded_human 3 жыл бұрын
Hi
@bonjour7209
@bonjour7209 3 жыл бұрын
hi
@rayenlahgui2292
@rayenlahgui2292 8 ай бұрын
please where can i find his codes ?
@BT23MA005
@BT23MA005 6 ай бұрын
Hi
@martinvardanyan8889
@martinvardanyan8889 4 жыл бұрын
Where i can will see this and past lections code? @CS50
@preetsutariya3332
@preetsutariya3332 4 жыл бұрын
kzbin.info/aero/PLhQjrBD2T382Nz7z1AEXmioc27axa19Kv
@forheuristiclifeksh7836
@forheuristiclifeksh7836 10 ай бұрын
20:01
@rezamaleki5015
@rezamaleki5015 9 ай бұрын
where are the codes?
@unknownguywholovespizza
@unknownguywholovespizza 7 ай бұрын
Edx website or app
@gayathriv3539
@gayathriv3539 7 ай бұрын
​@@unknownguywholovespizzaIt's not there
@triangle4studios
@triangle4studios 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 жыл бұрын
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 жыл бұрын
@@triangle4studios as is your right to do so.
@daophung3140
@daophung3140 3 жыл бұрын
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 жыл бұрын
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.
@hunterwu94
@hunterwu94 Жыл бұрын
🎯 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 10 ай бұрын
Very helpful, thank you!
@gauravrawat.7
@gauravrawat.7 2 ай бұрын
That's the power of AI!
@akierowan9143
@akierowan9143 2 жыл бұрын
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 😂
@AlokVerma-kw5pt
@AlokVerma-kw5pt 3 жыл бұрын
World class lecture Thank you Bryan and team
@msmnazemi
@msmnazemi 4 жыл бұрын
Brian and team, many thanks for sharing your knowledge with us and for your due diligence in covering this material.
@marzenah123
@marzenah123 3 жыл бұрын
Thank you Prof. Yu! 🙏 Your lectures are amazing. 👏
@as_if
@as_if 7 ай бұрын
1:21:20 harry is sleeping with hermione in the library 💀
@explorer_1113
@explorer_1113 7 ай бұрын
💀💀💀take your mind out of the gutter 😆😆
@yogendrapawar1738
@yogendrapawar1738 Жыл бұрын
The way he explains without fumbling
@patmull1
@patmull1 Жыл бұрын
"Every person belongs to a house." Moments of silence for all the homeless people.
@quantummath-1b2a
@quantummath-1b2a 2 ай бұрын
I have a shorter code for the Harry,Dumbledore and Hadrid logic: rain,hagrid,dumbledore = None,None,True if(hagrid): rain = False if(dumbledore): rain = True if(hagrid and dumbledore)or(not(hagrid) and not(dumbledore)): rain = "error" print(rain)
@ai_enthusiast86
@ai_enthusiast86 Ай бұрын
amazing course
@sharfaraazs9367
@sharfaraazs9367 3 жыл бұрын
How many of u here. From edx... Platform... Where the video is not working properly .. Plzz mention...
@Ixtinkt
@Ixtinkt 4 ай бұрын
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 :)
@KashiISC2
@KashiISC2 9 ай бұрын
Such a beautiful lecture.... Really, Waiting to complete this AI course!!!!!!
@aviroxi
@aviroxi 2 жыл бұрын
Thank you so much for this amazing lecture Brian
@explorer_1113
@explorer_1113 7 ай бұрын
Someone really loves Harry Potter, but, who wouldn't?
@alejandraossajimenez858
@alejandraossajimenez858 Жыл бұрын
could anyone be so kind as to share the name of the repository where the code for this class is? thank you!
@pain._amegakure45
@pain._amegakure45 25 күн бұрын
where to do model check by writing a code
@tensfantasy2384
@tensfantasy2384 3 жыл бұрын
Salute You Master Brian🙏🙏🙏🙏🙏
@ijustawannaprivicie8031
@ijustawannaprivicie8031 9 ай бұрын
What's the diference between "implication elimination" vs "Material implication (as described on wikipedia)
@darraghbuckley2184
@darraghbuckley2184 2 ай бұрын
Nothing same thing
@GenZ_01_
@GenZ_01_ Ай бұрын
Brian you’re great bro. Thanks cs50 team ! With each lecture I’m getting more passionate about cs
@evachen8623
@evachen8623 11 ай бұрын
real brain storming but so much fin as well
@ManuelBarros64
@ManuelBarros64 2 жыл бұрын
Great explanation. Thank you very much.
@TJLSUDAD
@TJLSUDAD Жыл бұрын
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!
@alejandraossajimenez858
@alejandraossajimenez858 Жыл бұрын
Love it! I hope you succeed!
@satish1012
@satish1012 Жыл бұрын
I am also nearly 51 ..
@peep_show8037
@peep_show8037 3 ай бұрын
Stop the drug flow and put them to work 🤷‍♂️
@sanskarkhandelwal
@sanskarkhandelwal 9 ай бұрын
So basically I have to read Harry Potter before studying artificial intelligence 😅
@abdelhakimkhabir
@abdelhakimkhabir 8 ай бұрын
Question: Should i program the inference by resolution?
@sumukha-infotech
@sumukha-infotech 3 жыл бұрын
Awesome Thank you for the video
@idkidkidk3333
@idkidkidk3333 4 жыл бұрын
Thank you so much !!!
@srourganoush5941
@srourganoush5941 2 жыл бұрын
Thank you for your great explanation, God bless you
@venusliong
@venusliong 10 ай бұрын
"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!
@ishrarchowdhury4850
@ishrarchowdhury4850 11 ай бұрын
This is GOLD content.
@krox477
@krox477 Жыл бұрын
This field is changing so fast
@evachen8623
@evachen8623 11 ай бұрын
This class is so much fun~
@MrSaladdin
@MrSaladdin 4 ай бұрын
In 36:47 why we return true if the knowledge is not true, shouldn’t we return false?
@shalombharathi
@shalombharathi Ай бұрын
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
@SarahCornnor
@SarahCornnor 11 ай бұрын
Good morning. Thanks. For sharring. CassieKassuim
@holderstown643
@holderstown643 Жыл бұрын
I love Brian
@paramitabanerjee6205
@paramitabanerjee6205 10 ай бұрын
This resembles a lot of Rule Based programming
@abdelhakimkhabir
@abdelhakimkhabir 8 ай бұрын
Do someone program the inference by resolution?
@vivekrai1974
@vivekrai1974 11 ай бұрын
17:58 Why don't we use implies (symbol ->) instead of entailment? Don't they mean the same?
@jamil5522
@jamil5522 11 ай бұрын
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.
@clovemao329
@clovemao329 Жыл бұрын
wow cs50 now with AI? holy, amazing water
@gayathriv3539
@gayathriv3539 7 ай бұрын
This guy reminds me of Iain armitage
@SahaabMansha
@SahaabMansha 3 ай бұрын
from where can we get the code
@billpapamokos8054
@billpapamokos8054 Ай бұрын
if I have some questions and I want to speak with Brian can someone give me his email?
@taruncharan4262
@taruncharan4262 4 жыл бұрын
why this whole series is unlisted ???
@BT23MA005
@BT23MA005 7 ай бұрын
This is unlisted and you commented that means you got link and we got access now in 2024😅😅
@krishnagupta1735
@krishnagupta1735 4 ай бұрын
Where can I get code?
@forheuristiclifeksh7836
@forheuristiclifeksh7836 10 ай бұрын
1:24:21
@forheuristiclifeksh7836
@forheuristiclifeksh7836 10 ай бұрын
29:35
@mohsinzaki2711
@mohsinzaki2711 6 ай бұрын
Simply of the best
@FizaMemon-z3i
@FizaMemon-z3i 7 ай бұрын
Is this course worth to take as a beginner?
@richard_shaju
@richard_shaju 5 ай бұрын
Yes
@MCInferno
@MCInferno 7 ай бұрын
E
@mohammed545
@mohammed545 4 ай бұрын
cool !
@johnpasir3207
@johnpasir3207 6 ай бұрын
very good!
@FriskDreemurr66669
@FriskDreemurr66669 11 ай бұрын
underrated
@ycsea
@ycsea 4 жыл бұрын
we have p and we have not p.....ed
@kietngoquang7190
@kietngoquang7190 9 ай бұрын
woowwww
@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 8 ай бұрын
I applied this (P ∧ ¬Q) → R to online calculators and it give me absolutely oposite results: 7 true and only 1 false.
@roy-ub7sy
@roy-ub7sy 4 жыл бұрын
Super interesting! thanks brian!
Reacting to Controversial Opinions of Software Engineers
9:18
Fireship
Рет қаралды 2,1 МЛН
Ozoda - Lada (Official Music Video)
06:07
Ozoda
Рет қаралды 13 МЛН
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 36 МЛН
Computer Scientist Answers Computer Questions From Twitter
14:27
Genius Machine Learning Advice for 11 Minutes Straight
11:00
Data Sensei
Рет қаралды 51 М.
CS50AI (Full Review 2024) - Best Artificial Intelligence Course?
5:16
Daniel | Tech & Data
Рет қаралды 23 М.
ML Was Hard Until I Learned These 5 Secrets!
13:11
Boris Meinardus
Рет қаралды 308 М.
GPT-o1: The Best Model I've Ever Tested 🍓 I Need New Tests!
10:58
Matthew Berman
Рет қаралды 247 М.
5 Good Python Habits
17:35
Indently
Рет қаралды 541 М.
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 485 М.
Ozoda - Lada (Official Music Video)
06:07
Ozoda
Рет қаралды 13 МЛН