4-Man Standoff
Description
You've somehow found yourself into a four-way standoff. A loaded gun rests in your hands, and some grenades are hooked on your belt.
The objective is to have the most health at the end of a standoff. A standoff is over when at most one person has a positive amount of health.
Each player has 5
health, and dies when their health drops to/below 0
. The turn a player dies is the last turn that player can take damage.
If there is a live player at the end of a standoff, that player wins. Otherwise, the player with the least negative health wins.
Actions
Shoot: Take a shot at someone.
2
damage if shooting a live enemy0
damage if shooting a dead enemyhealth_at_start_of_turn+2
damage if shooting yourself. (Note that this will leave you with at MOST-2
health.)- If one enemy shoots at you on the same turn you shoot yourself, you will end the standoff with -4 health (you still take damage from other players the turn you kill yourself).
- Your action the following turn will be ignored (and assumed to be
Nothing
).
Dodge: Try to dodge a single opponent's shot.
Prepare: Unhook your grenade and prepare to throw it.
- You only have three turns to throw it, before you get blown up (
6
damage to yourself,3
damage to all live enemies) - Dying with an unthrown grenade is equivalent to not throwing the grenade for three turns.
- You only have three turns to throw it, before you get blown up (
Throw: Chuck the grenade towards someone and hope for the best.
- Target receives
8
damage if alive - Everyone else (including yourself) receives
3
damage if alive
- Target receives
Nothing: Stand idly for a turn and watch everyone die.
Input
Your program will be passed the following information:
- The health of each player
A list of actions taken by that player since the start of the standoff Below is the format for the information passed per player:
[Health],[Action 1],[Action 2],[Action 3],...
Actions will be given in the format specified in the Output section.
You will recieve 4 such strings, separated by a space, and passed as a single argument. The order of these strings is:
[Player Info] [Opponent 1 Info] [Opponent 2 Info] [Opponent 3 Info]
The strings are passed as the second argument. The first argument contains an integer that uniquely identifies the standoff being enacted. Standoffs between the same set of players are guaranteed not to be simultaneous. However, multiple standoffs will occur at the same time.
For example:
$./Player.bash 5 "3,S2,N 5,P,N 3,S0,N -2,S3,N"
Currently, the player and the second opponent have 3 health, the first opponent has 5 health, and the third opponent has -2 health and is dead.
On the first turn:
- Player 1 shot enemy 2
- Enemy 1 prepared a grenade
- Enemy 2 shot player
- Enemy 3 shot himself
On the second turn:
- All players did nothing. (Player and enemy 2 can not do anything since they shot on the previous turn. Enemy 3 is dead: he will do
Nothing
for the rest of the standoff.)
The second argument at the start of a standoff is: 5 5 5 5
.
Output
A command should be outputted in the below listed format. An invalid output is interpreted as 'Nothing'. A command requiring a target should be followed by an integer (0-3
, with 0
representing the player, and 1-3
representing enemies 1-3).
S[target]
: Shoots [target].D[target]
: Tries to dodge [target].P
: Prepare a grenade.T[target]
: Throw the grenade at [target].N
: Do nothing.
A command that needs a target, but is fed a target not between 0
and 3
or not fed a target entirely will be assumed to target 0
(the player).
Scoring
At the end of each standoff, players receive a score calculated by the following formula:
35 + health at end of standoff
In the case that a player ends a standoff with negative health, they will receive a score below 35. The following points are also rewarded as a bonus:
- Most health: +4 points
- Second most health: +2 points
- Third most health: +1 point.
In case of a tie, the lower bonus is granted (if two people tie with most health, both are granted +2; if there are 3 people with the most health, +1, and if everyone ends equally, +0).
The final score is determined by calculating the mean of all individual scores.
Rules/Details
- Order of events within a turn are as follows:
- All players do their actions.
- Players who have 0 or less health die.
- Unthrown grenades that need to explode, will explode (players who just died are still hurt, as this is still the turn they died).
- No collaboration between entries.
- Three* standoffs will occur between each set of 4 players. (Order of players may vary with each standoff).
- Entries consuming excessive amounts of memory of disk space will be disqualified.
- Reading from or modifying files other than your entry's will disqualify your entry.
- A truck, driven by a drunkard, will run over all living players after the
50th
turn, if the standoff is not yet over at the end of the50th
turn.- This truck deals 20 damage to all live players.
- Standoffs happen quickly. Programs are cut off after 1 second.
- Your program will be called every turn, even after you have died.
- You may read or write files to your directory only (if your entry is named JohnDoe, you may save files in the directory players/JohnDoe/); however, this will NOT be the current directory while your script is running.
- The standoffs will take place on a machine running Arch Linux (Release 2014.08.01).
The controller is available on GitHub.
Please include the following in your post:
- A name for your bot
- A shell command to run the bot (ex.
java Doe.java
) Input will be passed through the command line as a single argument (java Doe.java 5 "-2,S0 -2,S1 -2,S2 5,N"
) - Code of your bot
- How the bot should be compiled (if applicable)
- Language (and version if applicable, especially for python)
*Controller is taking way too long for six.
Scoreboard
Observer 43.280570409982
MuhammadAli 43.134861217214
Osama 43.031983702572
LateBoomer 42.560275019099
SimpleShooter 42.412885154062
LessSimpleShooter 42.3772
Neo 42.3738
Scared 42.3678
Richochet 42.3263
Equivocator 42.2833
TwentyFourthsAndAHalfCentury 42.2640
Darwin 42.1584
HanSolo 42.1025
Coward 42.0458
ManipulativeBastard 41.8948
Sadist 41.7232
Aggressor 41.7058
CourageTheDog 41.5629
Grenadier 40.9889
Bomberman 40.8840
Spock 40.8713
Sniper 40.6346
DONTNUKEMEBRO 39.8151
PriorityTargets 39.6126
Hippolyta 39.2480
EmoCowboy 39.2069
Zaenille 39.1971
AntiGrenadier 39.1919
PoliticallyCorrectGunman 39.1689
InputAnalyzer 39.1517
Rule0Bot 39.1000
BiasedOne 39.0664
Pacifist 39.0481
StraightShooter 39.0292
Ninja 38.7801
MAD 38.2543
Monkey 37.7089
Label1Goto1 36.2131
Generated: 2014/08/22 03:56:13.470264860 UTC
Logs: on GitHub