For those of you that have submitted an entry, you might want to check yourself against the judging code. It's sad to see promising entries fail to stay within the bounds. Make sure that your code accounts for variances in the bounds and bonus. I played with the idea of introducing negative integers in some of those arguments, but I figured I'd stick with non-negative integers since it made more sense with the storyline. In short, don't worry about negative integers for the bounds or the bonus; it's all non-negative integers only.
Need some extra players? I used the following class:
To aid in using the judging code, here's a snippet:
template <int constant>
class Constant : public Contest::TravellersDilemma
int ChooseNumber(int previousEarning, int lowerBound,
int upperBound, int bonus)
//Seed up the rng
std::vector<std::pair<Contest::TravellersDilemma*, int> > players;
//push_back all the players with a 0
//i.e. players.push_back(std::make_pair(new Constant<2>(), 0));
//If you want some output to the console.
//Personally, I find this much more useful.
//Make sure you can at least play the standard game
Contest::TravellersDilemmaJudge judge(players, 2, 100, 2, 10, streams);