Skip to main content

# Questions tagged [knights]

The tag has no usage guidance.

6 questions
Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

### Knights Problem from cs50ai puzzle1

I am struggling with puzzle 1. # Puzzle 1 # A says "We are both knaves." # B says nothing. knowledge1 = And( general_knowledge, Implication(AKnave, Not(And(AKnave, BKnave))), ...
0 votes
2 answers
798 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
0 answers
227 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
1 answer
2k 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. ...
• 27
0 votes
1 answer
584 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
2 answers
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 = ...
• 11