This is based on this challenge and Geobits's/CarpetPython's idea to improve it:
For this challenge, the distance between two numbers is measured on a loop, so, for example, the distance between 0 and 999 is 1. This should prevent strategies like always picking the lowest or highest number from winning almost every time. The only other change is that the lowest number that can be chosen is now 0 instead of 1.
I'll summarize it here:
- Write a function in Java, Python, or Ruby that takes three arguments:
- the number of rounds played so far
- the number of players
- the numbers picked in the previous rounds, as an array of space-separated strings
- It should return an integer from 0 to 999, inclusive
- The score for a program each round is the sum of the square roots of the distances to the numbers each other program picked
- The program with the highest score after 100 rounds wins.
- One answer per person
The control program is here:
https://github.com/KSFTmh/src/
Leaderboard
NumberOne, by TheBestOne, is winning.
- NumberOne - 9700
- NumberOnePlusFourNineNine - 9623
- AncientHistorian - 9425
- FindCampers - 9259
- WowThisGameIsSoDeep - 9069
- Sampler - 9014
- SabotageCampers - 8545
Apparently, my camper sabotage...er(?) doesn't work very well.
Here are the full results: https://github.com/KSFTmh/src/blob/master/results-3
I think this is different enough to not be a duplicate.
By the way, this is my first time asking a question on Stack Exchange, so let me know if I'm doing something wrong.