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.
@tadasturonis3 ай бұрын
Good luck on the degree!
@evachen86239 ай бұрын
came back to this class 2 months later and many parts of it are still brain-storming
@thrillingclips77798 ай бұрын
me coming after 2 times revision also looks like more brain storming
@worldboy9684 Жыл бұрын
Wow, this is amazing... What a masterpiece of a lecture. I'm equally informed and inspired to teach!
@TheRamstoss4 жыл бұрын
Brian your throat is dry! Please take a sip of water, for us. We can wait :) Thanks for teaching us!
@aviroxi2 жыл бұрын
I was really thinking about that.
@AI-Neurons8 ай бұрын
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!🙌
@meyubaraj4 жыл бұрын
Thank you so much for this class.
@johnmayfield7662Ай бұрын
Great lecture Prof
@FarisGhazi2 ай бұрын
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 ?
@nabeelriaz81549 ай бұрын
Thank you CS50 team. Love the engaging presentation.
@raghavendrakaushik48714 жыл бұрын
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 Жыл бұрын
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-uz8us10 ай бұрын
Mathematics is indeed a fundamental cornerstone of artificial intelligence (AI).
@sanjitrao27613 жыл бұрын
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 Жыл бұрын
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)."
@famouspeople86118 ай бұрын
Appreciate everyword u said
@aiof212 жыл бұрын
Great stuff, easy to understand. Brian seems to have a hard time swallowing...
@ibiyemisamuel6082 Жыл бұрын
Please how do I get access to those python files?
@1one1yh1tchh1ker Жыл бұрын
How can ı access to this code to look again?
@not_amanullah5 ай бұрын
❤
@rafaelcarvalho20404 жыл бұрын
33:29
@bombarded_human3 жыл бұрын
Hi
@bonjour72093 жыл бұрын
hi
@rayenlahgui22928 ай бұрын
please where can i find his codes ?
@BT23MA0056 ай бұрын
Hi
@martinvardanyan88894 жыл бұрын
Where i can will see this and past lections code? @CS50
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!
@DuarteMolha3 жыл бұрын
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 ?
@triangle4studios3 жыл бұрын
@@DuarteMolha I stand by what I said.
@DuarteMolha3 жыл бұрын
@@triangle4studios as is your right to do so.
@daophung31403 жыл бұрын
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?
@minchulkim873 жыл бұрын
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 Жыл бұрын
🎯 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-uz8us10 ай бұрын
Very helpful, thank you!
@gauravrawat.72 ай бұрын
That's the power of AI!
@akierowan91432 жыл бұрын
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 Жыл бұрын
Basically TRUE 😂
@AlokVerma-kw5pt3 жыл бұрын
World class lecture Thank you Bryan and team
@msmnazemi4 жыл бұрын
Brian and team, many thanks for sharing your knowledge with us and for your due diligence in covering this material.
@marzenah1233 жыл бұрын
Thank you Prof. Yu! 🙏 Your lectures are amazing. 👏
@as_if7 ай бұрын
1:21:20 harry is sleeping with hermione in the library 💀
@explorer_11137 ай бұрын
💀💀💀take your mind out of the gutter 😆😆
@yogendrapawar1738 Жыл бұрын
The way he explains without fumbling
@patmull1 Жыл бұрын
"Every person belongs to a house." Moments of silence for all the homeless people.
@quantummath-1b2a2 ай бұрын
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Ай бұрын
amazing course
@sharfaraazs93673 жыл бұрын
How many of u here. From edx... Platform... Where the video is not working properly .. Plzz mention...
@Ixtinkt4 ай бұрын
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 :)
@KashiISC29 ай бұрын
Such a beautiful lecture.... Really, Waiting to complete this AI course!!!!!!
@aviroxi2 жыл бұрын
Thank you so much for this amazing lecture Brian
@explorer_11137 ай бұрын
Someone really loves Harry Potter, but, who wouldn't?
@alejandraossajimenez858 Жыл бұрын
could anyone be so kind as to share the name of the repository where the code for this class is? thank you!
@pain._amegakure4525 күн бұрын
where to do model check by writing a code
@tensfantasy23843 жыл бұрын
Salute You Master Brian🙏🙏🙏🙏🙏
@ijustawannaprivicie80319 ай бұрын
What's the diference between "implication elimination" vs "Material implication (as described on wikipedia)
@darraghbuckley21842 ай бұрын
Nothing same thing
@GenZ_01_Ай бұрын
Brian you’re great bro. Thanks cs50 team ! With each lecture I’m getting more passionate about cs
@evachen862311 ай бұрын
real brain storming but so much fin as well
@ManuelBarros642 жыл бұрын
Great explanation. Thank you very much.
@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 Жыл бұрын
Love it! I hope you succeed!
@satish1012 Жыл бұрын
I am also nearly 51 ..
@peep_show80373 ай бұрын
Stop the drug flow and put them to work 🤷♂️
@sanskarkhandelwal9 ай бұрын
So basically I have to read Harry Potter before studying artificial intelligence 😅
@abdelhakimkhabir8 ай бұрын
Question: Should i program the inference by resolution?
@sumukha-infotech3 жыл бұрын
Awesome Thank you for the video
@idkidkidk33334 жыл бұрын
Thank you so much !!!
@srourganoush59412 жыл бұрын
Thank you for your great explanation, God bless you
@venusliong10 ай бұрын
"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!
@ishrarchowdhury485011 ай бұрын
This is GOLD content.
@krox477 Жыл бұрын
This field is changing so fast
@evachen862311 ай бұрын
This class is so much fun~
@MrSaladdin4 ай бұрын
In 36:47 why we return true if the knowledge is not true, shouldn’t we return false?
@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
@SarahCornnor11 ай бұрын
Good morning. Thanks. For sharring. CassieKassuim
@holderstown643 Жыл бұрын
I love Brian
@paramitabanerjee620510 ай бұрын
This resembles a lot of Rule Based programming
@abdelhakimkhabir8 ай бұрын
Do someone program the inference by resolution?
@vivekrai197411 ай бұрын
17:58 Why don't we use implies (symbol ->) instead of entailment? Don't they mean the same?
@jamil552211 ай бұрын
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 Жыл бұрын
wow cs50 now with AI? holy, amazing water
@gayathriv35397 ай бұрын
This guy reminds me of Iain armitage
@SahaabMansha3 ай бұрын
from where can we get the code
@billpapamokos8054Ай бұрын
if I have some questions and I want to speak with Brian can someone give me his email?
@taruncharan42624 жыл бұрын
why this whole series is unlisted ???
@BT23MA0057 ай бұрын
This is unlisted and you commented that means you got link and we got access now in 2024😅😅
@krishnagupta17354 ай бұрын
Where can I get code?
@forheuristiclifeksh783610 ай бұрын
1:24:21
@forheuristiclifeksh783610 ай бұрын
29:35
@mohsinzaki27116 ай бұрын
Simply of the best
@FizaMemon-z3i7 ай бұрын
Is this course worth to take as a beginner?
@richard_shaju5 ай бұрын
Yes
@MCInferno7 ай бұрын
E
@mohammed5454 ай бұрын
cool !
@johnpasir32076 ай бұрын
very good!
@FriskDreemurr6666911 ай бұрын
underrated
@ycsea4 жыл бұрын
we have p and we have not p.....ed
@kietngoquang71909 ай бұрын
woowwww
@HaiderAli-lr9fw3 жыл бұрын
I didn't understood the KB output how it came at 25:42 . Can anybody explain.
@rafaelrohr11372 жыл бұрын
Still want some help?
@HaiderAli-lr9fw2 жыл бұрын
@@rafaelrohr1137 yeah
@vanderferreira3094 Жыл бұрын
still want some help?
@ameer4955 Жыл бұрын
Here KB is (P ∧ ¬Q) → R ∧ P ∧ ¬Q. Now try to understand it by making truth table
@EatDrinkCook8 ай бұрын
I applied this (P ∧ ¬Q) → R to online calculators and it give me absolutely oposite results: 7 true and only 1 false.