Questions tagged [knights]
The knights tag has no usage guidance.
6
questions
0
votes
0answers
24 views
CS50 project 1 Knights. I don't think I understand how the model_check method works
Specifically with puzzle 1 where A says "we are both knaves" and B says nothing. Why doesn't it work when I just use one Biconditional statement like below.
knowledge = Biconditional(AKnight,...
0
votes
0answers
43 views
i dont know why i got error in the cs50 knight puzzle
from logic import *
AKnight = Symbol("A is a Knight")
AKnave = Symbol("A is a Knave")
BKnight = Symbol("B is a Knight")
BKnave = Symbol("B is a Knave")
CKnight =...
0
votes
0answers
45 views
CS50ai - Knights: error invalid syntax for part written by CS50ai (that I should not adapt)
I am having some trouble with exercise 'Knights' (week 1 - 2020 CS50ai). https://cs50.harvard.edu/ai/2020/projects/1/knights/
The goal of this exercise is to write a program to solve logic puzzels. ...
1
vote
1answer
352 views
CS50 AI - Knights - Knowledge 3
having a little trouble with the last part of the knights challenge. When run, it will print nothing for puzzle 3. I have been through the logic countless times now and in my head it seems to work. ...
0
votes
0answers
128 views
CS50AI Project Knights Puzzle 1
Can anyone help to explain the logic behind puzzle 1 thanks!!
Please correct me if I'm wrong but this is what I wrote and I somehow stumbled to the answer.
Without keying in the information that ...
0
votes
2answers
840 views
CS50 AI Problem 1A Invalid Syntax
For CS50AI Problem 1 (Knights), I am really confused as to what is producing this error.
Code:
from logic import *
AKnight = Symbol("A is a Knight")
AKnave = Symbol("A is a Knave")
BKnight = ...