![]() ![]() Rain = Symbol("rain") # Rain is the symbol for rain ![]() # Here we import everything from logic.py The Python Code For Knowledge Representation Using Propositional Logic Propositional logic is based on propositions, statements about the world that can be true or false, as in sentences 1-5 above. To come to this conclusion, we used logic, and today’s lecture explores how AI can use logic to reach new conclusions based on existing information. However, knowing sentence 4, we know that this is not the case. Now, looking at sentence 1, we understand that if it didn’t rain, Harry would have visited Hagrid. Looking at sentence 2, we know Harry visited either Dumbledore or Hagrid, and thus we can conclude 4. Here is how we can go about it: looking at sentence 3, we know Harry visited Dumbledore. Harry visited Hagrid or Dumbledore today, but not both.īased on these three sentences, we can answer the question “did it rain today?”, even though none of the individual sentences tell us anything about whether it is raining today. If it didn’t rain, Harry visited Hagrid today.Ģ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |