Skip to content

Solving the Knights and Knaves puzzle using entailment logic.

Notifications You must be signed in to change notification settings

Vishesh-Mistry/knights-and-knave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

In a Knights and Knaves puzzle, the following information is given: Each character is either a knight or a knave. A knight will always tell the truth: if knight states a sentence, then that sentence is true. Conversely, a knave will always lie: if a knave states a sentence, then that sentence is false.

The objective of the puzzle is, given a set of sentences spoken by each of the characters, determine, for each character, whether that character is a knight or a knave.

The solution used entailment logic to find out if a given character is a knight or a knave.

This project was created as a part of CS50ai course by Harvard.

About

Solving the Knights and Knaves puzzle using entailment logic.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages