This is actually much more like "guess 2/3 of the average" than tragedy of the commons or the prisoner's dilemma, in that there's an obvious Nash equilibrium that there really shouldn't be any reason to deviate from, except that you need to take into account the foolishness of the other players. They don't offer any possible means for people to correlate their moves with their opponents' moves, so the only reason to ever cooperate would be if you expect other players who don't understand game theory to be more likely to cooperate with you if your reputation is greater than 0. You don't want to cooperate if and only if the fact that you are doing so implies that they will be more likely to cooperate with you, because you can't (or at least, any such effect would necessarily benefit people besides you just as much, and would thus be worthless, since it's a zero-sum game). And you don't want to cooperate with people if and only if you expect them to cooperate with you, because (C,C)+(D,D) gives you the same payoff as (C,D)+(D,C), so although you want as many cooperations as possible from your opponents, and as many defections as possible by you, there's no incentive to correlate them. So if you need to have a positive reputation in order to attract cooperations from players who don't know what they're doing, you may as well just cooperate against players that you think are doing poorly (which would probably be either players whose reputation is too high, and who are thus probably sacrificing too much, or whose reputation is too low, and who are thus not getting cooperations from people who think they should be cooperating with people with high reputations, or both), because these players won't be your main competition at the end, so helping them is harmless. Cooperation early in the game is better than cooperation late in the game because it affects your reputation for a larger portion of the game (plus, one cooperation has a larger effect on early-game reputation than it does on late-game reputation).
There are ways of determining which player is which, vaguely. You can keep track of reputation between rounds, and infer that player 5 from last round couldn't possibly be player 23 from this round because that would require player 5 to have cooperated with more people than there are players. Alternatively, my bot could ensure the number of times its hunted in history is always a multiple of 17, and other smart bots could look for this.
TL;DR = write a python script to win this applied game theory contest for $1000. Based on Prisoner's Dilemma / Tragedy of the Commons but with a few twists. Deadline Sunday August 18.
https://brilliant.org/competitions/hunger-games/rules/
The choices are H = hunt (cooperate) and S = slack (defect), and they use confusing wording here, but as far as I can tell the payoff matrix is (in units of food)
What's interesting is you don't get the entirety of your partner's history (so strategies like Tit-Tit-Tit for Tat don't work) instead you get only their reputation, which is the fraction of times they've hunted.
To further complicate the Nash equilibria, there's the option to overhunt: a random number m, 0 < m < P(P−1) is chosen before each round (round consisting of P−1 hunts, remember) and if the total number of hunt-choices is at least m, then each player is awarded 2(P−1) food units (2 per hunt).
Your python program has to decide at the start of each round whether or not to hunt with each opponent, based on: