text:
The Nano Core War
This is an adaption of Core War, a programming KOTH dating back to the 20th century. To be more specific, it is using an incredibly simplified instruction set primarily based off of the original proposal.
Background
In Core War, there are two programs battling for control over the computer.  The goal of each program is to win by locating and terminating the opposing program.
The battle takes place within the main memory of the computer.  This memory is called the Core, and it contains 8192 addresses.  When the battle starts, the code for each competitor (called a warrior) is placed in a random chunk of memory.  Program execution alternates between warriors, performing one instruction of each.  Each instruction is capable of modifying a part of the Core, leading to the possibility of self-modifying programs.
The goal is to terminate the opposing program.  A program terminates when it attempts to execute an invalid instruction, which is any DAT instruction.
The Instruction Set
Each program consists of a series of low-level instructions, each of which takes two fields, called the A and B fields.
This instruction set draws heavily from the original spec.  The main changes are 1) clarification on adding/subtracting commands, and 2) a change of the # addressing mode to allow it to be used anywhere.  Most full versions of Core Wars have over 20 opcodes, 8 addressing modes, and a set of "instruction modifiers."
Opcodes
Each instruction must have one of seven different opcodes.

DAT A B - (data) - This simply holds the numbers A and B.  Importantly, a process dies when it attempts to execute a DAT instruction.
MOV A B - (move) - This moves the contents of memory location A to memory location B.  Here is a demonstration of before-and-after:
MOV 2 1
ADD @4 #5
JMP #1 -1

MOV 2 1
JMP #1 -1
JMP #1 -1

ADD A B - (add) - This adds the contents of memory location A to memory location B.  The two first fields of both are added, and the second fields are added.
ADD 2 1
MOV @4 #5
JMP #1 -1

ADD 2 1
MOV @5 #4
JMP #1 -1

SUB A B - (subtract) - This subtracts the contents of memory location A from (and stores the result into) memory location B.
SUB 2 1
MOV @4 #5
JMP #1 -1

SUB 2 1
MOV @3 #6
JMP #1 -1

JMP A B - (jump) - Jump to location A, which will be executed next cycle.  B must be a number but does nothing (you can use it to store information, though).
JMP 2 1337
ADD 1 2
ADD 2 3

The jump means that ADD 2 3 will be executed next cycle.
JMZ A B - (jump if zero) - If both fields of line B are 0, then the program jumps to location A.
JMZ 2 1
SUB 0 @0
DAT 23 45

Since the two fields of instruction 1 are 0, the DAT command will be executed next turn, leading to imminent death.
CMP A B - (compare and skip if not equal) -  If the fields in instructions A and B are not equal, skip the next instruction.
CMP #1 2
ADD 2 #3
SUB @2 3

Since the two fields of instructions 1 and 2 are equal in value, the ADD command is not skipped and is executed next turn.

When two instructions are added/subtracted, the two fields (A and B) are added/subtracted pair-wise.  The addressing mode and opcode are not changed.
Addressing Modes
There are three kinds of addressing modes.  Each of the two fields of an instruction has one of these three addressing modes.

Immediate #X - X is the line to be used directly in computation.  For example, #0 is the first line of the program.  Negative lines refer to lines in the core before the start of program.
... //just a space-filler
...
ADD #3 #4
DAT 0 1
DAT 2 4

This will add the first of the two DAT lines to the second, since those are in lines 3 and 4, respectively.  You would not want to use this code, however, because the DAT will kill your bot on the next cycle.
Relative X - The number X represents the location of a target memory address, relative to the current address.  The number at this location is used in computation.  If line #35 is being executed and contains -5, then line #30 is used.
... //just a space-filler
...
ADD 2 1
DAT 0 1
DAT 2 4

This will add the second DAT line to the first.
Indirect @X - The number X represent a relative address.  The contents at that location are temporarily added to the number X to form a new relative address, from which the number is retrieved.  If line #35 is being executed, and its second field is @4, and the second field of line #39 contains the number -7, then line #32 is used.
... //just a space-filler
...
ADD @1 @1
DAT 0 1
DAT 2 4

This will add the first DAT to the second, but in a more convoluted way.  The first field is @1, which gets the data from that relative address, which is the first field of the first DAT, a 0.  This is interpreted as a second relative address from that location, so 1+0=1 gives the total offset from the original instruction.  For the second field, @1 gets the value from that relative address (the 1 in the second field of the first DAT) and adds it to itself in the same way.  The total offset is then 1+1=2.  So, this instruction is executed similarly to ADD 1 2.

Each program can contain up to 64 instructions.
When a round starts, the two programs are placed randomly in a memory bank with 8192 locations.  The instruction pointer for each program starts at the beginning of the program and is incremented after each execution cycle.  The program dies once its instruction pointer attempts to execute a DAT instruction.
Parameters of the Core
The core size is 8192, with a timeout of 8192*8 = 65536 ticks.  The core is cyclic, so writing to address 8195 is the same as writing to address 3.  All unused addresses are initialized to DAT #0 #0.
Each competitor must not be longer than 64 lines.  Integers will be stored as 32-bit signed integers.
Parsing
In order to make programming easier for competitors, I will add a line-label feature to the parser.  Any words that occur on a line before an opcode will be interpreted as line labels.  For example, tree mov 4 6 has the line label tree.  If, anywhere in the program, there is a field that contains tree #tree or @tree, a number will be substituted.  Also, capitalization is ignored.
Here is a example of how line labels are substituted:
labelA add labelB @labelC
labelB add #labelC labelC
labelC sub labelA @labelB

Here, labels A, B, and C are on lines 0, 1, and 2.  Instances of #label will be substituted with the line number of the label.  Instances of label or @label are substituted with the relative location of the label.  Addressing modes are preserved.
ADD 1 @2
ADD #2 1
SUB -2 @-1

Scoring
For each pair of contestants, every possible battle is performed.  Since the outcome of a battle depends on the relative offsets of the two programs, every possible offset (about 8000 of them) is tried.  Furthermore, each program has a chance to move first in each offset. The program that wins the majority of these offsets is the winner of the pair.
For each pair-up that a warrior wins, it is awarded 2 points.  For each tie, a warrior is awarded 1 point.
You are allowed to submit more than one warrior.  The typical rules for multiple submissions apply, such as no tag-teaming, no cooperating, no king-making, etc.  There's not really any room for this in Core War anyways, so it shouldn't be a big deal.
The Controller
The code for the controller, along with two easy example bots, is located here.  Since this competition (when run using the official settings) is completely deterministic, the leaderboard you create will be the exact same as the official leaderboard.
Example Bot
Here is an example bot that demonstrates some features of the language.
main mov bomb #-1
     add @main main
     jmp #main 0
bomb dat 0 -1

This bot operates by slowly erasing all other memory in the core by replacing it with a "bomb." Since the bomb is a DAT instruction, any program which reaches a bomb will be destroyed.
There are two line labels, "main" and "bomb" which serve to replace numbers.  After preprocessing, the program looks like this:
MOV 3 #-1
ADD @-1 -1
JMP #0 0
DAT 0 -1

The first line copies the bomb to the line immediately above the program.  The next line adds the value of the bomb (0 -1) to the move command, and it also demonstrates a use of the @ addressing mode.  This addition causes the move command to point to a new target.  The next command unconditionally jumps back to the start of the program.

Current Leaderboard

24 - Turbo
   22 - DwarvenEngineer
   20 - HanShotFirst
   18 - Dwarf
   14 - ScanBomber
   10 - Paranoid
   10 - FirstTimer
   10 - Janitor
   10 - Evolved
    6 - EasterBunny
    6 - CopyPasta
    4 - Imp
    2 - Slug

Pairwise Results:
Dwarf > Imp
CopyPasta > Imp
Evolved > Imp
FirstTimer > Imp
Imp > Janitor
Imp > ScanBomber
Slug > Imp
DwarvenEngineer > Imp
HanShotFirst > Imp
Turbo > Imp
EasterBunny > Imp
Paranoid > Imp
Dwarf > CopyPasta
Dwarf > Evolved
Dwarf > FirstTimer
Dwarf > Janitor
Dwarf > ScanBomber
Dwarf > Slug
DwarvenEngineer > Dwarf
HanShotFirst > Dwarf
Turbo > Dwarf
Dwarf > EasterBunny
Dwarf > Paranoid
Evolved > CopyPasta
FirstTimer > CopyPasta
Janitor > CopyPasta
ScanBomber > CopyPasta
CopyPasta > Slug
DwarvenEngineer > CopyPasta
HanShotFirst > CopyPasta
Turbo > CopyPasta
CopyPasta > EasterBunny
Paranoid > CopyPasta
Evolved > FirstTimer
Evolved > Janitor
ScanBomber > Evolved
Evolved > Slug
DwarvenEngineer > Evolved
HanShotFirst > Evolved
Turbo > Evolved
EasterBunny > Evolved
Paranoid > Evolved
Janitor > FirstTimer
ScanBomber > FirstTimer
FirstTimer > Slug
DwarvenEngineer > FirstTimer
HanShotFirst > FirstTimer
Turbo > FirstTimer
FirstTimer > EasterBunny
FirstTimer > Paranoid
ScanBomber > Janitor
Janitor > Slug
DwarvenEngineer > Janitor
HanShotFirst > Janitor
Turbo > Janitor
Janitor > EasterBunny
Janitor > Paranoid
ScanBomber > Slug
DwarvenEngineer > ScanBomber
HanShotFirst > ScanBomber
Turbo > ScanBomber
ScanBomber > EasterBunny
ScanBomber > Paranoid
DwarvenEngineer > Slug
HanShotFirst > Slug
Turbo > Slug
EasterBunny > Slug
Paranoid > Slug
DwarvenEngineer > HanShotFirst
Turbo > DwarvenEngineer
DwarvenEngineer > EasterBunny
DwarvenEngineer > Paranoid
Turbo > HanShotFirst
HanShotFirst > EasterBunny
HanShotFirst > Paranoid
Turbo > EasterBunny
Turbo > Paranoid
Paranoid > EasterBunny

The latest update (new versions of Turbo and Paranoid) took about 5 minutes to run on an old laptop.  I would like to thank Ilmari Karonen for his improvements to the controller.  If you have a local copy of the controller, you should update your files.

What happens if two competing bots attempt to use the same label?

@mbomb007 Labels are preprocessing thing and are calculated as the bot's source file is being parsed.  Your labels will not interact with any competitor labels.

Also, I like this challenge since I know a bit about RedCore/CoreWars, but a lot of programs already exist. In my opinion, you should change the instruction set further, or add a new instruction. Maybe, add a shared register that both programs can read/write to/from.

Also, what is the minimum distance between the two competing programs on each side?

@mbomb007 So that the programs do not overlap.  Also, I do not plan on adding any more features to this version, save those for Micro Core War.

Is a comment a semi-colon like the standard?

Also, is indirect addressing accessing the same (1st or 2nd) number of an address? Or is it always the 2nd? The '94 standard has * for indirect addressing A and @ for indirect B. And are there instruction modifiers? See here: http://vyznev.net/corewar/guide.html#start_modif

Another question: who goes first?

@mbomb007 Indirect addressing references the same field that is making the reference (1st or 2nd).  There are no instruction modifiers.  I am not basing this challenge off of the '94 standard.

I wish I had the understanding necessary to participate in this challenge.

@PhiNotPi Are we limited to 1 submission?

@Thrax I'm going to say no, that you aren't limited to one submission.  The typical multi-submission rules apply (no tag-teaming, etc.), although there's not much room for cooperation in core wars anyways.

Is it possible to set an address to be an instruction, then jump to that address? I don't know how to do it without instruction modifiers.

I'm either missing something, or there is a bug in the interpreter. Make a player 'bug.txt':mov 2 -1;jmp -1 -1. Set playerlist to sally.txt,bug,txt. Run Tournament with debug on. In the first match, on Bug's first move, it copies a DAT over Sally's location (#0). But then on the next move, Sally's original code is back, and she keeps running.

That's the output from two different games.  Notice how, when Sally "reappears," that there is an extra line of space between the two programs.  That is the controller iterating across all possible starting configurations.  I'll add an indicator to the debug output to indicate this.

I just realized that myself. Sorry for the noise.

Are the numeric values of the fields reduced modulo 8192 also for JMZ and CMP? That is, does adding 1 to 8191 yield zero, or something else? (I realize I could just check the source of the reference interpreter, but IMO this is a detail that should be documented.)

I have downloaded one from the Github but can not run the graphic view somehow, I think the file HERE is the latest version? I have changed debug to 1 and also decreased the coresize and repeats, Jframe should work but nothing happened. What should I do to see the graphic? Thanks for help, and thanks for the brilliant software :)

Somebody seems to be having technical difficulties V

Dwarven Engineer
A new and improved Dwarf.  Wins against everything else submitted so far.  The fancy corestep-optimized step size is probably overkill here.
        MOV bomb    @aim
aim     MOV bomb    @-6326
        SUB step    aim
step    JMZ #0      6328
        MOV 0       1
bomb    DAT 0       3164

Notable features include the fast bombing loop that throws two bombs in four cycles, for an average bombing speed of 0.5c in old Core War jargon, and the use of JMZ to detect when the bombing run is complete and it's time to switch to plan B (here, an Imp).

I used to play Core War back in the 90's (some of you may have seen the basic guidebook I wrote back in '97), so I thought it would be interesting to see which old strategies from the RedCode '88 / '94 world might be useful in this variant.
My first thoughts were:

There's no SPL, thus no replicators (and no imp rings/spirals).  This should make bombers strong.  (Also, all those fancy bombing strategies designed to deal with replicators and imp spirals?  Totally needless and useless here.  Just bomb with any DATs.)
Then again, CMP scanning is still potentially faster than bombing, so a fast scanner could have a chance.
The absence of in/decrements makes core clears very slow.  In fact, a core clear in this variant is pretty much just a bomber with a (suboptimal) step size of ±1.  Again, this also hurts scanners; a one-shot scanner → bomber strategy might work, though.
Quickscanners / quickbombers (an early-game strategy using an unrolled scanning / bombing loop, for those not so familar with Core War jargon) are still potentially useful, but only against long programs (which they themselves are, so there's a kind of a feedback effect here).  Hard to say if it's really worth the trouble.
The scoring system is interesting.  Ties score half as much points as a win (rather than 1/3, as in traditional Core War), making them more attractive.  Then again, about the only program likely to score lots of ties under these rules is an imp.  (Also, the absence of de/increments makes imp gates hard, so even simple imps actually do have a chance of scoring a tie if they reach their opponent alive.)
Also, because the final rankings only depend on which programs you beat, and not how much you beat them by, it tends to favor generalist entries.  It's better to just barely beat all of your opponents, than to totally destroy half of them and just barely lose to the rest.
Because the code is public, it's always possible to find a program that can beat any given earlier submission — possibly even several of them — no matter how good they are in general.  Such tricks (like tuning your step size to hit your opponent just before they hit you) can easily seem cheap, though.  And, of course, the target player could always just submit a new version with different constants.

Anyway, the upshot of all this is that I decided that I should try to write either a fast bomber or a very fast scanner, and maybe tack a quickscanner/bomber onto it.  Out of those options, a fast bomber seemed the simplest and most likely to work.
At that point, I spent way too much time tweaking and optimizing PhiNotPi's interpreter code, because I figured I'd probably be running lots of brute force trials to optimize the constants.  As it happens, I never had to do that — the code above is pretty much the first version that actually worked (after a couple of failed attempts that just committed suicide due to silly bugs).

The trick that makes my bomber fast is using indirect addressing to throw two bombs for each ADD.  Here's how it work:

On the first cycle, we execute MOV bomb @aim.  This copies the bomb instruction to whereever in the core the B-field of aim points to (initially, exactly 6326 instructions before aim, or 6328 instructions before step; you'll see why those numbers matter later).
On the next step, we execute the aim instruction itself!  On the first pass, it looks like this: MOV bomb @-6326.  Thus, it copies bomb to the location that the B-field of the instruction at 6326 lines before itself points to.
So, what is there at 6326 lines before aim?  Why, it's the copy of bomb we just placed there one cycle earlier!  And we just happened to arrange things so that the B-field of bomb has a non-zero value, so the new bomb will not be copied on top of the old one, but some distance away (in fact, here the distance is 3164, which is half of our nominal step size 6328; but other offsets could work, perhaps even better).
On the next cycle, we adjust our aim with SUB step aim, which subtracts the values of the step instruction (which also happens to be the jump we're going to execute next, although it could've been just a simple DAT somewhere) from aim.
(One detail to note here is that we kind of want the A-value of step to be zero, so that we'll still throw the same bombs on the next iteration.  Even that isn't strictly necessary, though; only the bombs thrown by the first instruction need to have their B-field equal to 3164, the rest can be anything.)
Next, the JMZ check that the instruction 6328 steps away from it is still zero, and if so, jumps back to the top of the code.  Now, 6328 is the step size of our bomber, and is divisible by 8 (but not 16); thus, if we just kept throwing bombs every 6328 steps, we'd eventually get back to where we started, having bombed every eighth instruction in the core (and with the extra bombs offset by 3163 = 6328/2 ≡ 4 (mod 8), we would've hit every fourth instruction).
But we started our bombing run at 6328 instructions before the JMZ, and stepped backwards by -6328 at every iteration, so we're going to bomb the location 6328 steps after the JMZ just one iteration before we would hit the JMZ itself.  So when the JMZ detects a bomb at 6328 instructions after it, that's a sign that we've covered as much of the core as we can without hitting ourself, and should switch to a backup strategy before we kill ourself.
As for the backup strategy, it's just a plain old MOV 0 1 imp, because I couldn't think of anything better for now.  The way I see it, if we've bombed every fourth location of the core and still haven't won, we're probably fighting something very small or very defensive, and might as well just try to survive and settle for a tie.  It's OK, because such small or defensive programs generally aren't very good at killing anything else, and so even if we only win a few fights by chance, we'll probably still come out ahead.

Ps. In case anyone else wants it, here's my slightly improved fork of PhiNotPi's tournament code.  It's about twice as fast, saves old battle results so that you don't need to re-run them, and fixes what I believe to be a minor bug in the battle results calculation. The changes have been merged into the mainline version by PhiNotPi. Thanks!

Just so you know, the scoring tests EVERY possible combination of program starting locations, and the program scoring the most wins points. This makes ties impossible or completely unfavorable since as long as a program never kills itself and bombs at least one address once, it will beat an imp, having one win, and the rest ties.

Turbo
main   add three target
test   jmz -1 @target
bomb   mov three @target
       sub j1 target
       mov jump @target
       sub j1 target
       mov copy @target
       sub j1 target
two    mov decr @target
j1     jmp @target 1
target dat -8 -8
decr   sub #two 3
copy   mov 2 @2
jump   jmp -2 0
three dat -9 -9

My 2nd ever CoreWar attempt. Designed to beat Dwarf.
Scans by 3's for data, then puts a bomb every 2.  Each stage runs in only 3 instructions, in a hope that Dwarf's bombs miss it.
NEW Turbo++:  Now enhanced.  It scans backward until it finds data, then moves itself there, then bombs backward.  The hope is that the move either clobbers the opponent, or is to a place already bombed and therefore safe(ish).
...And an edit to make it scan more sparsely makes it beat everyone!

Seems to beat a lot more than just Dwarf. Congratulations! I think you could reach third place if you only could also beat Imp.

I updated this one, but it's actually a fairly big evolution from the previous one.  Should I have made a new entry instead?

I don't presume to speak for PhiNotPi, but I'd guess it's up to you. Doing an in-place update just basically means withdrawing your old entry. Anyway, even more congratulations on successfully bomb-dodging your way to third place! I think yours is the only entry so far to beat DwarvenEngineer pairwise.

Well done ;). you are the one to beat now !

Dwarf
A common and simple program that represents a dwarf throwing stones. It places a DAT instruction every four addresses.
add 2 3
mov 2 @2
jmp -2 #4
dat #0 #4

EDIT: Fixes addressing. Apparently the addressing modes are different from the spec the OP linked to.

I think it is "add #3 3" for the first line, isn't it ?

@Hit Nope. I want to hit every 4th address. I could use add 3 3, but then it would double each loop instead of adding, and that would not be useful. #4 is an immediate, so it adds the number 4 to the 2nd value in the address that is 3 after the current address.

I think you are misinterpreting the # addressing mode in the challenge.  As stated in the spec, I made a change to the # addressing mode.

You should go like : "add 2 3
mov 2 @2
jmp -2 4
dat 0 4"

With the correct behavior it even defeats evolved

@PhiNotPi Oh, you completely changed the addressing modes, even from the spec you linked to. No wonder. I fixed it.

@Hit That's what I wanted to do. But I had pasted the Dwarf that uses the addressing modes specified in the '84 or '94 specs, which the OP changed how Immediate functions.

Graph View
This can be used as a debugging tool. It displays the core and shows the location of the player. To use it you have to call it from code. I have also provided a modifed Game.java that automatically displays the GraphView.
PhiNotPi and Ilmari Karonen recently changed the Controller. Ilmari Karonen has been kind enough to provide an updated GameView at this location.
import javax.swing.*;
import java.awt.*;

public class GameView extends JComponent{

    final static Color[] commandColors = new Color[]{
            Color.black, //DAT
            Color.blue,  //MOV
            Color.blue,  //ADD
            Color.blue,  //SUB
            Color.blue,  //JMP
            Color.blue,  //JMZ
            Color.blue,  //CMP
    };

    final static Color[] specialColors = new Color[]{
            new Color(0,0,0),
            new Color(190, 255, 152),
            Color.yellow,
            new Color(0, 93, 14),
            new Color(96, 92, 4),
            new Color(0, 93, 14),
            new Color(96, 92, 4),
            new Color(0, 93, 14),
            new Color(96, 92, 4)
    };

    final static Color playerOneColor = Color.green;
    final static Color playerTwoColor = Color.white;

    final Game game;

    int playerOneLocation;
    int playerTwoLocation;

    final static int width = 128;
    final static int height = 64;

    public GameView(Game game) {
        this.game = game;
    }

    @Override
    public void paint(Graphics g) {
        int pixelWidth = getSize().width;
        int pixelHeight = getSize().height;
        if (width > pixelWidth){
            pixelWidth = width;
            setSize(width, pixelHeight);
        }
        if (height > pixelHeight){
            pixelHeight = height;
            setSize(pixelWidth, height);
        }
        int squareWidth = Math.min(pixelWidth / width, pixelHeight / height);
        for (int x = 0; x < squareWidth * width; x += squareWidth){
            for (int y = 0; y < squareWidth * height; y += squareWidth){
                int index = (y / squareWidth) * width + (x / squareWidth);
                Color color = commandColors[game.core[index][0]];
                if (game.coreData[index] != 0){
                    color = specialColors[game.coreData[index]];
                }
                if (index == playerOneLocation){
                    color = playerOneColor;
                }
                if (index == playerTwoLocation){
                    color = playerTwoColor;
                }
                g.setColor(color);
                g.fillRect(x, y, squareWidth, squareWidth);
            }
        }
    }

    public void setLocations(int p1loc, int p2loc){
        this.playerOneLocation = p1loc;
        this.playerTwoLocation = p2loc;
    }
}

Modified Game.java:
import javax.swing.*;
import java.util.Random;
import java.util.ArrayList;
import java.util.Arrays;
/**
 * This runs a game of Core Wars between two players.  It can be called mutiple times.
 *
 * @author PhiNotPi
 * @version 3/10/15
 */
public class Game
{
    final Player p1;
    final Player p2;
    final int coreSize;
    final int coreSizeM1;
    final int maxTime;
    final int debug;
    public int[][] core;
    public int[] coreData; //Used in debugging.
    int offset1;
    int offset2;
    Random rand;
    ArrayList<int[]> p1code;
    ArrayList<int[]> p2code;
    int p1size;
    int p2size;
    GameView gameView;
    int time = 1000000; //Time in nanoseconds between frames
    public Game(Player A, Player B, int coreSize, int maxTime, int debug)
    {
        p1 = A;
        p2 = B;

        coreSize--;
        coreSize |= coreSize >> 1;
        coreSize |= coreSize >> 2;
        coreSize |= coreSize >> 4;
        coreSize |= coreSize >> 8;
        coreSize |= coreSize >> 16;
        coreSize++;

        this.coreSize = coreSize;
        this.coreSizeM1 = coreSize - 1;
        this.maxTime = maxTime / 2;
        this.debug = debug;
        core = new int[coreSize][5];
        rand = new Random();
        p1code =  p1.getCode();
        p1size = p1code.size();
        p2code =  p2.getCode();
        p2size = p2code.size();
        if (debug == 1){
            gameView = new GameView(this);
            JFrame frame = new JFrame("Game");
            frame.add(gameView);
            frame.setVisible(true);
            frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
            frame.setSize(128, 64);
            coreData = new int[coreSize];
        }
    }

    public int runAll()
    {
        int sum = 0;
        for(int i = 0; i < coreSize - p1size - p2size; i++)
        {
            sum += run(i) - 1;
        }
        if(sum > 0)
        {
            return 1;
        }
        if(sum < 0)
        {
            return -1;
        }
        return 0;
    }

    public int run()
    {
        return run(rand.nextInt(coreSize - p1size - p2size + 1));
    }

    public int run(int deltaOffset)
    {
        core = new int[coreSize][5];
        //offset1 = rand.nextInt(coreSize);
        offset1 = 0;
        for(int i = 0; i != p1size; i++)
        {
            //System.arraycopy(p1.getCode().get(i), 0, core[(offset1 + i) % coreSize], 0, 5 );
            int[] line = p1code.get(i);
            int loc = (offset1 + i) & coreSizeM1;
            core[loc][0] = line[0];
            core[loc][1] = line[1];
            core[loc][2] = line[2];
            core[loc][3] = line[3];
            core[loc][4] = line[4];
            if (debug != 0){
                coreData[loc] = 1;
            }
        }
        offset2 = offset1 + p1size + deltaOffset;
        for(int i = 0; i != p2size; i++)
        {
            //System.arraycopy(p2.getCode().get(i), 0, core[(offset2 + i) % coreSize], 0, 5 );
            int[] line = p2code.get(i);
            int loc = (offset2 + i) & coreSizeM1;
            core[loc][0] = line[0];
            core[loc][1] = line[1];
            core[loc][2] = line[2];
            core[loc][3] = line[3];
            core[loc][4] = line[4];
            if (debug != 0){
                coreData[loc] = 2;
            }
        }

        int p1loc = offset1 & coreSizeM1;
        int p2loc = offset2 & coreSizeM1;
        for(int time = 0; time != maxTime; time++)
        {
            if(debug != 0)
            {
                //printCore(p1loc,p2loc);
                //System.out.println("p1loc " + p1loc);
                //System.out.println("offset " + offset1);
                gameView.setLocations(p1loc, p2loc);
                gameView.repaint();
                try {
                    Thread.sleep(time / 1000000, time % 1000000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }

            if(core[p1loc][0] == 0)
            {
                return 0;
            }
            p1loc = execute(p1loc, offset1, 1);

            if(debug != 0)
            {
                //printCore(p1loc,p2loc);
                //System.out.println("p2loc " + p2loc);
                //System.out.println("offset " + offset2);
                gameView.setLocations(p1loc, p2loc);
                gameView.repaint();
                /*try {
                    Thread.sleep(time);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }*/
            }
            if(core[p2loc][0] == 0)
            {
                return 2;
            }
            p2loc = execute(p2loc, offset2, 2);

        }
        return 1;
    }
    public int execute(int ploc, int offset, int player)
    {
        int line1 = offset + core[ploc][3];
        if(core[ploc][1] != 0)
        {
            line1 += ploc - offset;
        }
        if(core[ploc][1] == 2)
        {
            line1 += core[line1 & coreSizeM1][3];
        }
        int line2 = offset + core[ploc][4];
        if(core[ploc][2] != 0)
        {
            line2 += ploc - offset;
        }
        if(core[ploc][2] == 2)
        {
            line2 += core[line2 & coreSizeM1][4];
        }
        line1 = line1 & coreSizeM1;
        line2 = line2 & coreSizeM1;
        int opcode = core[ploc][0];
        ploc = (ploc + 1) & coreSizeM1;
        //String opDescription = "";
        if(opcode == 1)
        {
            core[line2][0] = core[line1][0];
            core[line2][1] = core[line1][1];
            core[line2][2] = core[line1][2];
            core[line2][3] = core[line1][3];
            core[line2][4] = core[line1][4];
            if (debug != 0) {
                coreData[line2] = player + 2;
            }
            return ploc;
            //opDescription = "Moved from " + line1 + " to " + line2;
        }
        if(opcode == 2)
        {
            core[line2][3] += core[line1][3];
            core[line2][4] += core[line1][4];
            if (debug != 0) {
                coreData[line2] = player + 4;
            }
            return ploc;
            //opDescription = "Added " + line1 + " to " + line2;
        }
        if(opcode == 3)
        {
            core[line2][3] -= core[line1][3];
            core[line2][4] -= core[line1][4];
            if (debug != 0) {
                coreData[line2] = player + 6;
            }
            return ploc;
                //opDescription = "Subtracted " + line1 + " to " + line2;
        }
        if(opcode == 4)
        {
            ploc = line1;
            return ploc;
                //opDescription = "Jumped to " + line1;
        }
        if(opcode == 5)
        {
                if(core[line2][3] == 0 && core[line2][4] == 0)
                {
                    ploc = line1;
                    //opDescription = "Jumped to " + line1;
                }
                else
                {
                    //opDescription = "Did not jump to " + line1;
                }
                return ploc;
        }
        if(opcode == 6)
        {
            if(core[line1][3] == core[line2][3] && core[line1][4] == core[line2][4])
            {
                //opDescription = "Did not skip because " + line1 + " and " + line2 + " were equal.";
            }
            else
            {
                ploc = (ploc + 1) & coreSizeM1;
                //opDescription = "Skipped because " + line1 + " and " + line2 + " were not equal.";
            }
            return ploc;
        }
        if(debug != 0)
        {
            //System.out.println(opDescription);
        }
        return ploc;
    }
    /*public void printCore(int p1loc, int p2loc)
    {
        int dupCount = 0;
        int[] dupLine = new int[]{0,0,0,0,0};
        for(int i = 0; i < core.length; i++)
        {
            int[] line = core[i];
            if(Arrays.equals(line, dupLine) && i != p1loc && i != p2loc)
            {
                if(dupCount == 0)
                {
                    System.out.println(Player.toString(line));
                }
                dupCount++;
            }
            else
            {
                if(dupCount == 2)
                {
                    System.out.println(Player.toString(dupLine));
                }
                else if(dupCount > 2)
                {
                    System.out.println("    " + (dupCount - 1) + " lines skipped.");
                }
                System.out.println(Player.toString(line));
                if(i == p1loc)
                {
                    System.out.print(" <- 1");
                }
                if(i == p2loc)
                {
                    System.out.print(" <- 2");
                }
                dupLine = line;
                dupCount = 1;
            }
        }
        if(dupCount == 2)
        {
            System.out.println(Player.toString(dupLine));
        }
        else if(dupCount > 2)
        {
            System.out.println("    " + (dupCount - 1) + " lines skipped.");
        }
    }*/
}

It looks like you made a modification to Player also.  I get ./Game.java:275: error: method toString in class Object cannot be applied to given types;                     System.out.println(Player.toString(line));                                              ^   required: no arguments   found: int[]

@AShelly Sorry about that. I should of commented out the printCore() method.

Evolved
I honestly don't get how it works. It seems to construct its source code before doing anything. I would love it if someone gave me an explanation for how it works.
After studying it, I found that it is simply a modified dwarf with an imp guard. Instead of bombing the enemies with DAT instructions, it shuffles the enemies code. It also bombs every two registers instead of every four registers. Given enough time, it would undoubtedly destroy itself.
MOV -2 #-1
MOV #4 -9
SUB -5 #6
MOV #1 1
MOV #-6 #4
SUB @8 @7
JMP -3 @4
DAT #-4 8
JMP -1 9
JMP 5 #-10
CMP @-1 #0
SUB 3 #-10
JMP @10 #-9
JMZ #1 10
MOV #3 2
ADD @9 @-3
CMP #-3 @7
DAT @0 @-2
JMP @-7 #6
DAT @-8 -6
MOV @0 #9
MOV #2 1
DAT @6882 #-10
JMP @3 4
CMP @8 2
ADD -7 @11
ADD @1 #-9
JMZ @-5 7
CMP 11 5526
MOV @8 6
SUB -6 @0
JMP 1 11
ADD @-3 #-8
JMZ @-14 @-5
ADD 0 @-8
SUB #3 @9
JMP #-1 5
JMP #9 @1
CMP -9 @0
SUB #4 #-2
JMP #-8 5
DAT -1 @-10
MOV 6 #2
CMP @-11 #-14
ADD @4 @-3
MOV @5 #-6
SUB -3 -2
DAT @-10 #-1
MOV #-13 #-6
MOV #1 5
ADD 5 #-5
MOV -8 @-1
DAT 0 10
DAT #5 #7
JMZ 6 -5
JMZ -12 -11
JMP 5 @-7
MOV #7 -3
SUB #-7 @-3
JMP -4 @-11
CMP @-5 #-2
JMZ @-1 #0
ADD #3 #2
MOV #5 @-6

Then where did you get it?

@PyRulez It's computer generated via genetic algorithm.

It looks like execution doesn't actually progress farther than line #6, because there it jumps back in the program.  I believe the reason it succeeds is that there are more moves/loop than its competitors.

CopyPasta
Never participated to a CoreWar, this simple program is just trying to copy-paste himself and then execute the copy. It may not have the correct behavior, please tell me if it is the case.
It is too pacifist and can't win in fact.
MOV 6 0
MOV @-1 @-1
CMP @-2 3
JMP 4242 0
SUB -3 -4
JMP -4 0
DAT 0 4244

This current edit is probably not going to be in the next leaderboard update (I'm running the tournament right now).  The old version, however, was winning the (small core size) preliminary results.

Okay :) The older version does not go out of the loop1, it is not really the wanted behavior, I'm trying to correct that.

The current version seems broken.  I don't know why, yet.

I've revamped the debugging tools, so now I can diagnose the problem.  What is happening is that the program only copies the second half of itself (starting at JMP loop 0).  Then, when it jumps to where the start of the copy should be, it's just empty space and it loses.

Please ignore my earlier (now deleted) comment; I had tested an incorrect version of your code (ironically, because of a copy-paste mistake), which was why it worked so poorly for me.

Janitor
It should check if the following addresses are empty and if not it cleans them (thus, hopefully, erasing the opponent bot).
Edit: This new version should be quicker (now that I understood the JMZ command and the @ reference correctly).
JMZ 2 6
MOV 4 @-1
ADD 2 -2
JMP -3 0
DAT 0 1
DAT 0 0

Isn't the janitor commiting suicide with the first JMZ ? It should be at least JMZ 2 8. By the way using @ you could reduce the two add to only one. Something like : "JMZ 2 @5 MOV 5 @4 ADD 2 3 JMP -3 0 DAT 0 1 DAT 0 2 DAT 0 0" (untested)

@Hit It doesn't jump, because the address 2 from there is ADD 3 -2, but you're right that he should change it, I think.

Yes i misread the instruction for JMZ and thought JMZ A B was checking A and jumping to B if 0 when apparently it s the opposite. Thanks for noticing because I didn't :)

FirstTimer
If it does work, it should try to take position at the start of the core and create a defens
main MOV 5 #0
     ADD #data #main
     CMP #main #max
     JMP #0 0
     JMP #main 0
     MOV #data #100
     ADD #data -1
     JMP -2 0
data DAT 1 1
max  DAT 8 3

It doesn't quite work the way I think you assumed it would: #0 refers to the start of your program (i.e. the same as #main), not to the start of the core (which is not really a meaningful concept anyway -- the core is circular, your code cannot tell where it starts or ends). What happens is that your first instruction (main) overwrites itself with the MOV #data #100, after which your code effectively turns into a 0.25c (= one instruction per four cycles) forward core clear.

@IlmariKaronen Oh, thanks for the explaination. I did mistake #0 for the start of the core. The 5 first instructions are completely useless then.

ScanBomber
Remove my comments before compiling. Scans for a while, then bombs when it finds a program. It probably will still lose to my Dwarf, though.
scan add #eight #range  ; scan
jmz #scan @range
sub #six #range
fire mov #zero @range   ; bombs away! (-6)
add #two #range
mov #zero @range
add #two #range
mov #zero @range
add #two #range
mov #zero @range        ; (+0)
add #two #range
mov #zero @range
add #two #range
mov #zero @range
add #two #range
mov #zero @range
add #two #range
mov #zero @range        ; (+8)
range jmp #scan 6
two dat 0 2
six dat 0 6
zero dat 0 0
eight dat 0 8

The OP defined # completely differently than the spec (read the link he linked to), I have yet to fix this program for it.

@TheBestOne I think I fixed it. Does it look like it makes sense now? Or do I need to put # before every reference to zero? Yeah, I think I need to...

It works well now. It beats every bot except Dwarf and Imp.

@TheBestOne Dwarf is too small and would only be detected in 50% of the possible program placement. It likely only loses to Imp because it bombs itself after going around the entirety of the memory.

Han Shot First (v2)
I figured the competition could use some more diversity, so here's my second entry: a one-shot CMP scanner.
This is version 2, with improved anti-Imp defenses — it can now beat Imp, if only by just one point.  It still loses to Dwarven Engineer, but beats everything else so far, putting it currently in tied first place.
scan    ADD bomb    aim
aim     CMP 17      12
        JMZ scan    #-3
loop    MOV bomb    @aim
        ADD step    aim
step    JMP loop    #2
bomb    DAT 10      10

It works by comparing adjacent core locations 5 steps apart, at 10-step intervals, until it finds a difference.  When it does, it starts throwing bombs at 2-step intervals until it kills its opponent or loops all the way around the core to reach itself.
If the scan does not find anything else, it will eventually loop around and find its own code and attack it.  This would be suicidal, but for the fortunate coincidence that the first bomb lands squarely on the aim line, causing the next bomb to be thrown 12 positions (rather than the usual 2) down the core, conveniently skipping the code.  (This also happens with 50% probability if the scan does find something, but fails to kill the opponent.)  Since the core size is a multiple of two, this will also keep happening if the bombing run loops around, eliminating the need for a further backup strategy.
(This self-bombing trick was originally a pure coincidence — I had planned for a completely different way to switch from scanning to bombing mode if nothing was found, but when I first tested the code, the constants just happened to be right to make it work this way, and I decided to stick with it.)

Imp
MOV 0 1

Simply inches through the program.

Slug
     mov    ones    @-1024
     mov    from    -3
     mov    here    -3
loop mov    @-5 @-4
     add    ones  -5
     jmz    -17 -6
     add    ones  -8
     jmp    loop    42
ones dat    1   1
from dat    2   2
here dat    -11 -11

Crawls through memory space backwards. Occasionally throws a bomb far away.

Paranoid
Kind of a copy-pasta but it will check if the code have been modified by bombing. If so it copy past a dwarf and execute it. If I manage to make the GameView again I'll try to change some of the constants.
copy    MOV data copy
loop    MOV @-1 @-1
    CMP @copy end
out JMP check 0
    SUB loop copy
    JMP loop 0
data    DAT 0 4109
check   MOV data copy
loop2   CMP @copy @copy
    JMP ok 0
    MOV aah 2
ok  CMP @copy end
    JMP 4098 0
    SUB loop copy
    JMP loop2 0
panic   MOV end copy
    MOV jump out
    JMP loop 0
jump    JMP 4124 0
dwarf   ADD 2 bomb
    MOV bomb @bomb
    JMP dwarf 4
bomb    DAT 0 4
aah JMP 3 0
end DAT 19 4127

Okay, in fact it is working and I was just messign around, thanks for the new run ;)

Easter Bunny
He enjoys hopping backwards :)
loop mov 0 -10
     add data loop
     cmp -7 data
     jmp -13 0
     jmp loop 0
data dat 1 1


text:
Gotta Match Them All! Write a regex to match the original 151 Pokemon but no subsequent Pokemon
The original 151 Pokemon, in an array format suitable for initializers:
["Bulbasaur", "Ivysaur", "Venusaur", "Charmander", "Charmeleon", "Charizard", "Squirtle", "Wartortle", "Blastoise", "Caterpie", "Metapod", "Butterfree", "Weedle", "Kakuna", "Beedrill", "Pidgey", "Pidgeotto", "Pidgeot", "Rattata", "Raticate", "Spearow", "Fearow", "Ekans", "Arbok", "Pikachu", "Raichu", "Sandshrew", "Sandslash", "Nidorina", "Nidoqueen", "Nidoran", "Nidorino", "Nidoking", "Clefairy", "Clefable", "Vulpix", "Ninetales", "Jigglypuff", "Wigglytuff", "Zubat", "Golbat", "Oddish", "Gloom", "Vileplume", "Paras", "Parasect", "Venonat", "Venomoth", "Diglett", "Dugtrio", "Meowth", "Persian", "Psyduck", "Golduck", "Mankey", "Primeape", "Growlithe", "Arcanine", "Poliwag", "Poliwhirl", "Poliwrath", "Abra", "Kadabra", "Alakazam", "Machop", "Machoke", "Machamp", "Bellsprout", "Weepinbell", "Victreebel", "Tentacool", "Tentacruel", "Geodude", "Graveler", "Golem", "Ponyta", "Rapidash", "Slowpoke", "Slowbro", "Magnemite", "Magneton", "Farfetch'd", "Doduo", "Dodrio", "Seel", "Dewgong", "Grimer", "Muk", "Shellder", "Cloyster", "Gastly", "Haunter", "Gengar", "Onix", "Drowzee", "Hypno", "Krabby", "Kingler", "Voltorb", "Electrode", "Exeggcute", "Exeggutor", "Cubone", "Marowak", "Hitmonlee", "Hitmonchan", "Lickitung", "Koffing", "Weezing", "Rhyhorn", "Rhydon", "Chansey", "Tangela", "Kangaskhan", "Horsea", "Seadra", "Goldeen", "Seaking", "Staryu", "Starmie", "Mr. Mime", "Scyther", "Jynx", "Electabuzz", "Magmar", "Pinsir", "Tauros", "Magikarp", "Gyarados", "Lapras", "Ditto", "Eevee", "Vaporeon", "Jolteon", "Flareon", "Porygon", "Omanyte", "Omastar", "Kabuto", "Kabutops", "Aerodactyl", "Snorlax", "Articuno", "Zapdos", "Moltres", "Dratini", "Dragonair", "Dragonite", "Mewtwo", "Mew"]

I have omitted the male-female Nidoran distinction because it shouldn't affect any regex generation.
And all subsequent Pokemon:
["Chikorita", "Bayleef", "Meganium", "Cyndaquil", "Quilava", "Typhlosion", "Totodile", "Croconaw", "Feraligatr", "Sentret", "Furret", "Hoothoot", "Noctowl", "Ledyba", "Ledian", "Spinarak", "Ariados", "Crobat", "Chinchou", "Lanturn", "Pichu", "Cleffa", "Igglybuff", "Togepi", "Togetic", "Natu", "Xatu", "Mareep", "Flaaffy", "Ampharos", "Bellossom", "Marill", "Azumarill", "Sudowoodo", "Politoed", "Hoppip", "Skiploom", "Jumpluff", "Aipom", "Sunkern", "Sunflora", "Yanma", "Wooper", "Quagsire", "Espeon", "Umbreon", "Murkrow", "Slowking", "Misdreavus", "Unown", "Wobbuffet", "Girafarig", "Pineco", "Forretress", "Dunsparce", "Gligar", "Steelix", "Snubbull", "Granbull", "Qwilfish", "Scizor", "Shuckle", "Heracross", "Sneasel", "Teddiursa", "Ursaring", "Slugma", "Magcargo", "Swinub", "Piloswine", "Corsola", "Remoraid", "Octillery", "Delibird", "Mantine", "Skarmory", "Houndour", "Houndoom", "Kingdra", "Phanpy", "Donphan", "Porygon2", "Stantler", "Smeargle", "Tyrogue", "Hitmontop", "Smoochum", "Elekid", "Magby", "Miltank", "Blissey", "Raikou", "Entei", "Suicune", "Larvitar", "Pupitar", "Tyranitar", "Lugia", "Ho-Oh", "Celebi", "Treecko", "Grovyle", "Sceptile", "Torchic", "Combusken", "Blaziken", "Mudkip", "Marshtomp", "Swampert", "Poochyena", "Mightyena", "Zigzagoon", "Linoone", "Wurmple", "Silcoon", "Beautifly", "Cascoon", "Dustox", "Lotad", "Lombre", "Ludicolo", "Seedot", "Nuzleaf", "Shiftry", "Taillow", "Swellow", "Wingull", "Pelipper", "Ralts", "Kirlia", "Gardevoir", "Surskit", "Masquerain", "Shroomish", "Breloom", "Slakoth", "Vigoroth", "Slaking", "Nincada", "Ninjask", "Shedinja", "Whismur", "Loudred", "Exploud", "Makuhita", "Hariyama", "Azurill", "Nosepass", "Skitty", "Delcatty", "Sableye", "Mawile", "Aron", "Lairon", "Aggron", "Meditite", "Medicham", "Electrike", "Manectric", "Plusle", "Minun", "Volbeat", "Illumise", "Roselia", "Gulpin", "Swalot", "Carvanha", "Sharpedo", "Wailmer", "Wailord", "Numel", "Camerupt", "Torkoal", "Spoink", "Grumpig", "Spinda", "Trapinch", "Vibrava", "Flygon", "Cacnea", "Cacturne", "Swablu", "Altaria", "Zangoose", "Seviper", "Lunatone", "Solrock", "Barboach", "Whiscash", "Corphish", "Crawdaunt", "Baltoy", "Claydol", "Lileep", "Cradily", "Anorith", "Armaldo", "Feebas", "Milotic", "Castform", "Kecleon", "Shuppet", "Banette", "Duskull", "Dusclops", "Tropius", "Chimecho", "Absol", "Wynaut", "Snorunt", "Glalie", "Spheal", "Sealeo", "Walrein", "Clamperl", "Huntail", "Gorebyss", "Relicanth", "Luvdisc", "Bagon", "Shelgon", "Salamence", "Beldum", "Metang", "Metagross", "Regirock", "Regice", "Registeel", "Latias", "Latios", "Kyogre", "Groudon", "Rayquaza", "Jirachi", "Deoxys", "Turtwig", "Grotle", "Torterra", "Chimchar", "Monferno", "Infernape", "Piplup", "Prinplup", "Empoleon", "Starly", "Staravia", "Staraptor", "Bidoof", "Bibarel", "Kricketot", "Kricketune", "Shinx", "Luxio", "Luxray", "Budew", "Roserade", "Cranidos", "Rampardos", "Shieldon", "Bastiodon", "Burmy", "Wormadam", "Mothim", "Combee", "Vespiquen", "Pachirisu", "Buizel", "Floatzel", "Cherubi", "Cherrim", "Shellos", "Gastrodon", "Ambipom", "Drifloon", "Drifblim", "Buneary", "Lopunny", "Mismagius", "Honchkrow", "Glameow", "Purugly", "Chingling", "Stunky", "Skuntank", "Bronzor", "Bronzong", "Bonsly", "Mime Jr.", "Happiny", "Chatot", "Spiritomb", "Gible", "Gabite", "Garchomp", "Munchlax", "Riolu", "Lucario", "Hippopotas", "Hippowdon", "Skorupi", "Drapion", "Croagunk", "Toxicroak", "Carnivine", "Finneon", "Lumineon", "Mantyke", "Snover", "Abomasnow", "Weavile", "Magnezone", "Lickilicky", "Rhyperior", "Tangrowth", "Electivire", "Magmortar", "Togekiss", "Yanmega", "Leafeon", "Glaceon", "Gliscor", "Mamoswine", "Porygon-Z", "Gallade", "Probopass", "Dusknoir", "Froslass", "Rotom", "Uxie", "Mesprit", "Azelf", "Dialga", "Palkia", "Heatran", "Regigigas", "Giratina", "Cresselia", "Phione", "Manaphy", "Darkrai", "Shaymin", "Arceus", "Victini", "Snivy", "Servine", "Serperior", "Tepig", "Pignite", "Emboar", "Oshawott", "Dewott", "Samurott", "Patrat", "Watchog", "Lillipup", "Herdier", "Stoutland", "Purrloin", "Liepard", "Pansage", "Simisage", "Pansear", "Simisear", "Panpour", "Simipour", "Munna", "Musharna", "Pidove", "Tranquill", "Unfezant", "Blitzle", "Zebstrika", "Roggenrola", "Boldore", "Gigalith", "Woobat", "Swoobat", "Drilbur", "Excadrill", "Audino", "Timburr", "Gurdurr", "Conkeldurr", "Tympole", "Palpitoad", "Seismitoad", "Throh", "Sawk", "Sewaddle", "Swadloon", "Leavanny", "Venipede", "Whirlipede", "Scolipede", "Cottonee", "Whimsicott", "Petilil", "Lilligant", "Basculin", "Sandile", "Krokorok", "Krookodile", "Darumaka", "Darmanitan", "Maractus", "Dwebble", "Crustle", "Scraggy", "Scrafty", "Sigilyph", "Yamask", "Cofagrigus", "Tirtouga", "Carracosta", "Archen", "Archeops", "Trubbish", "Garbodor", "Zorua", "Zoroark", "Minccino", "Cinccino", "Gothita", "Gothorita", "Gothitelle", "Solosis", "Duosion", "Reuniclus", "Ducklett", "Swanna", "Vanillite", "Vanillish", "Vanilluxe", "Deerling", "Sawsbuck", "Emolga", "Karrablast", "Escavalier", "Foongus", "Amoonguss", "Frillish", "Jellicent", "Alomomola", "Joltik", "Galvantula", "Ferroseed", "Ferrothorn", "Klink", "Klang", "Klinklang", "Tynamo", "Eelektrik", "Eelektross", "Elgyem", "Beheeyem", "Litwick", "Lampent", "Chandelure", "Axew", "Fraxure", "Haxorus", "Cubchoo", "Beartic", "Cryogonal", "Shelmet", "Accelgor", "Stunfisk", "Mienfoo", "Mienshao", "Druddigon", "Golett", "Golurk", "Pawniard", "Bisharp", "Bouffalant", "Rufflet", "Braviary", "Vullaby", "Mandibuzz", "Heatmor", "Durant", "Deino", "Zweilous", "Hydreigon", "Larvesta", "Volcarona", "Cobalion", "Terrakion", "Virizion", "Tornadus", "Thundurus", "Reshiram", "Zekrom", "Landorus", "Kyurem", "Keldeo", "Meloetta", "Genesect", "Chespin", "Quilladin", "Chesnaught", "Fennekin", "Braixen", "Delphox", "Froakie", "Frogadier", "Greninja", "Bunnelby", "Diggersby", "Fletchling", "Fletchinder", "Talonflame", "Scatterbug", "Spewpa", "Vivillon", "Litleo", "Pyroar", "Flabébé", "Floette", "Florges", "Skiddo", "Gogoat", "Pancham", "Pangoro", "Furfrou", "Espurr", "Meowstic", "Honedge", "Doublade", "Aegislash", "Spritzee", "Aromatisse", "Swirlix", "Slurpuff", "Inkay", "Malamar", "Binacle", "Barbaracle", "Skrelp", "Dragalge", "Clauncher", "Clawitzer", "Helioptile", "Heliolisk", "Tyrunt", "Tyrantrum", "Amaura", "Aurorus", "Sylveon", "Hawlucha", "Dedenne", "Carbink", "Goomy", "Sliggoo", "Goodra", "Klefki", "Phantump", "Trevenant", "Pumpkaboo", "Gourgeist", "Bergmite", "Avalugg", "Noibat", "Noivern", "Xerneas", "Yveltal", "Zygarde", "Diancie"]

You decided Mew isn't an "original"? Poor Mew...

I'm with @Bigtoes, why are we excluding Mew?

Fixed, since everyone complained. I'm not a Pokemon fan.

How are you gonna check whether the answers are valid?

@flawr Peter Norvig wrote a regex golf validation function along with the solver.

You forgot Hoopa and Volcanion at the end.

@JoeZ. I'm going by the Wikipedia list of Pokemon. At the time I had compiled this list (several months ago) Hoopa was not on the list. Volcanion is not mentioned in the article.

Most flavours, 332 331 326 325 304 bytes
tly|glo|pix|y.?t|key|d.*sh|dod|iw|ung|r.*me|sa?.r$|ras|abr|aic|mac|g.e.*t|t.i?o$|wb|z..d|wg|kh|rs.a|le?s|lld|a.ow|yh|pn|(or.+o|g.*le|(gm|ub.?|o.l|(id.+|a.+n|olt|onc).).).$|^(..(.([lx]?$|g.y|fa|i?ka)|an?s|yd|eg)|.?ra?[bt]|vi.*e|f.?ar|ko|gy)|(t.r.|rt|ow.*|v|w).e|[kt]a.*u|g.l[abd]|e(ak|no|n.a|.dr|o.t|.*od)

Thanks to EMBLEM I had to revamp and restart, building a regex with a back-and-forth relay of manual part selection and Peter Norvig's golfer. Saved a whole bunch of bytes, and probably more is still possible, so I guess it was worth it?
Tested on Regex101 (includes hoopa and volcanion, since they aren't matched anyway)
If anyone's wondering, seel is the biggest pain to match, thanks to registeel and seedot in the other list. Other hard-to-match Pokemon include hitmonchan (thanks to hitmontop and chandelure/donphan),jolteon (thanks to joltik and half the eevee evolutions) and porygon (thanks to flygon and porygon2/porygon-z)

[lx]? can safely be changed to l?x? to save a byte

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Write an interpreter for 99
99 (pronounced "ninety-nine") is a brand new Esoteric programming language (not to be confused with 99, note the italics). Your task in this challenge is to write an interpreter for 99 that is as short as possible. The submission with the fewest bytes wins. Tiebreaker goes to the submission posted first.
Since this question is a bit more in depth than usual, and I'm eager to see good answers, I'll be awarding a 250 rep bounty to my favorite answer (not necessarily the winner).
99 Spec
99 is an imperative language. Each line in a 99 program is a single statement, and during execution, the instruction pointer starts at the top line and goes through each of the subsequent lines in order, executing them along the way. The program ends when the last line has been executed. Goto statements may reroute the path of the instruction pointer.
Newline, space, and 9 are the only three characters that matter in a 99 program. All other characters are completely ignored. Additionally, trailing spaces on each line are ignored, and multiple spaces in a row are read as one space. ("Newline" refers to any common line break encoding. It doesn't matter which one your interpreter uses.)
So this program:
   9      BLAH        99   9a9bb9c9
9 this line and the next have 6 trailing spaces 9

Is identical to this program:
 9 99 9999
9 9

Variables
Variables in 99 all have names that are one or more 9's strung together (9+ in regex). For example, 9, 99, and 9999999999 are all distinct variables. Naturally, there are infinitely many (barring memory limitations).
The value of each variable is a signed, arbitrary precision integer. By default, each variable is assigned to its own numeric representation. So unless it has been reassigned, the value of the variable 9 is the number 9, and the value of the variable 99 is the number 99, and so on. You could think of it as treating the variables as plain numbers until they are explicitly assigned.
I will use V to refer to an arbitrary variable name below.
Each instance of V could be replaced with 9, 99, 999, 9999, etc.
Statements
There are five different statement types in 99. Each line in a 99 program contains exactly one statement.
The syntax described here assumes all extraneous characters have been removed, all trailing spaces have been removed, and all sequences of multiple spaces have been replaced with single spaces.
1. No Operation

An empty line is a no-op. It does nothing (besides incrementing the instruction pointer).
2. Output
V

A single variable V on a line prints that variable to stdout.
If V has an odd number of 9's (9, 999, etc.) then the integer value of V divided by 9 will be printed (in decimal).
If V has an even number of 9's (99, 9999, etc.) then the ASCII character with code V divided by 9, mod 128 will be printed. (That's (V / 9) % 128, a value from 0 to 127.)
Example: The program
9
9999

would print 1W. The first line prints 1 because 9/9 is 1. The second line prints W because 9999/9 is 1111, and 1111 mod 128 is 87, and 87 is the character code for W.
Note that line breaks are not printed between output tokens. \n needs to be explicitly printed for a line break.
3. Input
 V

A single variable V on a line with a leading space takes input from stdin and stores it in that variable.
If V has an odd number of 9's then the user may type in any signed integer, and V will be set to 9 times that value.
If V has an even number of 9's then the user may type in any ASCII character, and V will be set to 9 times its character code.
Example: Given -57 and A as input, this program
 9
9
 99
99

would output -57A. Internally, the variable 9 would have the value -513, and 99 would have the value 585.
Your interpreter may assume that the inputs are always syntactically valid.
4. Assignment
This statement can be arbitrarily long. It is two or more variables on a line, separated by spaces:
V1 V2 V3 V4 V5 ...

This assigns V1 to the sum of all the V's with even indices, minus the sum of the V's with odd indices (excluding V1). Assignments are by value, not by reference.
It could be translated in most languages as V1 = V2 - V3 + V4 - V5 + ....
So, if there are only two variables, it's normal assignment:
V1 V2 → V1 = V2
If there are three, then it's subtraction:
V1 V2 V3 → V1 = V2 - V3
And the +/- sign keeps switching back and forth with each additional variable:
V1 V2 V3 V4 → V1 = V2 - V3 + V4
Example: This program would output 1110123:
999           Prints triple-nine divided by nine (111).
999 9 9       Assigns triple-nine to zero (nine minus nine).
999           Prints triple-nine divided by nine (0)
9 999 9       Assigns single-nine to negative nine (zero minus nine).
999 999 9     Adds nine to triple-nine (really subtracts negative nine).
999           Prints triple-nine divided by nine (1).
999 999 9     Adds nine to triple-nine (really subtracts negative nine).
999           Prints triple-nine divided by nine (2).
999 999 9     Adds nine to triple-nine (really subtracts negative nine).
999           Prints triple-nine divided by nine (3).

5. Goto (jump if all zero)
This statement can also be arbitrarily long. It is two or more variables on a line, separated by spaces, with a leading space:
 V1 V2 V3 V4 V5 ...

If some of the values besides V1 are non-zero, then this behaves just like a no-op. The instruction pointer is moved to the next line as usual.
If all of the values besides V1 are zero, then the instruction pointer is moved to line number V1. The lines are zero-indexed, so if V1 is zero, then the pointer moves to the top line. The program terminates (normally, without error) if V1 is negative or is larger than the highest possible index (number of lines minus one).
Note that V1 was not divided by 9 here. And since it's impossible to have a variable be a value that's not a multiple of 9, only line numbers that are multiples of 9 can be jumped to.
Examples:
This program will print 1's forever:
9          Prints single-nine divided by nine (always 1).
99 9 9     Assigns double-nine to zero.
 99 99     Jumps to line zero (top line) if double-nine is zero.

This program
99999999                                              Print G.
999 99                                                Set triple-nine to ninety-nine.
9999999999 9999999999 9999999999 99 99 9 9 999 999    Set 10-nine to zero.
99999999999 9999999999                                Set 11-nine to zero.

999                                                   Print triple-nine's value divided by nine. (This is the ninth line.)
99999999                                              Print G.
999 999 9                                             Subtract nine from triple-nine.
 99999 999                                            Jump to line 5-nines if triple-nine is zero (ends program).
 9 99999999999 9999999999                             Jump to line nine if 10-nine and 11-nine are zero (always jumps).

will output the numbers 11 to 1, in decreasing order, surrounded by G's:
G11G10G9G8G7G6G5G4G3G2G1G

Additional Details
The ideal interpreter will run from the command line with the 99 program file name as an argument. The I/O will also be done on the fly in the command line.
You may, however, just write an interpreter function that takes in the program as a string as well as a list of the input tokens (e.g. ["-57", "A"]). The function should print or return the output string.
Slightly different ways of running the interpreter and handling I/O are fine if these options are impossible in your language.

Bonus: Write something cool in 99 and I'll gladly put it in this post as an example.

Here's a Pastebin of a neat "99 Bottles of Beer" program from Mac's answer.

Hope you enjoyed my 99th challenge! :D

I considered upvoting, but your current score is 9…

@WChargin looks like now you'll have to try to get it 99.

Surely there's a bonus for self-hosting (writing a 99 interpreter in 99), no?

@Gabe An answer like that probably would get the bounty, but if that were the only answer, what would interpret the interpreter? ;)

@Calvin'sHobbies: I think there may be a bug in my solution. Can you confirm that 9a9a is equivalent to 99, not 9 9  (as my code currently is implemented)?

@Mac Yes, 9a9a should become 99.

Bounty is for . ?

@Optimizer You'll find out in a week when the bounty ends. (By that I mean I'm milking the challenge by keeping it featured.)

But you said that "one of the answers deserve the bounty" - which means its for one of the existing ones. So it would not help in milking the challenge much.

@Optimizer But it may get a few more views if it stays featured ;) (Besides, you don't even have an answer...or do you...)

Maybe I have, or maybe not ;)

Are you sure that the 99 bottles program is correct ? Seems to hang the browser for me..

@Optimizer it works: http://pastebin.com/raw.php?i=h73q58FN

@coredump "1 bottles of beer on the wall"

@Sp3000 Optimizer seemed to doubt that program actually halted, that's why I produced a trace. I have no doubt it could be possible to take care of singular forms in the 99 program, but I am not going to fix it. I am already quite amazed that Mac managed to produce the above version.

94 votes, almost there! (+1)

I'm the 99th upvote. Do I get a cookie?

@Quintec ugh, I came here to upvote, but it's at a score of 99, so I can't.

I can't bring myself to upvote.

Ok. Who upvoted this from 99 to 100?

@Calvin'sHobbies Don't worry, I downvoted to restore the balance :-P

CJam, 157 bytes
{:I;_N" 9"+--N/:P:,$W=){1a*Ab}%:V;{PT):T(=:LS%_{LS#\:,_,({(\{V=}%@{V-1@{2$*+0@-\}*\;t:V;}{:|T@V=9*?:T;}?}{~\{_V=\1&!{128%c}*o}{VIW):W=it:V;}?}?}R?Tg)TP,<*}g}

Try it online:

I/O Test
G11G10G9G8G7G6G5G4G3G2G1G
99 bottles of beer (this code is too long to fit in a URL, so copy the code and paste it into the interpreter manually)

Explanation
Trying to format this with proper indentation and comments would probably take forever, so I'll just give an algorithmic summary.
The code is a block, CJam's analog to anonymous functions. The block expects the program string and list of inputs on the stack when executed.
Initialization consists of three steps. First, the input list is saved. Then, every character in the program that isn't meaningful is removed and the result is split into a list of lines and saved. Finally, the variable list is initialized. This list maps each variable, indexed by name length, to its value divided by 9 (a variable can never hold a value that's not a multiple of 9, and all operations except goto benefit from this change). The list is initialized up to the length of the longest line, which is an upper bound on the longest varaible name present. There's also a bit of implicit initialization due to initial variable values: the line number is 0 and the input index is -1.
The interpreter is implemented as one would expect: a loop that reads the next line, increments the line number, and executes the line while the line number points to an existing line. Line parsing first checks that the line isn't empty, then branches based on whether the arity is 1 or >1, then branches based on whether there was a leading space. These four branches emulate the four (excluding no-op) operations in a mostly straightforward manner, albeit agressively golfed like everything else. Perhaps one optimization of note is that, since a valid input sequence should always produce an element of type expected by the program, I omitted making separate cases for input based on the length of the variable name. It is simply assumed that the element read from the input list is of the expected type.

+1. Quite short. Now, can you write a CJam interpreter in 99? ;-)

@coredump *shudders*

Damn, I can only get 195 and then I lost hope and gave up :P

This doesn't take the correct modulo when printing negative values. This can be fixed by replacing 128% with 128,=.

Python 3, 421 414 410 404 388 395 401 bytes
Golfed:
import sys,re
v,i,c,g,L={},0,[re.sub('( ?)[^9]+','\\1',l).rstrip().split(' ')for l in open(sys.argv[1])],lambda i:v.get(i,int(i)//9),len
while-1<i<L(c):
 d=c[i];l=L(d);e,*f=d;i+=1
 if l>1:
  x,*y=f
  if e:w=list(map(g,f));v[e]=sum(w[::2])-sum(w[1::2])
  elif l==2:j=input();v[x]=int(j)if L(x)%2 else ord(j)
  elif~-any(g(j)for j in y):i=g(x)*9
 elif e:w=g(e);print(w if L(e)%2 else chr(w%128),end='')

Ungolfed:
import sys, re

# Intialise variable table.
vars_ = {}
get_var = lambda i: vars_.get(i, int(i)//9)

# Parse commands.
commands=[re.sub('( ?)[^9]+','\\1',l).rstrip().split(' ') for l in open(sys.argv[1])]

# Run until the current instruction index is out of bounds.
index=0
while 0 <= index < len(commands):
    # Get the current command and increment the index.
    command = commands[index]
    l = len(command)
    first = command[0]
    index += 1

    if l > 1:
        # Handle the "assignment" command.
        if first:
            operands = [get_var(i) for i in command[1:]]
            vars_[first] = sum(operands[0::2]) - sum(operands[1::2])
        # Handle the "input" command.
        elif l==2:
            inp = input()
            vars_[command[1]] = int(inp) if len(command[1]) % 2 else ord(inp)
        # Handle the "goto" command.
        elif not any(get_var(i) for i in command[2:]):
            index = get_var(command[1]) * 9
    # Handle the "output" command.
    elif first:
        val = get_var(first)
        print(val if len(first) % 2 else chr(val % 128),end='')

Pretty much just a literal implementation of the spec, golfed down as far as I can get it.
Run from the command line by supplying a 99 source-code file as the sole argument (e.g. the last example from the OP):
> python3 ninetynine.py countdown.txt
G11G10G9G8G7G6G5G4G3G2G1G
>

As an added bonus, here's a (rather poor) implementation of "99 bottles" in 99: http://pastebin.com/nczmzkFs

Nice work! A few Python golfing pointers: 1) Spaces before else can be removed if preceded by a number; 2) elif not any can use ~- instead of not (see this tip); 3) replace [g(j)for j in d[1:]] with list(map(g,d[1:])) to save 2 bytes, and similarly for the genexp in any(). Also, instead of using \\1, I think you could just substitute a literal space.

Also, to suppress the newline, Python3 lets you do print(x,end='')--"only" 7 bytes more. ;)

If I am not mistaken, in the goto case, you  multiply the target address by 9, which is unnecessary (see bold part in spec.)

@DLosc: regarding your first point: I too though that else after a number could be removed, but when I tried it earlier I got a syntax error. Your other tips are much appreciated though!

@coredump: the way the spec is written, each variable will always have a value that is divisible by nine. I found it more concise to allow the variables to take on any value, and to only multiply/divide by nine as needed (in particular, in the goto routine and when getting the default value of the variable). As far as a user of the language is concerned, it makes no difference.

Not the else itself, just the space before it. E.g. 3*n+1if n%2else n//2.

@Mac That's nice, thanks for clarifying.

@DLosc: sorry, I misspoke - I did indeed mean the space, not the else. For example, I tried replacing print(w if L(e)%2 else chr(w%128)) with print(w if L(e)%2else chr(w%128)) and got a syntax exception.

Odd--I tested on ideone.com and it worked, but you're right, it doesn't work in the actual Python3 interpreter (3.4.0 on Ubuntu). This tips post clarifies: a number followed by an alphabetical token works in general, but not for tokens starting with e or E, and (from the comments) not for 0or either.

A couple more spaces to eliminate: ~- doesn't need a space before it; and since i is integer, you can replace while 0<=i with while-1<i.

@Mac I just applied your trick about multiples of nine. Thanks again.

@DLosc: thanks. I'm guessing the problem with the else is that a digit followed by a letter "E" is interpreted as the beginning of a scientific notation literal (e.g. 1e5), which then confuses the parser when it encounters the l in else when it was expecting a plus/minus sign or digit.

@coredump: no worries!

+1 for http://pastebin.com/nczmzkFs

Common Lisp, 1180 857 837 836 bytes
I know this is not going to win, but I had fun golfing this one. I managed to remove 343 bytes, which is more than two 99 interpreters written in CJam.
Also, quite amusingly, the more I try to compress it, the more I am persuaded that  for Common Lisp, it is shorter to compile the code than to try interpreting it on the fly.
(defmacro g(g &aux a(~ -1)> d x q(m 0)r v(n t)c(w 0)? u z)(flet((w(n p)(intern(format()"~a~a"p n))))(#1=tagbody %(case(setf c(ignore-errors(elt g(incf ~))))(#\  #2=(when(> w 0)(pushnew w v)(if u()(setq ?(oddp w)))(#5=push(w w'V)u)(setf w 0))(setf z t))(#\9(incf w)(setf >(or >(and n z))z()n()))((#\Newline())#2#(#5#(when u(setf u(reverse u)a(pop u))(if >(if u`(when(every'zerop(list,@u))(setf @,a)(go ^))`(setf,a,(if ?'(read)'(char-code(read-char)))))(if u`(setf,a,(do(p m)((not u)`(-(+,@p),@m))(#5#(pop u)p)(#5#(if u(pop u)0)m)))`(princ,(if ? a`(code-char(mod,a 128)))))))r)(incf m)(setf ?()u()z()>()n t)))(if c(go %))$(decf m)(setq d(pop r))(if d(#5# d x))(when(=(mod m 9)0)(#5#(w #3=(/ m 9)'L)x)(#5#`(,#3#(go,(w #3#'L)))q))(if(>= m 0)(go $)))`(let(@,@(mapcar(lambda(n)`(,(w n'V),(/(1-(expt 10 n))9)))v))(#1#,@x(go >)^(case @,@q)>))))

lexical analysis and code generation are interleaved: I do not store the internal representation, but process directly each line.

there is a single tagbody to perform 2 loops:
 (... (tagbody % ... (go %) $ ... (go $)) result)

local variables are declared in &aux

don't generate a closure, but directly the interpreted code

etc.

Ungolfed, commented
(defmacro parse-99
    (string &aux
              (~ -1) ; current position in string
              a      ; first variable in a line
              >      ; does current line starts with a leading space?
              d      ; holds a statement during code generation
              x      ; all statements (labels + expressions)
              q      ; all generated case statements
              (m 0)  ; count program lines (first increases, then decreases)
              r      ; list of parsed expressions (without labels)
              v      ; set of variables in program, as integers: 999 is 3
              (n t)  ; are we in a new line without having read a variable?
              c      ; current char in string
              (w 0)  ; currently parsed variable, as integer
              ?      ; is first variable odd?
              u      ; list of variables in current line, as integers
              z)     ; is the last read token a space?
  (flet((w(n p)
          ;; produce symbols for 99 variables
          ;; e.g. (10 'V) => 'V10
          ;;      (4 'L)  => 'L4
          (intern(format()"~a~a"p n))))
    (tagbody
     parse
       (case (setf c
                   ;; read current char in string,
                   ;; which can be NIL if out-of-bounds
                   (ignore-errors(aref string (incf ~))))

         ;; Space character
         (#\Space
          #2=(when(> w 0)
               (pushnew w v)            ; we were parsing a variable, add it to "v"
               (if u()(setq ?(oddp w))) ; if stack is empty, this is the first variable, determine if odd
               (push(w w'V)u)           ; add to stack of statement variable
               (setf w 0))              ; reset w for next variable

          ;; Space can either be significant (beginning of line,
          ;; preceding a variable), or not. We don't know yet.
          (setf z t))

         ;; Nine
         (#\9
          (incf w) ; increment count of nines
          (setf >(or >(and n z)) ; there is an indent if we were
                                 ; starting a newline and reading a
                                 ; space up to this variable (or if we
                                 ; already know that there is an
                                 ; indent in current line).
                ;; reset z and n
                z()n()))

         ;; Newline, or end of string
         ((#\Newline())
          #2#  ;; COPY-PASTE the above (when(> w 0)...) statement,
               ;; which adds previously read variable if necessary.

          ;; We can now convert the currently read line.
          ;; We push either NIL or a statement into variable R.

          (push(when u
                     (setf u (reverse u) ; we pushed, we must reverse
                           a (pop u))    ; a is the first element, u is popped
                     (if >
                         ;; STARTS WITH LEADING SPACE
                         (if u
                             ;; JUMP
                             `(when(every'zerop(list,@u))(setf @,a)(go ^))

                             ;; READ
                             `(setf,a,(if ?'(read)'(char-code(read-char)))))

                         ;; STARTS WITH VARIABLE
                         (if u

                             ;; ARITHMETIC
                             `(setf,a,(do(p m) ; declare p (plus) and m (minus) lists

                                         ;; stopping condition: u is empty
                                         ((not u)
                                          ;; returned value: (- (+ ....) ....)
                                          `(-(+,@p),@m))

                                        ;; alternatively push
                                        ;; variables in p and m, while
                                        ;; popping u

                                        (push(pop u)p)

                                        ;; first pop must succeed, but
                                        ;; not necessarly the second
                                        ;; one.  using a zero when u
                                        ;; is empty covers a lot of
                                        ;; corner cases.

                                        (push(if u (pop u) 0) m)))

                             ;; PRINT
                             `(princ,(if ? a`(code-char(mod,a 128)))))))
               r)
          ;; increase line count
          (incf m)
          ;; reset intermediate variables
          (setf ?()u()z()>()n t)))

       ;; loop until end of string
       (if c (go parse))

     build
       ;;; Now, we can add labels in generated code, for jumps

       ;; decrease line count M, which guards our second loop
       (decf m)

       ;; Take generated statement from R
       (setq d(pop r))

       ;; we pop from R and push in X, which means X will eventually
       ;; be in the correct sequence order. Here, we can safely
       ;; discard NIL statements.

       ;; We first push the expression, and THEN the label, so that
       ;; the label ends up being BEFORE the corresponding statement.
       (if d(push d x))

       ;; We can only jump into lines multiple of 9
       (when (=(mod m 9)0)
         ;; Push label
         (push(w #3=(/ m 9)'L)x)
         ;; Also, build a case statement for the jump table (e.g. 2(go L2))
         (push`(,#3#(go,(w #3#'L)))q))
       ;; loop
       (if(>= m 0)(go build)))

    ;; Finally, return the code
    `(let(@ ; target of a jump instruction

          ;; other variables: V3 represents 999 and has a default value of 111
          ,@(mapcar(lambda(n)`(,(w n'V),(/(1-(expt 10 n))9)))v))

       ;; build a tagbody, inject statements from X and case statements from Q
       ;; label ^ points to jump table : we go to ^ each time there is a JUMP
       ;; label > is the end of program

       ;; note that if the case does not match any authorized target
       ;; address, we simply end the programs.
       (tagbody,@x(go >)^(case @,@q)>))))

We use standard input/output during evaluation, meaning we use standard read and princ functions. Hence, the resulting code can be made executable on the command-line, as show below.
Inputs are not completely well sanitized when running 99 programs: it is assumed that the user knows what kind of values are expected.
The only possible runtime overhead can occur when jumping, since we must evaluate the value of a variable and match that value to a label. Except that, the interpreter shall be quite efficient.
Based on the clever obseravtion from Mac that we don't need to divide and multiply by 9 each time, the current version manages to never divides nor multiply by 9 during execution.
Example
If we replace defmacro by defun, we see the generated code. For example:
(g
"99999999                                              Print G.
999 99                                                Set triple-nine to ninety-nine.
9999999999 9999999999 9999999999 99 99 9 9 999 999    Set 10-nine to zero.
99999999999 9999999999                                Set 11-nine to zero.

999                                                   Print triple-nine's value divided by nine. (This is the ninth line.)
99999999                                              Print G.
999 999 9                                             Subtract nine from triple-nine.
 99999 999                                            Jump to line 5-nines if triple-nine is zero (endsprogram).
 9 99999999999 9999999999                             Jump to line nine if 10-nine and 11-nine are zero (alwa

")

Here is the resulting code:
(LET (@
      (V5 11111)
      (V11 11111111111)
      (V1 1)
      (V10 1111111111)
      (V2 11)
      (V3 111)
      (V8 11111111))
  (TAGBODY
   L0
    (PRINC (CODE-CHAR (MOD V8 128)))
    (SETF V3 (- (+ V2) 0))
    (SETF V10 (- (+ V3 V1 V2 V10) V3 V1 V2 V10))
    (SETF V11 (- (+ V10) 0))
   L1
    (PRINC V3)
    (PRINC (CODE-CHAR (MOD V8 128)))
    (SETF V3 (- (+ V3) V1))
    (WHEN (EVERY 'ZEROP (LIST V3)) (SETF @ V5) (GO ^))
    (WHEN (EVERY 'ZEROP (LIST V11 V10)) (SETF @ V1) (GO ^))
    (GO >)
   ^
    (CASE @ (0 (GO L0)) (1 (GO L1)))
   >))

When executed, prints "G11G10G9G8G7G6G5G4G3G2G1G"
Command-line
We can build an executable by dumping a core and specifying the toplevel function. Define a file named boot.lisp where you put the defmacro, and then write the following:
(defun main()(parse-99 <PROGRAM>))
(save-lisp-and-die "test-99" :executable t :toplevel #'main)

Running sbcl --load boot.lisp gives the following output:
$ sbcl --load boot.lisp
This is SBCL 1.2.8.32-18c2392, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
[undoing binding stack and other enclosing state... done]
[saving current Lisp image into test-99:
writing 5824 bytes from the read-only space at 0x20000000
writing 3120 bytes from the static space at 0x20100000
writing 55771136 bytes from the dynamic space at 0x1000000000
done]

Then, running the compiled 99 program:
$ time ./test-99
G11G10G9G8G7G6G5G4G3G2G1G
real    0m0.009s
user    0m0.008s
sys     0m0.000s

99 bottles
If you are interested, here is the compiled code for the 99 bottles program written in Mac's answer: http://pastebin.com/ZXe839CZ (this is the old version where we have jmp and end labels, a surrounding lambda and prettier arithmetic).
Here is an execution with the new version, to prove it still works: http://pastebin.com/raw.php?i=h73q58FN

TI-84 Basic (Calculator Script), 376 373 377 381 bytes
If it runs on a TI-84 calculator, you'll be able to use it on a standardized test... so it's useful ;)
Minimum operating system version - 2.53MP (MathPrint) due to the summation sigma
#Get input from STDIN
:Ans+":"->Str0
#Initialize instruction pointer
:1->I
#Initialize variable set
:DelVar L1999->dim(L1
#Strip out those pesky non-newline/space/9 characters
:For(J,1,length(Ans
:sub(Str0,J,1
:If not(inString(": 9",Ans
:sub(Str0,1,J-1)+sub(Str0,J+1,length(Str0)-J->Str0
:End
#Main interpreting loop
:While I<length(Str0
:sub(Str0,I+1,inString(Str0,":",I+1)-I-1->Str1
:DelVar A" "=sub(Ans,1,1->A
:inString(Str0,":",I+1->I
:If A
:sub(Str1,2,length(Str1)-1->Str1
:End
:length(Str1->L
#0 is Output, 1 is Input, 2 is Assignment, 3 is Goto
:2A+inString(Str1," ->B
:If not(Ans
:Disp L1(L
:If Ans=1
:Then
:Input C
:C->L1(L
:End
#Get those delimited variables
:If B>1
:Then
:"{"+Str1->Str2
:While inString(Ans,"
:inString(Ans,"
:sub(Str2,1,Ans-1)+sub(Str2,Ans+1,length(Str2)-Ans->Str2
:End
:log(expr(Ans)+1->L2
:End
:If B=2
#Gotta expand that -+ pattern
:Ans(2->L1(Ans(1
;Love that summation Σ
:If B=3 and Σ(L2(K),K,2,dim(L2
:Then
:DelVar IFor(K,0,9L2(1
:inString(Str0,":",I+1->I
:End
:End

P.S. ASCII guidelines could not be followed exactly, but in TI-Basic : is a newline. Thus, all the actual newlines in the code mean that the : or # at the beginning of each line are not required. The beginning tokens : and # just differentiate between comments and code.
Original Hex Dump (376 Bytes)
49 3f bb 54 5d 20 39 39 39 04 b5 5d 20 3f 72 04 aa 09 3f d3 4a 2b 31 2b bb 2b 72 3f bb 0c aa 09 2b 4a 2b 31 3f ce b8 bb 0f 2a 3e 29 39 2a 2b 72 3f bb 0c aa 09 2b 31 2b 4a 71 31 11 70 bb 0c aa 09 2b 4a 70 31 2b 72 71 4a 04 aa 09 3f d4 3f d1 49 6b bb 2b aa 09 3f bb 0c aa 09 2b 49 70 31 2b bb 0f aa 09 2b 2a 3e 2a 2b 49 70 31 11 71 49 71 31 04 aa 20 3f bb 54 41 2a 29 2a 6a bb 0c 72 2b 31 2b 31 04 41 3f bb 0f aa 09 2b 2a 3e 2a 2b 49 70 31 04 49 3f ce 41 3f bb 0c aa 20 2b 32 2b bb 2b aa 20 11 71 31 04 aa 20 3f d4 3f bb 2b aa 20 04 4c 3f 32 41 70 bb 0f aa 20 2b 2a 29 04 42 3f ce b8 72 3f de 5d 20 10 4c 11 83 39 3f ce 72 6a 31 3f cf 3f dc 43 3f 39 43 04 5d 20 10 4c 3f d4 3f ce 42 6c 31 3f cf 3f 2a 08 2a 70 aa 20 04 aa 01 3f d1 bb 0f 72 2b 2a 29 3f bb 0f 72 2b 2a 29 3f bb 0c aa 01 2b 31 2b 72 71 31 11 70 bb 0c aa 01 2b 72 70 31 2b bb 2b aa 01 11 71 72 04 aa 01 3f d4 3f c0 bb 2a 72 11 70 31 04 5d 01 3f d4 3f ce 42 6a 32 3f 72 10 32 04 5d 20 10 72 10 31 3f ce 42 6a 33 40 ef 33 5d 01 10 4b 11 2b 4b 2b 32 2b b5 5d 01 3f cf 3f bb 54 49 d3 4b 2b 30 2b 5d 01 10 31 3f bb 0f aa 09 2b 2a 3e 2a 2b 49 70 31 04 49 3f d4 3f d4 2e 76

Edit #1 - Optimized 3 bytes using Mac's observation
Edits #2 & #3 - Fixed bugs spotted by Runer112.

Being easy to use in stressful situations like standardized tests is exactly what I designed 99 for.

Can I suggest using a different character, like #, for the comments? (NB: Comments in the actual code are implemented as a line with only an unclosed string, which clobbers Ans)

Sure, doesn't matter @Riking

I love me some TI-BASIC, but I don't think this can count as a valid answer in its current state. It doesn't handle character input/output. Which could be done, by the way, with a character lookup string.

That's true, but TI-Basic doesn't use all ASCII characters, so I don't see how it could be done. I've followed the spec as much as I can, but those symbols like $_~| just aren't there.

@Timtech They're not available in any on-calc menus, so you have to use an assembly tool or a computer tokenizer to get them, but they are all there: http://tibasicdev.wikidot.com/miscellaneous-tokens

Have you actually tried running this? I haven't, but just from looking at it a bit more, I've spotted what seem to be at least half a dozen bugs. For instance: variables aren't initialized with their values, the Ans input is overwritten so Ans->Str0 on line 6 will error, there are multiple instances where the length argument of a sub() command can be zero which results in an error, Ans on line 11 will be a string so Ans-J will error... And I only looked at about the first half of the program.

On getting input I had to do that workaround, but by adding a few bytes it can be rearranged to address that @Runer112

@Timtech That still leaves the other problems, though. As I mentioned, there's the lack of character I/O, lack of variable initialization, and multiple instances where a sub() command can have length zero and throw an error. And once the sub() invocations are fixed, I'm afraid it may reveal more issues.

Lack of variable init is because we expect input from STDIN, not prompt for it. You could add that for 2 bytes more space. Also, strings can be length 0 @Runer112

@Timtech I was referring to this: "By default, each variable is assigned to its own numeric representation. So unless it has been reassigned, the value of the variable 9 is the number 9, and the value of the variable 99 is the number 99, and so on." And strings of length 0 can be produced by means like "", but it's sort of a bug that basically no string manipulation command can consume or produce an empty string, including sub().

I see about the representation there @Runer112 however about the empty string, you can do "->StrX and then use that string with Disp and Text(

@Timtech I did say that you can produce an empty string like that, yes. However, something like sub("Hello",1,0) won't return an empty string, it will throw an error. And that can happen in multiple places right now.

@Runer112 Okay, a no-op at the end should help us avoid this.

C 426 458 481 497
Edit Maybe I'm going too far, but this works with Visual C: removed stdio.h, using int instead of FILE* for fopen and getc
Edit 2 Reorder execution step, more clutter, 32 chars saved
B[99999],*r,*i[9999],V[999],v,w,m,n;unsigned p,s;
main(b,a)char*a[];{r=i[0]=B;m=fopen(a[1],"r");
do if(w=getc(m),n+=w==57,w<33){
if(n){for(v=1,b=n;--b;)v=v*10+1;V[n]=v;*r++=p?-n:n;b=n=0;};
w-32?(*r=p=0,b=i[++s]=++r):(p=b,b=0);}while(w>=0);
while(p<s)if(w=0,r=i[p++],v=*r++)
if(m=v>0,*r){for(;b=*r++;m=-m)w=w+m*V[b]|!m*V[b];m?V[v]=w:(p=w?p:9*V[-v]);
}else~v&1?!m?V[-v]=getchar():putchar(V[v]&127):m?printf("%d",V[v]):scanf("%d",V-v);
}

Stand alone console program, program name taken on command line and input/output via console.
Old style K&R, default type int for global vars and parameters. Assuming EOF defined as -1 (as it is in every C implementation I'm aware of)
Compiles with warnings with Visual Studio 2010 (Win32 console C++ project, compile as C)
Compiles on Ideone, but can't run as it needs a file.
First step, the source code is read and parsed, each line is stored as a sequence of integers based on the numbers of 9s. If there is a leading blank, the first number is negative. So:       9   BLAH        99   9a9bb9c9 ( 9 99 9999) becomes -1,2,4
There is a shortcut - not so legal : all ascii codes less than ' ' are considered newlines.
In this step all the used variable are preinitialised.
The execution step follows the specifications, no frills, save storing numbers divided by 9.
More readable same code (I hope), spaces and newlines added
B[99999],*r,*i[9999],V[999],v,w,m,n;
unsigned p,s;
main(b,a)char*a[];
{
  r=i[0]=B;
  m=fopen(a[1],"r");
  do if(w=getc(m),n+=w==57,w<33)
  {
     if(n){for(v=1,b=n;--b;)v=v*10+1;V[n]=v;*r++=p?-n:n;b=n=0;};
     w-32?(*r=p=0,b=i[++s]=++r):(p=b,b=0);
  }
  while (w>=0);
  while (p<s)
    if (w = 0, r = i[p++], v = *r++)
        if (m = v > 0, *r){
            for(; b = *r++; m = -m)
                w = w + m*V[b] | !m*V[b];
            m ? V[v]=w : (p = w ? p : 9*V[-v]);
        } else
            ~v & 1
            ? !m ? V[-v] = getchar() : putchar(V[v] & 127)
            : m ? printf("%d", V[v]) : scanf("%d", V - v);
}

Also works with GCC 4.8.2. Compiles as C99!

Haskell, 550 bytes
import Data.List.Split
import System.Environment
a#b=takeWhile(/=a)b
(!)=map
main=do(f:_)<-getArgs;readFile f>>=e.(p!).lines
p l=(if ' '#l<'9'#l then[0]else[])++length!(wordsBy(/='9')l)
e l=(\x->div(10^x-1)9)%l where
 _%[]=return()
 v%([]:r)=v%r
 v%([n]:r)=putStr(if odd n then show(v n)else[toEnum$v n`mod`128])>>v%r
 v%([0,n]:r)=do i<-getLine;u n(if odd n then read i else fromEnum$head i)v%r
 v%((0:n:m):r)|any(/=0)(v!m)=v%r|v n<0=v%[]|1<2=v%drop(9*v n)l
 v%((n:m):r)=u n(sum$zipWith(*)(v!m)(cycle[1,-1]))v%r
u n i v= \x->if x==n then i else v x

Example run with the "countdown" program stored in the file i.99
$ ./99 i.99
G11G10G9G8G7G6G5G4G3G2G1G

Ungolfed version:
import Data.List.Split
import System.Environment

-- The main function takes the first command line argument as a file name,
-- reads the content, splits it into lines, parses each line and evaluates
-- the list of parsed lines.
main = do
 (f:_)<-getArgs
 readFile f >>= eval.map parse.lines

-- each line is coverted into a list of integers, which represent the number
-- of 9s (e.g. "999 99 9999" -> [3,2,4]). If there's a space before the first
-- 9, a 0 is put in front of the list (e.g. " 9 9 999" -> [0,1,1,3]).
parse l = (if takeWhile (/=' ') l < takeWhile (/='9') l then [0] else [])
   ++ map length (wordsBy(/='9') l)

-- The work is done by the helper function 'go', which takes two arguments
--   a) a functions which takes an integer i and returns the value of the
--      variable with i 9s (e.g: input: 4, output: value of 9999). To be
--      exact, the value divided by 9 is returned.
--   b) a list of lines to work on
-- 'eval' starts the process with a function that returns i 1s for every i and
-- the list of the parsed input. 'go' checks which statement has to be
-- executed for the next line and calls itself recursively
eval list = go (\x -> div (10^x-1) 9) list
   where
   go _ []                  = return ()
   go v ([]:r)              = go v r
   go v ([n]:r)             = putStr (if odd n then show(v n) else [toEnum (v n`mod`128)]) >> go v r
   go v ([0,n]:r)           = do i<-getLine ; go (update n (if odd n then read i else fromEnum$head i) v) r
   go v ((0:n:m):r)
      | any (/=0) (map v m) = go v r
      | v n < 0             = go v []
      | otherwise           = go v (drop (9*v n) list)
   go v ((n:m):r)           = go (update n (sum $ zipWith (*) (map v m) (cycle[1,-1])) v) r

-- updates a function for retrieving variable values.
-- n = position to update
-- i = new value
-- v = the function to update
update n i v = \x->if x==n then i else v x

q/k, 490 469
M:mod;T:trim;R:read0;S:set;s:" "
f:(rtrim')(f:R -1!`$.z.x 0)inter\:"9 \n"
k)m:{@[x;&M[!#x;2];-:]}
b:{}
k)p:{1@$$[1=M[#x;2];(K x)%9;"c"$M[(K x)%9;128]];}
k)i:{S[(`$T x);$[1=M[#T x;2];9*"J"$R 0;*9*"i"$R 0]]}
k)K:{$[#!:a:`$x;.:a;"I"$x]}
k)v:{(S).(`$*:;+/m@K'1_)@\:T's\:x}
k)g:{$[&/0=C:K'c:1_J:s\:T x;n::-1+K@*J;|/~0=C;;(d<0)|(d:*C)<#f;exit 0]}
k)r:{`b`p`i`v`g@*&(&/x=s;q&1=c;(e~s)&1=C;(q:e~"9")&1<c:#s\:x;((e:*x)~s)&1<C:#s\:1_x)}
k)n:0;while[~n>#o:(r')f;(o n)f n;n+:1]
\\

.
$ q 99.q countdown.txt -q
G11G10G9G8G7G6G5G4G3G2G1G

The script is a mixture of q and k, so first up I define a few q keywords that I want to use multiple times in k functions. (basically #define macros)
M:mod;T:trim;R:read0;S:set

f reads the file passed into the program and strips out unnecessary characters
q)f
"99999999"
"999 99"
"9999999999 9999999999 9999999999 99 99 9 9 999 999"
"99999999999 9999999999"
""
""
""
""
""
"999"
"99999999"
"999 999 9"
" 99999 999"
" 9 99999999999 9999999999"

m takes a list/vector and multiples the odd indices by -1
q)m 1 2 3 4 5
1 -2 3 -4 5

b is just an empty function, used for the no-op lines
p is the print function.
K is a function that examines a variable. If the variable exists, it returns it, otherwise it just returns the literal.
//999 not defined, so just return 999
q)K "999"
999
//Set 999 to 9
q)v "999 9"
//K now returns 9
q)K "999"
9

v is the assignment function.
g is the goto function.
r takes a string and decides which operation needs to be applied.
And then finally, I just iterate through the f list of strings, with n as the iterator. The goto function will update n as necessary.

JavaScript (ES6) 340 352
A function with 2 parameters

program code as a multiline string
input as an array

The third optional parameter (default 10k) is the max number of iterations - I don't like a program that run forever
JSFiddle To test
I=(c,i,k=1e5,
  V=v=>v in V?V[v]:v/9 // variable getter with default initial value
)=>(c=>{
 for(p=o='';--k&&p<c[L='length'];)
   (v=(r=c[p++].split(' '))[S='shift']())? // no leading space
      r[r.map(t=>w-=(m=-m)*V(t),w=0,m=1),0]?V[v]=w // Assign
      :o+=v[L]&1?V(v):String.fromCharCode(V(v)&127) // Output
   : // else, leading space
    (v=r[S]())&&
       (r[0]?r.some(t=>V(t))?0:p=9*V(v) // Goto
       :(t=i[S](),V[v]=v[L]&1?t:t.charCodeAt()) // Input
    )
})(c.replace(/ (?=[^9])|[^9\s]/g,'').split('\n'))  // code cleaning
||o

Perl, 273 266 255 244 238
Line breaks added for clarity.
open A,pop;
for(@c=<A>){
y/ 9//cd;s/ +/ /g;s/ $//;
$p="((99)+|9+)";$a='+';
s/^ $p$/$1='$2'?ord<>:<>/;
s/^$p$/print'$2'?chr$1%128:$1/;
s/^ $p /\$_=$1*011unless/&&y/ /|/;
s/ /=/;s/ /$a=-$a/ge;
s!9+!${x.$&}=$&/9;"\$x$&"!eg}
eval$c[$_++]until/-/|$_>@c

Program name taken on command line:
$ perl 99.pl 99beers.99

Each line of the program is converted into Perl code, for example:
print'$x99'?chr$x99999999%128:$x99999999
$x999=$x99
$x9999999999=$x9999999999-$x9999999999+$x99-$x99+$x9-$x9+$x999-$x999
$x99999999999=$x9999999999

print''?chr$x999%128:$x999
print'$x99'?chr$x99999999%128:$x99999999
$x999=$x999-$x9
$_=$x99999*011unless$x999
$_=$x9*011unless$x99999999999|$x9999999999

More details
open A,pop; # open the source file
for(@c=<A>){ # read all lines into @c and iterate over them
y/ 9//cd; # remove all but spaces and 9's
s/ +/ /g;s/ $//; # remove duplicate and trailing spaces
$p="((99)+|9+)";$a='+';
s/^ $p$/$1='$2'?ord<>:<>/; # convert input
s/^$p$/print'$2'?chr$1%128:$1/; # convert output
s/^ $p /\$_=$1*011unless/&&y/ /|/; # convert goto
s/ /=/;s/ /$a=-$a/ge; # convert assignment
s!9+!${x.$&}=$&/9;"\$x$&"!eg} # initialize and convert variables
eval$c[$_++]until/-/|$_>@c # run (program counter is in $_)

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/