CODING RULES

General:

  1. The contest submission should be attached to an email and sent to 'mrtrick at gmail dot com'. The attachment should be a zip or rar file, and the submission must only contain a single euphoria (.exw) program file, unshrouded. A readme.txt may be included if desired, but no other files can accompany the program. (If there are any issues with sending the submission, contact me and we'll work something out)

  2. The program must not attempt to communicate or interfere with other programs/processes in any way. This includes calls to the operating system, and any other system or shellExecute-style calls.

  3. The program must not display a window, console display, or produce any other audiovisual effect. However, the program may maintain a single external file for learning purposes. It must have the extension .DAT, and the same name and location as that of the program. It must not become more than 50KB in size. This file will be removed by the Arena before the start of each tournament, to ensure that existing programs do not have an unfair advantage against newcomers. Any I/O statements must refer only to this file.

  4. The program must not attempt to determine the identity of its opponents.

  5. The program must not attempt to continue processing between calls to get_moves().

Code:

  1. The program must only use Euphoria code. Calls to C dll's and use of assembly language will result in gratuitous disqualification of that entry. This contest is not about raw speed, you shouldn't have any need to do this anyway.

  2. The program may call routines defined in the standard RDS includes, provided other rules do not disallow them, and the appropriate "include" statements are present. win32lib is not available.

  3. The program must not attempt to access any of the specialised inter-process routines defined in libraries the eubots.ew lib inclues. This includes memshare.ew, synchronise.ew, and binary.e.

Structure:

  1. NOTE: There are four global variables in eubots.ew available to the programmer:

    These variables should not to be written to.
  2. The program must not contain any top-level statements other than what is specified below. Global variables are allowed, but they may only be declared at top-level - initialise them inside start().

  3. At top-level, the program must set a variable called entrant_name - a string holding the name of the program. It should be be unique. (So if you submit multiple entries, attach a version number to them.)

  4. At top-level, the program must set a variable called entrant_desc - a string briefly describing the program and/or its creator, maximum length 255 characters. (may contain \n)

  5. The program must contain a procedure named start(). It will be called at the start of each match. (When the program is started)

  6. The program must contain a function named get_orders(). It will be called each turn during a match. It should return a sequence containing orders for each unit the program commands.

  7. The program must contain a procedure named cleanup(). It will be called when the program is to be shut down.

  8. NOTE: get_orders() and start() no longer take any parameters.

  9. The first line of the program must be: "include eubots.ew". The last line of the program must be: "eubot_init(routine_id("start"), routine_id("get_orders"), routine_id("cleanup") )"

  10. As a rough guide:
    include eubots.ew
    -----------------------------------------------
    --(Entrant's header comments)
    entrant_name = "myprogramname_v1"
    entrant_desc = 
        "This is a description of the program.\n" &
        "It was written in a hurry, so its not " &
        "very good."
    -----------------------------------------------
    --Standard includes used
    
    -----------------------------------------------
    --Constants used by the program
    
    -----------------------------------------------
    --Global Variables (Initialise, but don't declare them)
    
    -----------------------------------------------
    --User-defined functions and procedures
    
    -----------------------------------------------
    --start procedure
    procedure start()
       *code*
    end procedure
    -----------------------------------------------
    --get_orders function
    function get_orders()
       *code*
       return orders
    end function
    -----------------------------------------------
    --cleanup procedure
    procedure cleanup()
       *code*
    end function
    -----------------------------------------------
    eubot_init(routine_id("start"), routine_id("get_orders"), routine_id("cleanup") )
    

Style

The program should show good coding style:

('Borrowing' some of Derek's style guidelines here)
If the program is very messy or difficult to read/understand, it will have points docked from its tournament total.

Speed & Resources

  1. Each entrant will be called sequentially to remove issues with the vagaries of a multi-tasking operating system.

  2. Each program may not consume more than 20 megabytes of memory while processing, and may not consume more than 10 megabytes of memory while idle. This includes the overhead in the interpreter and eubots.ew library, as it is not possible to separate them.

  3. Each program may not take more than 2 seconds to calculate and return their moves. I know this is not the best metric, as different PC's take different times. If you can think of an alternative, I'm all ears.

  4. These conditions will be evaluated by running a single separate match against an unspecified number of drones in a large special map.

Back to index
Page is copyrighted - Patrick Barnes 2004. Contact me