Anima Robot Warfare 1

Rules

 Main Page  Rules  E-mail  E-mail(RU)


-= Robot Warfare 1 =-

http://attend.to/robots

Copyright (c) 1998-1999 by
Shabarshin A.A. (shaba@earthcorp.com),
Unegov S.V. (unegov@a-vip.com).

December 1998 - May 1999

Robot Warfare 1 Rules
Version 1.8.0 e

1. ROBOT WARFARE 1 - GAME BY E-MAIL
  1.1 INTRODUCTION
  1.2 GAMERS
  1.3 ELECTRONIC ADDRESSES, MAIL-LIST
  1.4 REQUESTING BY E-MAIL

2. COMPETITION RULES
  2.1 COMPETITION CONDUCT
  2.2 RIGHTS OF THE BEST ROBOT AUTHOR
  2.4 RESULTS COUNTING AND ROBOT-WINNER DESIGNATION
  2.5 ROBOT IDENTIFICATION
  2.6 ROBOT DELETING

3. BATTLE RULES
  3.1 BATTLE FIELD
  3.2 ROBOT EQUIPMENT
  3.3 MOVING AND RELATIVE COORDINATES OF ROBOT
  3.4 ENERGY
  3.5 WALLS AND STONES
  3.6 GUN USING
  3.7 EYE USING
  3.8 RADAR USING

4. "ROBOT WARFARE 1" (RW1) LANGUAGE
  4.1 RW1-TEXT AND RW0-PSEUDOCODE
  4.2 ROBOT SAMPLE
  4.3 RW1-LANGUAGE
  4.4 GOING INTO DETAILS OF PROGRAMMING

===========================================================================

1. ROBOT WARFARE 1 - GAME BY E-MAIL

1.1 INTRODUCTION

ROBOT WARFARE 1 is the game. Anyone can play it. All you need to do is read the rules, describe the robots behavior using the specially designed language (RW1) and send us the program by e-mail (robots@army.net). Don't forget to put RW1 in the subject and author nickname after a colon ("RW1:ALEX" for example).

1.2 GAMERS

The Gamer is the robots author. He uses a nickname. If he sends new robot to us he has to write his nickname in the letter subject (RW1:ALEX for example). Before the robot can be sent the author must register in our database. To register send us an e-mail with the subject REG:NICKNAME where NICKNAME is an author nickname. In this message the author can write their age, profession, sex and any other information they like. Nobody can get this private information without your permission. This information helps to avoid confusion when some authors wish to take the same nickname for themselves.

1.3 ELECTRONIC ADRESSES, MAIL-LIST

We know authors e-mail and nobody except us does if author does not want to make his e-mail public. Therefore letter you want to send another author must be send via us (robots@army.net). To do it you have to put "MAIL" to subject, then colon and the nickname of the author you want to send to. For instance if someone wants to send a letter to ALEX. They should put "MAIL:ALEX" as the subject and send it to robots@army.net. The letter will be forwarded in a day.
We have mail-list rware@onelist.com in english. For subscribing send empty message to rware-subscribe@onelist.com. For unsubscribing send empty message to rware-unsubscribe@onelist.com

1.4 REQUESTING BY E-MAIL

You can request by e-mail robots@army.net (subject:REQUEST) these items :
1) RULES (russian or english) (20K)
2) RW1_COMP - RW1 compiler (25K)
3) RW1_DUEL - visualisation of robot fighting (50K)
4) RW1_SND - SoundBlaster support for RW1_DUEL (19K)
5) RESULTS - full results and statistics of latest championship (60-80K)
6) ROBOT "robotname" - any robot from latest championship (0.1-4K)
  or ROBOT SRC - for all robots with source code
   ROBOT A - for all robots from class A
   ROBOT B - for all robots from class B ...
Put any of this keywords and you receive it.

2. COMPETITION RULES

2.1 COMPETITION CONDUCT

Competitions are held on our server weekly. The rank list is also updated weekly. On the site you will find the statistics about the fights and the code of rival robots.

2.2 RIGHTS OF THE BEST ROBOT AUTHOR

The author of the best robot may place their photo (no more then 16Kb) and a small comment (comment and photo must not be contrary to legal regulations) on the site.

2.3 RESULTS COUNTING AND ROBOT-WINNER DESIGNATION

All robots are divided into several classes. Class A is the highest class. There are 16 robots in each class beside the lowest class where from 5 to 20 robots can be. The fights are held between pairs of all the robots which are in the same class. Each fight runs for 10000 ticks. The robot wins if it survives and kills the enemy robot. After each fight the winner gets 1 point and the loser gets 0 points. Finally we get three the best robots and three the worst robots in each class. Three the best ones cross into a higher class. If they were already in class A they stay there and the first robot is considered to be winner. Three the worst ones cross into a lower class. If they were already in the lowest class they stay there and if a robot collects 0 points it deletes from competitions.

2.4 ROBOT IDENTIFICATION

An author has to devise :

2.5 ROBOT DELETING

Robot can be dissmissed in three cases:

3. BATTLE RULES

3.1 BATTLE FIELD

The fight is held on the 10x20 field. There is a solid wall around the playing field. Stones are randomly placed on the field. The robot can't go over them but it can shoot them. Several objects can be on the field in a cell. They are: At the beginning of the fight each robot is placed in a random cell on the playing field . The appearance of the field is defined by a real number (from 0 to 1). There are four adjoining cells to a robot a : front, behind, left and right of the robot. A robot that falls into a hole is considered to be dead. Robots can pick up boxes with missiles. There are ten missiles in each box. At the beginning the robot has only 10 missiles but can have any number of missiles.

3.2 ROBOT EQUIPMENT

A robot has four seats for equipment (in the front, behind, on the left and on the right). In every seat you can have either a gun or an eye (for example a robot can have four guns or three eyes and one gun).

3.3 MOVING and RELATIVE COORDINATES of ROBOT

Robot can move only in a straight line and turn to the left or the right. No energy is lost if a robot collides with a stone or the wall. An action accounts for 1 measure of time (a tick). The coordinates of the robot are relative. Thus, coordinates of the robot are (0,0). The absciss axis is to the right of robot and the ordinate axis is to the front of robot.

3.4 ENERGY

At the beginning of the game each robot has an energy level of 5. The maximum level is 13. When a missile hits a robot his energy level decreases by 1. Robot charging occurs when a robot stands in a cell adjacent to a Nuclear Reactor. When this happens the robots energy increases by 1 for every 5 ticks of game time. Also, if there are two reactors in adjacent cells the energy increases for 2 per 5 ticks.

3.5 WALLS AND STONES

Robots cannot go throught the outer wall around the fight field. If a robot shoots it nothing happens. Also, robots cannot go through a stone but the stone can be destroyed if it is hit five times.

3.6 USING THE GUN

A robot can fire a missile in any direction that it has a gun for. The speed of a missile is 5 cells per 1 tick. The missile flies until it meets an obstacle. If a missile hits a missile box, the box bursts and annihilates everything in a 3x3 square. If a robot is standing in the square its energy decreases byr 3. The same thing happens with nuclear reactor but the square is 5x5 and robot energy decreases by 5.

3.7 USING EYE

The eyes are given to the robot for seeing. Each eye gives the robot the following information:

3.8 USING THE RADAR

Use of the radar requires energy. A single use requires 1 unit. The radar gets is told the type of object to find and gives the robot relative coordinates of the nearest object of that type.

4. "ROBOT WARFARE 1" (RW1) LANGUAGE

4.1 RW1-TEXT AND RW0-PSEUDOCODE

The source code for the behaviour of the robot is written to a file that name ending in .rw1. Compiled source code gets the extension .rw0. Files that name ending .rw0 are unreadable whereas files that name ending in .rw1 are as readable as any source code.

4.2 ROBOT SAMPLE

   % ================= WSIMPLE.RW1 ==================
   % Example of simple robot
   % with an eye
   % and a gun.
   % Run:    RW1_DUEL.EXE  WSIMPLE.RW1

   ROBOT "WinSimple Robot"

     COLOR FFD010

     FRONT EYE
     LEFT  GUN

   START:

     ACT FRONT        % Look in front
     if N!=6 : L1     % If there is a robot there then
        RIGHT
        ACT LEFT      % shoot
        LEFT
        GOTO START
     L1:
     if N!=3 : L3     % If there is a box with missiles then
        STEP          % go ahead
        GOTO START
     L3:              % If there is neither box nor robot then
                      % it means that there is a barrier in the direction
     if D==1 : L4     % If the distance from it is greater then 1 then
        STEP          % make a step
        GOTO START
     L4:
     RIGHT            % If the barrier is in the next cell
     GOTO START       % turn to right

   END
   

4.3 RW1-LANGUAGE

Warning: It would be advisable to have some programming experience before attempting to use this program (Any language will do) See the robot sample 'wsimple.rw1' at the previous part as an example as to how this language works.
Comments : A '%' in a line marks the rest of that line as a comment (same as ';' in Assembler or '//' in C++) Each command in the code takes 1 tick to execute.
The program begins with the keyword ROBOT followed by name of the robot in commas. The end of the is marked by the keyword END. The color of robot is defined by the keyword COLOR followed by color in hex from Red, Green and Blue Values. For example:
   COLOR FF0000 % red
   COLOR 00FF00 % green
   COLOR 0000FF % blue
   COLOR FFFFFF % white
   COLOR C0C0C0 % light gray and so on.

   The image of the robot is stored in eight of these IMAGE lines
   Each number corresponds to a pixel.
   IMAGE 0 0 0 0 0 0 0 0   % 1st string, 8 black points
   IMAGE 0 0 0 0 0 0 0 0   % 2nd string,
   IMAGE 0 0 1 1 1 1 0 0
   .....
   IMAGE 0 0 1 A B 0 0 0
   IMAGE 0 0 0 0 0 0 0 0   % 8th string,

   where
         0 - BLACK        8 - DARKGRAY
         1 - BLUE         9 - LIGHTBLUE
         2 - GREEN        A - LIGHTGREEN
         3 - CYAN         B - LIGHTCYAN
         4 - RED          C - LIGHTRED
         5 - MAGENTA      D - LIGHTMAGENTA
         6 - BROWN        E - YELLOW
         7 - LIGHTGRAY    F - WHITE

   To set what equipment the robot has in which slot you should
   use the following commands: FRONT, BACK, LEFT, RIGHT
   followed by EYE or GUN. For example, if  you want
   to set all four slots to be guns, you should write

   FRONT GUN
   BACK  GUN
   LEFT  GUN
   RIGHT GUN

   If you want to set a gun in front and an eye behind you should write

   FRONT GUN
   BACK  EYE

   The configuration of robot (color, picture and equipment) is set
   after the line with the key word ROBOT and before label START.

   A Label is a word followed by colon.
   The first label in the program must be

START:

   NB:  You cannot write a command on a line where there is a label
only comments. A Label is not a command so it is not executed.
   If you use arrays you should declare them after the START label
as follows:

                        DEF name[k]

where k is a number from 1 to 10000.
NB:  the quantity of all variables and length of the array can
not be bigger then 10000.
Variables exist from their first usage. The numeric range of
variables and array elements is -32768..32767.

   All variables, arrays and labels must have unique names.
Key words, names of registers can not be names.
(Basic programming concepts which should be obvious ;-)

   Registers of robot (they are read only):

   X,Y - relative coordinates of object,
   D - distance,
   N - type of object (see 3.1),
   K - extra register,

   R - random number 0..999
   T - value of ticks counter

   E - energy level of YOUR robot,
   M - number of missiles which YOUR robot has,

   Commands of RW1-language:

   GOTO label % go to label which name is "label"
   CALL label % call procedure from label "label"
   RET        % return from procedure

   STEP  % make a step in the direction in which the robot is facing,
         % If the movement failed  it returns into register N the type of object (see 3.1),
         % which prevented the movement of the robot,
         % or 0 if it succeeded
   LEFT  % turn to left
   RIGHT % turn to right

   SAY "string"  % robot says (it will be output to terminal) string

   % some of the commands are written in form, eg  command n,
   % where command is a name of command,
   % and n can be a number, a variable or an element of array.

   PRINT n % robot outputs to the terminal the value
           % of a variable or an element of array.

   ACT n % use the equipment (an eye or a gun)
         % on that part of the robot
         % ( 0- in front, 1- at right, 2- in back, 3- at left or
         %   FRONT, RIGHT, BACK and LEFT accordingly ),
         % eye returns information to the follow registers:
         % D - distance from the object (1 - adjacent cell),
         % N - type of object in the chosen direction (see 3.1),
         % K - energy level if you see another robot,
         % stone safety if you see a stone,
         % flight direction if you see a missile (see 3.7)

   SPY   % get information about the last fired missile
         % If it hit something the command returns current relative
         % coordinates of the missile or the object which was struck by
         % it to X and Y registers
         % register N - type of object (see 3.1),
         % 0 - if the missile is in flight,
         % -1 - if no missiles were fired.

   RADAR n  % use radar for finding of n = 0..6 type object,
            % relative coordinates returns to X and Y registers
            % If both X and Y are equal to 0 then the object is not found.
            % K - quadrant (0,1,2,3)
            % D - minimal abs of coordinates (only for 1.8 version)

   % in further text:
   % n can be variable, element of array,
   % m,k can be number, variable, element of array or register.

   IF k<m : label  % if k is less than m go to label
   IF k>m : label  % if k is greater than m go to label
   IF k<=m : label % if k is less then m or equal to m go to label
   IF k>=m : label % if k is greater than m or equal to m go to label
   IF k==m : label  % if k is equal to m go to label
   IF k=m : label   % if k is equal to m go to label
   IF k!=m : label  % if k is not equal to m go to label
   IF k<>m : label % if k is not equal to m go to label

   n=m % give the value of m to n

   % possible expressions
   n=-m   % give the negative value of m to n
   n=m+k  % addition
   n=m-k  % subtraction
   n=m/k  % division. n will be integer namber
   n=m*k  % multiplication
   n=m%k  % remainder of the division m by k

   n=m&k  % binary AND
   n=m|k  % binary OR
   n=m^k  % binary exclusive OR
   n=~m   % binary inversion

   If you incorrectly use stack of returns (CALL and RET), than
it lead to HALT state, that means that robot is dead. HALT state
is appear for any incorrect actions of RW1 program.

   

4.4 GOING INTO DETAILS OF PROGRAMMING

Sorry, under construction...

We wish you every success.

Any questions?


Designed by SHABUN
Authors: Shabarshin A.A., Unegov S.V.
Page created on December 6th 1998
Last update on May 13th 1999