XRK Extra RedCode Kit v1.50.1

Copyright 1992-2012 By Marco Pontello

This file is dedicated to whom have already some Core War experience and want to find quickly what are the peculiar features of this CW system.

So we'll just do a quick guided tour, starting with any warrior of your choice. We'll call it pippo.red. Let's assemble it with:

C:\XRK> xra pippo

If in the source there's some remarks like "by Humpty Dumpty", or "author Humpty Dumpty", Humpty Dumpty will be taken as the program author a injected in the resulting object code file (.RBJ). If no author note is found, XRA will ask for it. This way it will be always possible to quickly identify a warrior's author.

XRA will stop and warn about any problem it will detected, with a nice error message, line number and position.

XRA recognize some peculiar expression, within squared brackets, and will consider them as references relative to the program starting location. So it's possible to write:

        ...
Start   MOV     A, [1000]
        MOV     B, [1001]
        SPL     [1000]
        ...

Instead of:

        ...
Start   MOV     A, (Start+1000)
        MOV     B, (Start+1001)
        SPL     (Start+1000)
        ...

Now we have a pippo.rbj file, the assembled Redcode warrior ready for a simulation. So to start the MARS:

C:\XRK> xrs pippo

The simulation start with a 128x64 representation of the core, 128x64, with the brave warrior at the center, and with the cycles passing at slow speed.. To speed up, just press the right [SHIFT]; with the left [SHIFT] instead, the step-by-step / debug mode is enabled. In this mode, on the lower part of the screen all the executed instructions will be displayed. Each program counter position is also shown up graphically in the core. Pressing any key, a cycle will be completed.

With [ENTER], the inspect cursor is activated. It can be moved with the cursor keys, and on the lower band the pointed core location will be shown in details.

Stop the simulation with [ESC], and try to see if Pippo can hold be itself against, say, Mice. Let's start a match with 100 rounds:

C:\XRK> XRS Pippo Mice /R:100

This will start a quick simulation in text-mode, showing just the results after each round. Instead:

C:\XRK> XRS Pippo Mice /R:100 /G

Start a simulation not as fast, but still very fast and much more eye-catching. In addition to the current round, the last 3 rounds will remain on screen, as the view windows will be alternating after each round.

It is to be noted that, by default, the programs allocations in the core isn't random, but optimized (for additional details, check the XRS sections in the manual.txt file). This will be immediately evident trying the same match again: the results will be exactly the same.

For the purists that prefers the standard random allocation, just add the switch '/S' to the command line. To have a taste of the differences, just try a Dwarf vs Dwarf match with the standard and then with the optimized allocation.

Now to a real tournament. XRC uses a Playback System to avoid to re-do every time matches for witch the results are already known. This way, it get a dramatic reduction of the simulations times, especially during the testing phase of a new warrior, when it will be put against a certain set of known opponents times and times again.

XRK packaged already contains the playback.xrd file with the results of a tournament already simulated, with all the warriors included as a sample. The detailed report can be seen in the results.txt file generated by XRC.

To try Pippo in the tournament, against all the other warriors, just type:

C:\XRK> xrc /l

The '/L' switch tell XRC to get all warriors names from the default playlist, the playlist.xrd file. Just confirm each player with an [ENTER]. Note that the existence and integrity of each of them is verified at this point.

At the last empty prompt, type 'Pippo', press [ENTER] and the tournament will start.

During the simulation, statistic data will be displayed for each player, like percentage of rounds won, lost & drawn. The scores are updated at the end of each match, as is the ETA for the conclusion.

As it will be immediately clear, only the matches with the new warrior are in fact simulated; every other match is just read from Playback System, instantaneously.

If there are other PC available is the network (of any kind; only a shared folder is needed for the communications), it possible to take advantage of the network capabilities of XRC, witch will share the workload of the various matches among all the participating PC, while showing the current tournament scores on all screens. It's a great setup to waste some times in the office! :-)

Just add the switch '/net:master' on the main PC, and '/net:slave' in all the others. All the competition parameters (warriors, rounds numbers, allocation, etc.) will be selected by the master, and passed to all the slaves. At any point during the simulation, some slave may be added, or some may exit from the pool, without limitations. Just the master need to be always active.

At the end of tournament, the slave machines will display the final scores and put in stand-by, awaiting further instruction from the master (for example, the details of a new simulation). This way, a number of slaves could be started and will remain always ready to contribute their CPU power.

This complete a quick look at XRK. Other info are in the manual.txt file, where each module of the system is described in details.