Corewars – An Introduction to Hostile Programming
Corewar is a game from the 1980′s, played between computer programs written in Redcode, a language similar to assembly. The programmers design their battle programs to remove opponents from the memory of the MARS virtual computer by any means possible.
Some of the simpler techniques include blindly overwriting memory, searching for the opponent or spawning off new processes. These are commonly known as stone, scissors, paper after the popular playground game. Stone usually wins against scissors, scissors normally defeat paper, and paper mostly beats stone.
Here’s an example of a typical Corewar program:
org wipe
step equ 5
first equ bomb-10
bomb:mov.i #1, -1
ptr: sub #step, #first
wipe:jmz.f ptr, @ptr
mov bomb, >ptr
djn.f wipe, {ptr-5
end
This simple example of scissors once held a 20 point lead over it’s rivals. The first instruction is never executed, it’s the bomb used to overwrite opponents. The next two instructions form a loop which looks through memory for an opponent, and the final two instructions actually overwrite it.
Corewar is still going strong, and celebrates it’s 25th anniversary in 2009. If you’d like to discover more about Corewar, here are the top resources:
- The Beginner’s Guide to Redcode will teach you the language of Corewar
- pMARS is a portable implementation of the Corewar virtual machine
- Corewar Tutorials exist on virtually every aspect of the game
- Koenigstuhl is an archive of thousands of published Corewar programs
- SAL organises a number of on-going king of the hill tournaments
- sfghoul and impomatic report the latest Corewar news on their blogs
- #corewars is the official Corewar discussion channel, hosted by irc.freenode.net
What are your experiences with Corewar, have you ever had any success?
Category: Corewar | Tags: Corewar, introduction | Comment (0)Styling and plugins
Ok, I’ve installed a theme and I’m now adding all kinds of stuff. For example, notice above that you can see my latest tweet! A little personal touch.
I’ve also installed a code-formatter plugin, so I can do a code “Hello World” too now:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello world, from inside the code-formatter!");
}
}
Category: Java Programming, Other
|
Comment (0)
Hello world!
Just installed WordPress on my new server. Hopefully a lot of new/cool/interesting posts will follow.
The main blog-topics will probably be:
- Java/software development
- Algorithms
- Math / puzzles
- The rest of my life
And yes, the website still looks horrible. Hopefully I’ll get time soon to start styling and adding some content!
Category: Other | Comment (0)