NOBLE APE MAILOUT - SEPTEMBER 2005

DEBUGGING APESCRIPT
SCRIPTED BIOLOGY
LINUX TESTING
AVERAGE MAILOUT SUBSCRIBER

DEBUGGING APESCRIPT

ApeScript has dominated the development over the past month. The latest feature which has introduced a great deal of feedback to the development is debugging of ApeScript. A single instance of ApeScript is run through the Simulation - the logic and variable setting is outputted to a date and time stamped text file.

The debugging has been extremely useful working through validation of the ApeScript syntaxing logic and general validation. This is a small step in making a new group of Noble Ape users who run ApeScript simulation experiments. But the ability to provide debugged examples adds to the documentation and additional assistance for novice users.

Here is some example ApeScript;

/* shows the basic vectors from vector_angle */
function ( show_angle ){
   show_vector_state = 1;   /* identify basic */
   show_angle_x = vector_x;
   show_angle_y = vector_y;
}

/* shows the inverted vectors from vector_angle */
function ( show_invert ){
   show_vector_state = 0 - 1;   /* identify inverted */
   show_angle_x = vector_y;
   show_angle_y = 0 - vector_x;
}

function ( being ){
   /* loop is zero to start */
   while ( loop < 63 ){
      vector_angle = loop;

      /* shows the use of a variable/function pointer */
      angle_function = show_angle;
      if ( loop > 30 ){
         angle_function = show_invert;
      }
      run ( angle_function );

      /* increase the initial loop rate */
      if ( loop < 40 ){
         step_size = step_size + 5;
      }
      step_size = step_size + 6;

      loop = loop + step_size;
   }
}

And the corresponding ApeScript debugger output;

function( being ){
   while ( ) {
      vector_angle = 0 ;
      angle_function = 9 ;
      if ( ) { }
      run( angle_function ){
         show_vector_state = 1 ;
         show_angle_x = 840 ;
         show_angle_y = 0 ;
         }
      if ( ) {
         step_size = 5 ;
         }
      step_size = 11 ;
      loop = 11 ;
      vector_angle = 11 ;
      angle_function = 9 ;
      if ( ) { }
      run( angle_function ){
         show_vector_state = 1 ;
         show_angle_x = 395 ;
         show_angle_y = 740 ;
         }
      if ( ) {
         step_size = 16 ;
         }
      step_size = 22 ;
      loop = 33 ;
      vector_angle = 33 ;
      angle_function = 9 ;
      if ( ) {
         angle_function = 38 ;
         }
      run( angle_function ){
         show_vector_state = -1 ;
         show_angle_x = -83 ;
         show_angle_y = 836 ;
         }
      if ( ) {
         step_size = 27 ;
         }
      step_size = 33 ;
      loop = 66 ;
      }
   }

SCRIPTED BIOLOGY

As the debugging example shows, ApeScript provides a powerful tool to interrogate the Simulation in single cycles. Earlier in the month I was chatting with Pedro about the effective uses of ApeScript. Through the discussion I mentioned it should be relatively easy to re-introduce the biological simulation through the scripting interface. It turns out it is just a single additional function.

Scripted biology can be used to cultivate the Apes dietary preference and a number of additional realism interfaces. Consider a possible future implementation of the Simulation where the graphics are controlled through an ApeScript layer. Thus all the biological elements of the Simulation can be shown through the graphics interface's interrogation of the Simulation through ApeScript.

One of the central themes in the development of ApeScript sees an elimination of a lot of the hardcoded elements of the Simulation in favour of a number of low-level communicating layers that can be directly edited and changed through ApeScript files. This would make the relatively small Simulation substantially leaner and allow for a wide variety of user created simulation environments.

LINUX TESTING

A quick note for any Linux users who are interested in testing the latest Ocelot interface version of the Simulation. Pedro has developed a version and he'd like to work with a Linux user, preferably someone who has run the Ocelot version on Mac or Windows, to check his version. Please contact me directly and I will forward your interest on to Pedro.

AVERAGE MAILOUT SUBSCRIBER

Recently I noticed the mailout had reached 50 subscribers. Add about 30 on the Noble Warfare mailing list and probably an additional 15 unique users on the developer mailing list. Whilst this remains a relatively small number compared to the downloads of the Simulation, it is great to know that such a diversity of folks get my monthly musings on Noble Ape. Looking through the statistics on Yahoo, it appears the average mailout member is male and in his early 30s. Not the demographic I have associated with the Simulation previously but the Simulation's userbase has many shifts in demographics based on a number of factors.

Many thanks for your continued interest in the Noble Ape development.

Hope all is well with you all,

Tom Barbalet, 25 September 2005.


Noble Ape - Mailout Archive