Hot answers tagged

2

How did you reason about this statement: # Information about what the characters actually said # A says either "I am a knight." or "I am a knave.", but you don't know which. Or(Implication(AKnight, AKnight), Implication(AKnight, AKnave)), Or(Implication(AKnave, Not(AKnight)), Implication(AKnave, Not(AKnave))), It seems to be a problem ...


2

So, here is your debugged code. Basically there were two main reasons why it was not working.... you were adding the node when it was not a target among the neighbors without checking whether that node is already in frontier. when you backtrack, the neighbor from where you backtrack, you have not declared that neighbor as a node yet. Without declaring it ...


2

So if it is written A entails B, it means that for all possible worlds, is there any world where A is true and B is true. So firstly, sentence 3 is never gonna be true. let's see Sentence 1 entails Sentence 2 option, let's see it through truth table: p: Hermione is in the library q: Harry is in the library p q sent1 sent2 T T T T T F ...


1

As stated in the specifications of the problem : The iterate_pagerank function should accept a corpus of web pages and a damping factor, calculate PageRanks based on the iteration formula described above, and return each page’s PageRank accurate to within 0.001. If it adds up to 1.0001 don't worry that's just a rounding issue.


1

You'll need to install python locally and work there. You'll be able to upload the project files to the IDE for submit50. Consider signing up for Ed Discussion, there is a more robust CS50 AI community on that forum.


1

I noticed this a duplicate question that you have already posted here but I can't flag it as a duplicate, so I'll repost my answer here in case anyone chances upon this one instead: This is due to the new automatic GitHub authentication introduced in VSCode version 1.45. The temporary fix for this is to disable Git: GitHub Authentication in your VSCode ...


1

So, Here is the deduction: If it didn’t rain, Harry visited Hagrid today. Harry visited Hagrid or Dumbledor today, but not both. Harry visited Dumbledor today. Harry did not visit Hagrid today. Using sentence 3, we know that Harry visited Dumbledor. Using sentence 2, we know Harry did not visit both Hagrid and Dumbledor. so it must not have visited Hagrid ...


1

If it didn’t rain, Harry visited Hagrid today. Harry visited Hagrid or Dumbledor today, but not both. Harry visited Dumbledor today. Harry did not visit Hagrid today. Deduction: It rained today. From point 3, we know that Harry visited Dumbledor today. From point 2, we know that Harry visited Hagrid or Dumbledor today but not both. Based on points 2 and 3, ...


1

You have to provide commas to keep separate your logical expressions like And(Or(AKnight, AKnave), Biconditional(AKnight, Not(AKnave)), Biconditional(AKnave, Not(AKnight)), Implication(AKnight, And(AKinght, AKnave)), Implication(AKnave, Not(And(AKnight, AKnave))) ) This is the mistake in your logic.


Only top voted, non community-wiki answers of a minimum length are eligible