Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
153

EmoWolf EmoWolf hates Java, and would rather kill itself than participate. EmoWolf has starved itself, but still weighs 177 bytes. package animals;public class EmoWolf extends Animal{public EmoWolf(){super('W');}public Attack fight(char opponent){return Attack.SUICIDE;}public Move move(){return Move.HOLD;}}


52

LazyWolf Aptly named, this guy does the bare minimum to survive. The only non-wolf threat is a lion, so he will move if one of those is about to step on him. Other than that, he just sleeps. There's not much you can do against wolves that will be better than 50/50, so he just doesn't do anything. If a wolf attacks him, he chooses an attack in an evenly ...


52

Blue Team - SphiNotPi3000 // Char 0: top or bottom ("T" or "B") // Char 1, 2: x/y coords // Char 3, move polarity // Char 4: offset (as codepoint - 128) var twin = 21487; var myself = 2867; var formpos = "T"; var tochar = String.fromCharCode; var movestat = (move % 2).toString(); var inbox = getMsg(twin); // Spoofing the message of a deceased partner if ...


51

Wrapper for Non-Java Submissions NOTE MAP_SIZE support has been added. If you care, please update your submission accordingly. This is community wiki entry for a wrapper, usable by those who want to play but don't like/don't know Java. Please use it, have fun, and I'm happy to help you get things set up. It's pretty late here as I'm finishing up, so other ...


50

Unpredictable Caveman me, he = (ARGV[0] || ' , ').split(',') @possible_actions = %w[Sharpen Poke Block] class String def sharpness @sharpness ||= count('S') - count('P') end def has_pointy_stick (1..4).cover? sharpness end def has_sword sharpness >= 5 end def scary sharpness > 0 end end def no action @...


47

HerjanWolf Updated 10-4-2014 at 15:00 Averages of 100 rounds, 1000 iterations: Standard mobs: class animals.Bear - 2.2600002 class animals.Lion - 41.21 class animals.Stone - 20.159998 class animals.HerjanWolf - 99.99 <-- kind of flawless 20+ Species (Keep in mind, don't trust these scores since we keep calculating avgs until our wolves score best!) ...


47

Blue Team - SphiNotPi3000 // Char 0: top or bottom ("T" or "B") // Char 1, 2: x/y coords // Char 3, move polarity // Char 4: offset (as codepoint - 128) var myself = 21487; var twin = 2867; var formpos = "B"; var tochar = String.fromCharCode; var movestat = (move % 2).toString(); var inbox = getMsg(twin); // Spoofing the message of a deceased partner if ...


46

CamoWolf Abusing the required code format. // Optional code here public class Wolf extends Animal { // Optional code here public Wolf() { super('W'); // Optional code here } public Attack fight(char opponent) { // Required code here. Must return an Attack. } public Move move() { // Required code here. Must return a Move. } // Optional ...


44

Emo Wolf With A Gun He's back. He hates zombies. He still hates Java. No copyright infringement intended. package player; import zombie.*; public class EmoWolfWithAGun implements Player { @Override public Action doTurn(PlayerContext context) { PlayerId myself = context.getId(); return new Shoot(myself); } }


43

Cloaking Device Bot This bot basically tries to hide its base, making it so that other bots will move right past it and off the tape. (-)*127(-+--+-++)*12500


39

Hipster, Ruby if ARGV.length == 0 puts ["good", "evil"].sample else last_round = ARGV[0].split(',').last n_players = last_round.length puts last_round.count('1') > n_players/2 ? "evil" : "good" end Simply goes with last round's minority, just because everything else is mainstream. Run like ruby hipster.rb


38

GatheringWolf My wolves live in a group. They gather, if the lions let them. They're not so good at surviving, though. Update: If a lion force them away, they now try to regather! package animals; import java.util.*; public class GatheringWolf extends Animal { private static int iteration; private static Move preferredMove; private int ...


35

Darwin - C Who needs strategy, anyway? Have a group of cavemen go at each other and let natural selection do the rest! We use a very simple model for out caveman's primitive brain: it has no memory and only takes the sharpness of his and his opponent's stick into account. Those are used as the variables for a binary polynomial of some finite order. Each ...


31

The Sheep in Wolf's Clothing Runs away. It prioritizes running away from Wolves the most, since they're going to be the most dangerous. Next are Lions, since they're nondeterministic. Bears and Stones are both not at all a problem, but we still run away from them if we have nothing better to do because a Wolf killing a Bear or a Stone is, at that moment in ...


30

Petyr Baelish You never know whose side Petyr Baelish is on. package Humans; /** * Always keep your foes confused. If they are never certain who you are or * what you want, they cannot know what you are likely to do next. * @author Rusher */ public class PetyrBaelish extends Human { /** * Randomly take the side of good or evil. * @...


29

C++, The Meta Scientist This one does essentially the same as The Scientist, but doesn't operate on rounds as a whole but on the individual players. It tries to map a wave (or a constant function) to each player separately and predicts their move in the next round. From the resulted round prediction, The Meta Scientist chooses whichever side looks like ...


27

Manager Here's a manager. Naturally, the cleverness is 0 and he always strives to go where the sun don't shine. And, of course, he will only fight the weak and is very good in dodging trouble: public class Manager extends Alien { private static final int STRENGTH = 5; @Override public void setAbilityPoints( float[] abilities ) { ...


27

TrumpBot private void sleep(String[] args) { round = Integer.parseInt(args[0]); thisTownID = Integer.parseInt(args[1]); states = new ArrayList<>(); //states.add(new State(args[thisTownID+2])); otherStates = new ArrayList<>(); for (int i = 2; i < args.length; i++){ states.add(new State(args[i])); } ...


26

Not an entry, just want to contribute to the GUI by adding color code for each class =D Result Wild.java Change the code around game.populate(c,100) with: String[] colors = generateColors(classes.length); int idx = 0; for(Class c : classes){ Animal.setColor(c, colors[idx]); idx++; game.populate(c, 100); } stats.update(); with the ...


26

Angel The purest player of all. Program print "good" Command python Angel.py


26

Pony (Python 2) This is based on a rock-paper-scissors bot I wrote some time ago for a programming challenge at the end of a Udacity online class. I changed it to include Spock and lizard and made some improvements. The program has 11 different simple strategies, each with 5 variants. It chooses from among these based on how well they would have performed ...


26

The BlackHatPlayer The BlackHat Player knows that bullets and shields are a thing of the past; the actual wars are won by those who can hack the opponent's programs. So, he puts on a fixed metal shield and starts doing his thing. The first time he is asked to fight, he tries to localize his enemy in memory. Given the structure of the fighting ...


26

BaitBot - JavaScript Node.JS Why bother chasing or running if you can never catch? Instead, BaitBot finds the nearest coin and waits for a weaker bot to also approach it. When they're both adjacent, baitBot goes for the coin assuming the weaker bot will as well. If baitBot is waiting and a stronger bot approaches, he just grabs the coin and skedaddles. Try ...


25

Cave Doctor - Lua "Me lose to new foreigners, knocked them out to study them" When you've seen as many patients as the cave doctor, you begin to truly understand the cave man psyche (or so I hope). Cave doctor's game is pure strategy, he waits for pokes which he blocks in an attempt to disarm his opponent, but he won't let that opponent get close to making ...


25

C++ - MonteBot Simulates a large number of random games and chooses the move that leads to the greatest chance of not-dying. Why think of a strategy when you can let the computer create one for you? Note: Compile this with the -O3 flag for optimal performance. #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime>...


24

Artemis Fowl package Humans; public class ArtemisFowl extends Human { public final String takeSides(String history) { int good = 0, evil = 0; for(int i = 0; i < history.length(); i++) { switch(history.charAt(i)) { case '0': evil++; break; case '1': good++; break; } } ...


24

Just Everything Generates a list of every possibly legal move, shuffles it, then cycles through it repeatedly. Since there are only 1792 possibly legal moves, this will never forfeit due to the 2000-attempt rule. This is meant as a template that other answers can build on. #! /usr/bin/python import sys import random _, color, seed = sys.argv[:3] ...


23

Gambler Wolf Gambler Wolf likes to take chances so he behaves erratically hoping Lady Luck is on his side! Fortunately for him, she never lets him down! By perpetual strokes of luck, Gambler Wolf clears the field of all non-wolf obstacles with unbelievable few causalities! package animals; import java.lang.reflect.Field; import java.util.ArrayList; import ...


23

AlphaWolf Time to shine! My other wolf CamperWolf was very thin, now comes AlphaWolf, who is more muscular! Instead of dodging lions the standard way, it swaps the field with them. It also assigns dangers-values to each surrounding field. package animals; import java.util.Random; public class AlphaWolf extends Animal{ private Boolean lionMoveDown = ...


23

Java Psycho There's no telling what this crazed psycho will do - may attack anyone: a dead bot, or even himself. import java.util.Random; public class Psycho { public static void main(String[] args) { if(args.length < 1){ System.out.print("ok"); System.exit(0); } Random rnd = new Random(); ...


Only top voted, non community-wiki answers of a minimum length are eligible