How to write a Mind for Tyrrell's World


General strategy

Write and debug your Mind offline, with an offline copy of Tyrrell's World.
Then, when ready, submit your Mind to run online.

Absolute basics

  1. Download the files needed:
    1. Download to the same directory:
      1. tmdk.jar - The Tyrrell Mind Development Kit.
      2. tyrrellworld.properties - The properties file for the offline World.
      3. SkeletonMind.java - A skeleton Mind.
      4. compile.bat - Handy batch file.
      5. runit.bat - Handy batch file.
      6. mkjar.bat - Handy batch file.
    2. Re-name SkeletonMind.java to some unique name. From now on, we imagine you changed to to MYMIND.java
    3. In MYMIND.java, edit the line:
      1. public class MYMIND implements Mind

  2. Write your own Mind:
    1. Edit the following methods:
      1. getaction(state) - By default it returns a random action. You will want to change this to a non-random action.
    2. To compile:
      1. compile MYMIND

  3. Debug your Mind offline:
    1. To run offline:
      1. runit MYMIND

  4. Submit the Mind to run online:
    1. To make a JAR file:
      1. mkjar MYMIND
    2. Submit MYMIND.jar using the submission form.
    3. Include an index.html file to describe your Mind. This may link to and include other supporting files.
    4. Your Mind is now online. It will be on the list of all Minds, but it will not yet be on the scoreboard list of Minds, since it has had no runs in the online World yet.
    5. You can now click on it to run it in the online World (and get on the scoreboard).
    6. Other Minds can also now call your Mind.

More notes

  1. If your browser tries to re-name tmdk.jar to tmdk.zip just re-name it back to tmdk.jar

  2. Edit the following methods:
    1. newrun() - Put any startup code here. If you are using other classes, these should be instantiated here.
    2. endrun() - Put any cleanup code here.

  3. To run offline:
    1. runit MYMIND (optional switches)
  4. The optional switches are:
    1. -graphics - A graphical display will show the creature and its world.
    2. -printscore - The score is printed to standard output at every timestep.
    3. -printstate - The state is printed to standard output at every timestep.


How to write a MindM server

  1. Download:
    1. MindM.java - A skeleton MindM.
  2. Edit, compile and run as above.


Using other classes

If you use any other classes, they must implement the java.io.Serializable interface:


import java.io.Serializable;

class CLASSNAME implements Serializable 
{
 ...
}