
CoreWar resembles the BattleShip board game, but instead of the players announcing the location they wish to bomb they write programs to do that for them. An overview GameDeveloper.
While I'll be using a variant of CoreWars 8086 in my class because I want something that is closer to actual assembler, there are plenty of reasons to try the traditional CoreWar with its near-assembler RedCode language.
Here are a few options:
- PMars. This is the official application for running CoreWar. It's regularly updated but it's based on pre-1990 C in order to maintain compatibility with really old computers. That negative side also means that it's relatively easy to compile and get going as there are very few external dependencies.
- Download the official GitHub source or my fork that removes pre-1990 C function syntax.
- Go to the
srcfolder - Type
make clean - Type make curses
- Create a directory called warriors and put two warriors, like imp.red and dwarf.red below, in it.
- Execute by typing ./pmars warriors/imp.red warriors/dwarf.red
- The match will run ... just really really quickly. Then it will present the final results.
- [To-do: figure out a way to slow the curses animation down.]
- CoreWar.io. A convenient online simulator.
- Paste or type in the code for a warrior like imp.red or dwarf.red.
- Animation is more user-friendly than PMars.
- Can't confidently speak to the fidelity of the simulator, but it was able to run three classic 1984 to 1986-era warriors, Imp, Dwarf and MiniD.

If you're going to write your own warriors make sure to review the beginner's guide or this introductory article on Core War.
Appendix
I've posted a few examples of warriors here, copied from original sources to get you started. Note that these warriors use syntax that dates to 1986 and earlier, making them simpler than many of the warriors used after 1986.

Warriors
The following are classic warriors that date back to the late 1980s, as documented on the CoreWar site.
imp.red
Imp is considered to be the first published warrior.
;redcode
;name imp
;author A. K. Dewdney
;version 86
MOV 0,1
dwarf.red
The dwarf program is another classic, generally mentioned right after imp. Unlike most CoreWar warriors it does not use the spawning command, slp.

;redcode
;name dwarf
;author A. K. Dewdney
;version 86
start ADD #4, bomb ;adjust pointer by 4
MOV bomb, @bomb ;move DAT instruction to new place.
JMP start ;loop back to start
bomb DAT #0, #0
;# is immediate addressing (number)
;@ is indirect addressing.
miniD.red

The miniD program is highlighted in the page about the 1986 event . As with dwarf and imp it does not use the spawning command, slp.
;redcode
;name MiniD
;author Mark Clarkson
;strategy ICWST'86 finalist
;assert 1
DAT #-1
START MOV #0 ,<-1
JMP START
END START
Updates
Dec 3, 2026: Added a link to the overview at GameDeveloper.

James Andrew Smith is a Professional Engineer and Associate Professor in the Electrical Engineering and Computer Science Department of York University’s Lassonde School, with degrees in Electrical and Mechanical Engineering from the University of Alberta and McGill University. Previously a program director in biomedical engineering, his research background spans robotics, locomotion, human birth, music and engineering education. While on sabbatical in 2018-19 with his wife and kids he lived in Strasbourg, France and he taught at the INSA Strasbourg and Hochschule Karlsruhe and wrote about his personal and professional perspectives. James is a proponent of using social media to advocate for justice, equity, diversity and inclusion as well as evidence-based applications of research in the public sphere. You can find him on Twitter. You can find him on BlueSky. Originally from Québec City, he now lives in Toronto, Canada.
