Code Monkey home page Code Monkey logo

corewar's Introduction

Core War

The Canadian mathematician A. K. Dewdney (author of "The Planiverse") first introduced Core War in a series of Scientific American articles starting in 1984.

Core War was inspired by a story I heard some years ago about a mischievous programmer at a large corporate research laboratory I shall designate X. The programmer wrote an assembly-language program called Creeper that would duplicate itself every time it was run. It could also spread from one computer to another in the network of the X corporation. The program had no function other than to perpetuate itself. Before long there were so many copies of Creeper that more useful programs and data were being crowded out. The growing infestation was not brought under control until someone thought of fighting fire with fire. A second self-duplicating program called Reaper was written. Its purpose was to destroy copies of Creeper until it could find no more and then to destroy itself. Reaper did its job, and things were soon back to normal at the X lab.

In this game, computer programs (called "Warriors") compete in a virtual arena for digital supremacy. Warriors are written in an Assembly dialect called "Redcode".

Wikipedia article

This is a Python implementation of the MARS (Memory Array Redcode Simulator).

usage: graphics.py [-h] [--rounds [ROUNDS]] [--paused] [--size [CORESIZE]]
                   [--cycles [CYCLES]] [--processes [MAXPROCESSES]]
                   [--length [MAXLENGTH]] [--distance [MINDISTANCE]]
                   WARRIOR [WARRIOR ...]

MARS (Memory Array Redcode Simulator)

positional arguments:
  WARRIOR               Warrior redcode filename

optional arguments:
  -h, --help            show this help message and exit
  --rounds [ROUNDS], -r [ROUNDS]
                        Rounds to play
  --paused              Start each round paused
  --size [CORESIZE], -s [CORESIZE]
                        The core size
  --cycles [CYCLES], -c [CYCLES]
                        Cycles until tie
  --processes [MAXPROCESSES], -p [MAXPROCESSES]
                        Max processes
  --length [MAXLENGTH], -l [MAXLENGTH]
                        Max warrior length
  --distance [MINDISTANCE], -d [MINDISTANCE]
                        Minimum warrior distance

corewar's People

Contributors

rodrigosetti avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.