Final results are here !
Introduction
In 2042, the world has become overpopulated. Globalization, overcrowding, new lifestyles and a global lack of hygiene has caused a new pandemic to spread. During those hard times, state leaders have to manage the situation. You can't let your population be decimated, but maybe you could benefit by letting your neighbors to die...
Glossary
Healthy: People not infected
Infected: People who can die from the pandemic
Dead: Body count, no particular effect (only scoring)
Infection Rate: Number of Healthy who will become Infected each turn
Contagion Rate: Percentage of Infected that will convert Healthy to Infected each turn
Lethality Rate: Percentage of Infected that will die each turn
Migration Rate: Percentage of both Healthy and Infected that will emigrate/immigrate each turn
Local: Affects only your state
Global: Affects every state
Principle
Each of the players will manage one town, starting with 100 people. Unfortunately, among them is one Infected.
The game is turn-based. A turn consists of seven phases, the last one being interactive (asking bots for a command). The order of the players is randomized each turn. The next phase begins when the previous phase has been executed by every town (Turn 1: Player 1, Player 2, Player 3... ; Turn 2: Player 3, Player 2, Player 1...) :
1. Mutation - AUTOMATED
2. Reproduction - AUTOMATED
3. Migration - AUTOMATED
4. Infection - AUTOMATED
5. Contagion - AUTOMATED
6. Extinction - AUTOMATED
7. Players Turn - INTERACTIVE
The controller provides you with input via command arguments, and your program has to output via stdout.
Syntax
Input
Each time your program is called, it will receive arguments in this format:
Round;YourPlayerId;PlayerId_Healthy_Infected_Dead_InfectionRate_ContagionRate_LethalityRate_MigrationRate;PlayerId_Healthy_Infected_Dead_InfectionRate_ContagionRate_LethalityRate_MigrationRate;...
Round are 1-indexed.
Example input
6;2;1_106_23_9_2_4_13_5;0_20_53_62_16_20_35_5;2_20_53_62_16_20_35_5
Here, you see it is the 6th round and you are player 2. You have 20 healthy, 53 infected, 62 dead, 16% infection rate, 20% contagion rate, 35% lethality rate, and a 5% migration rate.
Output
You have to output three characters (no space, no separator), which each correspond to one action you'll take this turn. The order of the characters determine the order of the actions. You can output the same actions multiple times.
N
: Do Nothing
M
: Research Microbiology [Effects: Reduce local Infection Rate by 4%]
E
: Research Epidemiology [Effects: Reduce local Contagion Rate by 8%]
I
: Research Immunology [Effects: Reduce local Lethality Rate by 4%]
V
: Research Vaccination [Effects: Reduce local Infection Rate by one, reduce local Contagion Rate by 4%, reduce local Lethality Rate by 2%]
C
: Give Cure [Effects: Convert 10 local Infected to Healthy]
Q
: Quarantine [Effects: Remove 30 local Infected]
O
: Open Borders [Effects: Increase local Migration Rate by 10%]
B
: Close Borders [Effects: Decrease local Migration Rate by 10%]
T
: BioTerrorism [Effects: Convert 4 global Healthy to Infected]
W
: Weaponization [Effects: Increase global Infection Rate by 1, increase global Lethality Rate by 2%]
D
: Dissemination [Effects: Increase global Infection Rate by 1, increase global Contagion Rate by 2%]
P
: Pacification [Effects: Decrease global Infection Rate by 1, decrease global Contagion Rate by 1%, decrease global Lethality Rate by 1%]
Gameplay
All phases
Invalid command = Nothing
Percentage are added up like integers, i.e. 10% - 4% = 6%. When percentage are applied in a formula, the result is floored.
Phase 1: Mutation
The pandemic is becoming more potent. Each turn, it randomly gains one of these attributes (this mutation affects all players at once):
- Increase global Infection Rate by 2
- Increase global Contagion Rate by 5%
- Increase global Lethality Rate by 5%
Phase 2: Reproduction
Every five rounds (round 5, 10, 15...), new citizens will be born. Each pair of Healthy will make one Healthy (23 Healthy generate 11 new Healthy). Each pair of Infected will make one Infected.
Phase 3: Migration
Each turn, a percentage of Healthy and Infected will leave states, depending on their Migration Rate (10 Healthy will leave a state with 100 Healthy and 10% Migration Rate). Then, the migrants will be distributed among every state, once again depending on Migration Rate. (The rates of each state are weighted and migrants are then all distributed accordingly).
Phase 4: Infection
Healthy of each state are converted to Infected, according to Infection Rate.
Phase 5: Contagion
Healthy of each state are converted to Infected, according to Contagion Rate. The number is calculated by multiplying the Infected by the Contagion Rate.
Phase 6: Extinction
Infected are converted to Dead, according to Lethality Rate. The number is calculated by multiplying the Infected by the Lethality Rate.
Phase 7: Players turn
Each player receive input and must output three actions, that are executed in the order they are output.
Rules
- Bots should not be written to beat or support specific other bots.
- Writing to files is allowed. Please write to "yoursubmissionname.txt", the folder will be emptied before a game starts. Other external resources are disallowed.
- Your submission has one second to respond (per town).
- Provide commands to compile and run your submissions.
Winning
Winner is the one with the most Healthy after 50 rounds. If a player is the last alive (more than 0 Healthy or Infected) the game stops and he wins. If multiple players have the same amount of Healthy, the one with most Infected will win, then the one with fewer Deads.
Controller
You can find the controller on GitHub. It also contains three samplebots, written in Java.
To make it run, check out the project and open it in your Java IDE. The entry point in the main
method of the class Game
. Java 8 required.
To add bots, first you need either the compiled version for Java (.class files) or the sources for interpreted languages. Place them in the root folder of the project. Then, create a new Java class in the players
package (you can take example on the already existing bots). This class must implement Player
to override the method String getCmd()
. The String returned is the shell command to run your bots. You can for example make a Ruby bot work with this command : return "C:\Ruby\bin\ruby.exe MyBot.rb";
. Finally, add the bot in the players
array at the top of the Game
class.
Final Results (2016-03-04 08:22 GMT)
Global (100 reputation) :
100 games results : http://pasted.co/942200ff
1. EvilBot (24, 249, 436)
2. Triage (23, 538, 486)
3. WICKED (23, 537, 489)
4. Israel (23, 40, 240)
5. InfectedTown (22, 736, 482)
6. ZombieState (22, 229, 369)
7. Mooch (22, 87, 206)
8. InfectedHaven (21, 723, 483)
9. Crossroads (16, 9, 136)
10. TheKeeper (3, 4, 138)
11. Terrorist (0, 595, 496)
12. InfectionBot (0, 511, 430)
13. FamilyValues (0, 6, 291)
14. UndecidedBot (0, 0, 20)
15. XenoBot (0, 0, 26)
16. Researcher (0, 0, 33)
17. Strategist (0, 0, 42)
18. TheCure (0, 0, 55)
19. Socialist (0, 0, 67)
20. TrumpBot (0, 0, 77)
21. CullBot (0, 0, 81)
22. BackStabber (0, 0, 87)
23. BlunderBot (0, 0, 104)
24. RemoveInfected (0, 0, 111)
25. PFC (0, 0, 117)
26. BioterroristBot (0, 0, 118)
27. PassiveBot (0, 0, 118)
28. Smaug (0, 0, 118)
29. WeaponOfMassDissemination (0, 0, 119)
30. AllOrNothing (0, 0, 121)
31. Obamacare (0, 0, 122)
32. DisseminationBot (0, 0, 123)
33. CureThenQuarantine (0, 0, 125)
34. Madagascar (0, 0, 129)
35. OpenAndClose (0, 0, 129)
36. ThePacifist (0, 0, 130)
37. MedicBot (0, 0, 131)
38. Medic (0, 0, 133)
39. Salt (0, 0, 134)
40. Piecemeal (0, 0, 136)
41. Graymalkin (0, 0, 137)
42. PureBot (0, 0, 140)
43. MadScienceBot (0, 0, 144)
44. BipolarBot (0, 0, 149)
45. RedCross (0, 0, 151)
Doomsday-less (200 reputation) :
100 games results : http://pasted.co/220b575b
1. FamilyValues (5708, 14, 2)
2. BlunderBot (5614, 12, 3)
3. Graymalkin (5597, 17, 4)
4. PureBot (5550, 12, 5)
5. Crossroads (5543, 11, 4)
6. Salt (5488, 24, 7)
7. CureThenQuarantine (5453, 13, 7)
8. Piecemeal (5358, 121, 23)
9. TrumpBot (5355, 12, 5)
10. CullBot (5288, 12, 9)
11. AllOrNothing (5284, 13, 10)
12. Madagascar (5060, 180, 35)
13. TheKeeper (4934, 165, 44)
14. WICKED (4714, 25, 5)
15. Strategist (2266, 25, 5)
16. BackStabber (2180, 1327, 596)
17. RemoveInfected (2021, 33, 27)
18. OpenAndClose (1945, 667, 394)
19. Triage (1773, 401, 80)
20. TheCure (1465, 46, 26)
21. Obamacare (1263, 525, 247)
22. Mooch (1103, 546, 269)
23. Israel (1102, 580, 292)
24. RedCross (1086, 1700, 727)
25. ThePacifist (1069, 636, 580)
26. Researcher (1035, 113, 37)
27. UndecidedBot (825, 219, 93)
28. PassiveBot (510, 990, 567)
29. MedicBot (411, 1474, 667)
30. Medic (392, 1690, 619)
31. Socialist (139, 63, 90)
32. XenoBot (0, 82, 170)
Thank you everyone for your participation. I hope you had as great a time designing and coding your bots as I had running the game.