Questions tagged [knights]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
61 views

Help with CS50AI Project 1 Knights Puzzle 3

I've been struggling with puzzle 3 of Knights assignment. Any help would be appreciated. Seems like the issue is in depicting the statement B says "A said 'I am a knave'."Below is my code # ...
0
votes
0answers
82 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
675 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
1answer
233 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
1k 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 = ...