Tycho - data gather for Species
by Will 'Varfar', 2003
Contents
- Tycho Brahe
- Introduction
- Usage
- Download
- File format
- Compression
- Notes
Tycho Brahe
Tycho Brahe was a Danish nobleman who measured the heavens with
remarkable accuracy. He generated extremely accurate startcharts, amassed
a 3000-book library, printed his own books, and thought himself equal of
kings. His palace, Uraniborg on the isle of Hven (Ven in modern Sweden), was
the centre for astromy in his time. Falling from grace with the young Danish
king he fled to Prague and the court of Rudolph. Here he collaborated,
awkwardly at first, with a young Johannes Kepler who kept his closely guarded
startcharts when Tycho died. Tycho's legacy is these starcharts which
provided the raw data for Kepler's fantastic discoveries and which Kepler
eventually published.
Introduction
Tycho is a program to gather data on warriors. Kepler
is a companion program to analyse these datasets. Tycho takes a list of warriors
and fights each against the other. Execution logs of each instruction executed
are recorded for all fights.
Usage
To generate the exec trail datafiles:
tycho [params] warrior1.rc warrior2.rc [.. warriorn.rc]
(where params
are the standard pmars/exhaust switches for
coresize, processes etc; -d 100
is recommended.) This will
print a report to standard output in html format, which you might want to
redirect to a file for future reference.
To validate the exec trail datafiles:
exstat warrior1.rc.ex [.. warriorn.rc.ex]
This will print a report to standard output in html format, which you
might want to redirect to a file for future reference and for comparision
to the similiar report from tycho
.
Download
Tycho is currently only in CVS; to download use:
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/redcoder checkout tycho
Alternately, you can browse the code online here
File format
each processed .rc file gets a corresponding .rc.ex file. This file has the
following format:
.EX file format
===============
Will 'Varfar', (c) 2003
--------------------
unsigned int id; // a number for this warrior; 0-based
battle_t 0;
....
battle_t n;
--------------------
where battle_t is:
--------------------
unsigned int enemy_id; // who was this fight against?
unsigned int len; // how many opcodes are there?
block_t 0;
...
block_t n;
--------------------
where block_t is:
--------------------
unsigned int len; // how maybe bytes
byte 0;
...
byte n;
--------------------
where the bytes in block_t decompress to form n bytes of opmod_ts.
There are as many blocks as necessary to store battle_t.len opmod_ts.
where opmod_t is:
--------------------
unsigned char opmod; // packed with _OP(op,mod) from Exhaust: insn.h
-------------------- |
Exstat
makes a good skeleton for an iterative analyser.
Compression
Exec trails are extremely long; billions of opcodes takes billions of bytes
to store. Fortunately, this data is extremely repeatitive, and therefore
ideal for compressing. Tycho uses zlib
for compressing exec
trails on the fly. Typically this leads to a 97% improvement! Fantastic!
Sorry to anyone on Windows who might have problems setting up a
zlib
for msys
or whatever.
Notes
Tycho uses unsigned long long
datatypes for large variables.
This works fine with GCC, but is not exactly a standard c datatype,
and other compilers may complain.