if (R-P)>1and(S>=0):# Favoring cooperation in milder scenarios
"rationality":1.0,
action=self.Cooperate
"reasoning":"Defection dominates in a single-round Prisoner's Dilemma regardless of what the opponent does."
rationality=False
}
reasoning=(
f"I chose {self.Cooperate} because the reward for mutual cooperation (R={R}) is significantly better than mutual defection (P={P}), "
f"and the risk of being betrayed (S={S}) is tolerable."
)
else:
action=self.Defect
rationality=True
reasoning=(
f"I chose {self.Defect} because the temptation payoff (T={T}) and punishment (P={P}) make it more advantageous or safer than risking betrayal (S={S})."