Skip to content

Radoslaw-Wolnik/CoreWars

Repository files navigation

Core War Recruitment Lab

Core War / Redcode workspace for learning ICWS'94 Redcode, testing warriors with pMARS, and keeping tournament submissions separate from experiments.

Origin

I first learned about Core War during a recruitment stage for one of the largest consulting companies operating in Poland. The task was competitive: candidates had a short window to upload Redcode warriors, test them against a leaderboard, and improve them before the next selection step. In my city, the top 15 candidates were invited to the next stage at the company's headquarters; some other city cohorts used a slightly larger cutoff.

That time pressure is why this repository became more than a submitted warrior. It grew into a reproducible learning lab: local pMARS runners, benchmark suites, archived opponents, notebooks from the tuning process, and a tutorial that starts from zero and works toward modern Core War strategies.

This is a personal learning/research repository and is not an official company project.

Repository Map

Path Purpose
scripts/ Maintained automation, especially the pMARS tournament runner.
warriors/active/mine/ Your working warriors and experiments worth keeping.
warriors/active/candidates/ Candidate submissions before final selection.
submissions/final/ Final submitted warriors and placement notes.
warriors/arena/recruitment/ Small local opponent set used by the runner.
warriors/arena/pmars_tests/ Reference warriors shipped with or mirrored from pMARS examples.
warriors/arena/winning/ Strong comparison warriors.
warriors/benchmarks/ Curated benchmark suites and strategy-organized opponent packs.
warriors/archive/corewar/, warriors/archive/historical/, warriors/archive/human/ External and historical warrior collections for study and benchmarking.
warriors/archive/cc2_entries/ Extracted nano warriors from warriors/bundles/CC2_Entries.zip.
warriors/experiments/discarded/ Abandoned or rough experiments kept for reference.
docs/tutorials/ LaTeX/PDF tutorial material and source figures.
docs/ Curated project documentation and Redcode notes.
notebooks/ Recruitment-era exploratory notebooks updated for the current layout.
tools/pmars/ Bundled pMARS simulator.
tools/redcode-vscode-highlighter/ VS Code Redcode highlighter archive.
artifacts/ Generated plots, benchmark JSON, and temporary warriors.

Tutorial

During my own learning journey, I pulled together a tutorial from online sources, historical Core War material, and the ideas I picked up while building and testing warriors for this repository. The goal is to close the gap between the beginner tutorials that teach the basics and the modern Core War style where the meta is shaped by hybrid warriors.

The tutorial starts from fundamentals and works toward modern patterns. The LaTeX sources and generated PDFs live in docs/tutorials/LATex, with the main English source at docs/tutorials/LATex/main.tex and the Polish translation at docs/tutorials/LATex/polish_translation.tex.

Corrections and improvements are very welcome. I am not presenting this as an expert reference; I am a student who was thrown into the Core War environment and tried to organize the ideas that made the game finally click. If you find inconsistencies, mistakes, unclear explanations, or better historical context, please contribute.

Quick Start

Validate the recruitment arena before running matches:

python scripts\tournament.py --validate-only

Run a Swiss tournament against the recruitment arena:

python scripts\tournament.py --player warriors\active\candidates\bot.red

Run the strategy-organized benchmark suite and read the family breakdown:

python scripts\benchmark.py --player warriors\active\candidates\bot.red

List the available benchmark suites:

python scripts\benchmark.py --list-suites

Run a complete round-robin:

python scripts\tournament.py --mode round-robin --player warriors\active\mine\SilkStunRamp2.red

Validate that pMARS can assemble a warrior without playing rounds:

tools\pmars\pmars.exe -r 0 warriors\active\candidates\bot.red

Redcode Conventions

Use ICWS'94 unless you deliberately target an older hill:

;redcode-94
;name Warrior Name
;author Your Name
;strategy One sentence about the main idea.
;assert CORESIZE == 8000

        org     start
start   mov.i   0, 1
        end     start

Keep comments focused on intent: what a phase is trying to achieve, why a step size was chosen, and which cells are used as mutable pointers. Avoid explaining every opcode on every line once the surrounding phase is clear.

Documentation

Start with docs/REDCODE_REFERENCE.md for the compact language reference, docs/tutorials/LATex/main.tex for the in-depth tutorial source, docs/PROJECT_GUIDE.md for workflow notes, and docs/INVENTORY.md for a concise map of what was consolidated. The latest pMARS validation pass is recorded in docs/VALIDATION.md.

License And Credits

Original repository code and notes are MIT licensed. Third-party tools, external tutorials, and historical warrior archives keep their original authorship and license terms; see THIRD_PARTY_NOTICES.md.

About

Core War / Redcode workspace for learning ICWS'94 Redcode, testing warriors with pMARS, as well as my tutorial in latex

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors