Solving a Complex Prisoner's Dilemma with Self-Modifying Policies