Skip to content

Prisoner's Dilemma app for SwiftUI, you play against an AI.

Notifications You must be signed in to change notification settings

AdrianColaianni/Prisoner-s-Dilemma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Prisoner's Dilemma

Prisoner's Dilemma app for SwiftUI, you play against an AI.

This is a short app I created to learn SwiftUI. It is a classic take on the Prisoner's Dilemma.

Two members of a criminal gang are arrested and imprisoned. Each prisoner is in solitary confinement with no means of communicating with the other. The prosecutors lack sufficient evidence to convict the pair on the principal charge, but they have enough to convict both on a lesser charge. Simultaneously, the prosecutors offer each prisoner a bargain. Each prisoner is given the opportunity either to betray the other by testifying that the other committed the crime, or to cooperate with the other by remaining silent.
Prisoner's Dilemma - Wikipedia

You have the option of staying silent or betraying your opponent, an AI, who makes their decision based off yours as you continue to play. Your goal is to minimize your time in prison.

About

Prisoner's Dilemma app for SwiftUI, you play against an AI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages