Illustrated by Chris Rainbolt, my brother and a fresh graduate from Savannah College of Art and Design
Introduction
The angels and demons are fighting and, as usual, using earth as their battleground. Humans are stuck in the middle and are being forced to take sides. An unknown neutral force rewards those who consistently fight for the losing side.
The Game
Each round, you will be passed an input and be expected to produce output. Your output will be recorded and scored. This process will be repeated 1000 times.
Input
You will receive a single argument that represents the past votes of every player. Rounds are delimited by comma. A 0
represents a player who sided with Evil that round. A 1
represents a player who sided with Good. The players will always be in the same order. Your own vote will be included, but not explicitly identified. For example:
101,100,100
In this example, three rounds have been completed so far and three players are competing. Player one always sided with Good. Player two always sided with Evil. Player three swapped from Good in round 1 to Evil in rounds 2 and 3. One of those players was you.
Output
- Output the string
good
to stdout if you want to side with Good. - Output the string
evil
to stdout if you want to side with Evil.
If your program outputs anything else, throws an exception, does not compile, or takes longer than one second to output anything on this exact machine, then it will be disqualified.
Scoring
- You receive 3 points for siding with the majority during a round.
- You receive n - 1 points for siding with the minority during a round, where n is the number of consecutive times you have sided with the minority.
The submission with the most points after 1000 rounds wins.
Deliverables
Non-Java Submissions
You must submit a title, a program, and Windows command line string that will run your program. Remember that an argument may be appended to that string. For example:
python Angel.py
- Note that this one has no args. This is round one! Be prepared for this.
python Angel.py 11011,00101,11101,11111,00001,11001,11001
Java Submissions
You must submit a title and a Java class that extends the abstract Human class written below.
public abstract class Human {
public abstract String takeSides(String history) throws Exception;
}
Testing
If you want to test your own submission, follow the instructions here.
Additional Notes
You may submit as many different submissions as you want. Submissions that appear to be colluding will be disqualified. The author of this challenge will be the only judge on that matter.
A new instance of your program or Java class will be created every time it is called upon. You may persist information by writing to a file. You may not modify the structure or behavior of anything except your own class.
Players will be shuffled before the trial starts. Demon and Angel will participate in every trial. If the number of players is even, Petyr Baelish will also join. Demon fights for Evil, Angel for Good, and Petyr Baelish chooses a pseudorandom side.
scoresToCSVString()
,round < currentRound
has to beround <= currentRound
or the last round will no be counted... – Manu 14 hours ago