The AI in the Mirror: LLM Self-Recognition in an Iterated Public Goods Game