Yatagan/Source

From Robowiki
< Yatagan
Revision as of 01:11, 4 May 2013 by Sheldor (talk | contribs) (→‎Development Version: Let's try it with only four exploitative rounds.)
Jump to navigation Jump to search

Development Version

Codesize: 249

/*
Yatagan 1.0.8 by Sheldor & Skilgannon;  Release date:  2013/05/03
The yatagan is a short sabre which was used extensively in the Ottoman Empire.
Codesize:  249 bytes without any colors
 
Credits: 
Pattern Matching code from simonton.WeekendObsession_S and mld.Moebius, heavily modified.
And a general thanks to all open source bot authors and contributors to the RoboWiki.
 
Yatagan is open source and released under the terms of the RoboWiki Public Code License (RWPCL) - Version 1.1.
See license here: http://robowiki.net/wiki/RWPCL
*/
 
package sheldor.jk;
 
import robocode.*;
import robocode.util.Utils;
 
public class Yatagan extends AdvancedRobot
{
//Global variables.
   static double direction;
   static double enemyEnergy;
 
   static int deathCount;
 
   public void run()
   {
      setAdjustGunForRobotTurn(true);
   
   //Start spinning radar and initialize direction to infinity.
      setTurnRadarRightRadians(direction = Double.POSITIVE_INFINITY);
   }
 
   public void onScannedRobot(ScannedRobotEvent e)
   {
      //Local variables.
      int integer = 30;
      double absoluteBearing;
      int matchPosition;
   
      //Orbiting/Oscillating/Random movement, all depending on the size of the number you multiply the random with.
      if( (char) ((enemyEnergy - 1.09999999999 
      + chancesOfReversing.charAt(deathCount)*Math.random() 
      - (enemyEnergy = e.getEnergy()))) <= 1 )
      {
         //Reverse direction.
         //Calling the onHitWall event saves two bytes.
         onHitWall(null);
      }		
      setAhead(direction);     
   
   
   
      //Record the current enemy lateral velocity.
      enemyHistory = String.valueOf((char) (e.getVelocity() * (Math.sin(e.getHeadingRadians() - (absoluteBearing = e.getBearingRadians() + getHeadingRadians()))))).concat(enemyHistory);   
   
      //Pattern Matching.      
      // search for a match
      while((matchPosition = enemyHistory.indexOf(enemyHistory.substring(0, integer--), 64)) < 0);
   
      //Stay mostly perpendicular to the enemy, but try to maintain a distance of 220 pixels.
      //SHELDOR:  Let's try 220 this time.
      setTurnRightRadians(Math.cos(e.getBearingRadians()) + ((220.0 - (integer = (int)(e.getDistance()))) * (getVelocity()  / 3200)));
   
      do
      { 
         absoluteBearing += ((short) enemyHistory.charAt(--matchPosition)) /  e.getDistance();
      }
      while ((integer -= 13) > 0);
   
      //Aim at the predicted target.
      setTurnGunRightRadians(Utils.normalRelativeAngle(absoluteBearing - getGunHeadingRadians()));
   
      //Fire!
      //Bullet power must be a multiple of 0.33333... or else the gun will be inaccurate.
      //SHELDOR:  Though lower-power bullets make us easy rambot prey, they will probably result in a larger overall APS score.
      setFire(2.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333);
   
      //Infinite radar lock.
      setTurnRadarLeftRadians(getRadarTurnRemainingRadians());
   }
 
   public void onDeath(DeathEvent e)
   {
      //When the bot dies, move to the next cell in the table.
      deathCount++;
   }
 
   public void onHitWall(HitWallEvent e)
   {
      //Reverse direction.
      direction = -direction;
   }
 
   //The chance that Yatagan will reverse direction when the enemy fires.
   //Since this is an unchanging table, we can use 'final' to save a few bytes.
   private static final String chancesOfReversing = ""
   + (char)60000 + (char)0 + (char)60000 + (char) 0
   //100 rounds of deaths, should be enough?
   // range which will produce 'bullet hit': 3.0999 - 0.0999 = 3
   //required reverse probability, from Toorkild's formula: 0.6*sqrt((20 - 3*2.5)/160) - 0.04 ~= 0.125
   //thus 3/x = 0.125 --> x = 3/0.125 = 24
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29;
 
 
 
//Preloaded log of enemy movements for pattern matcher so it doesn't need error checking.
   static String enemyHistory = ""
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 2
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char)-2 + (char)-4 + (char)-6
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-7 + (char)-6 + (char)-5 + (char)-4
   + (char)-3 + (char)-2 + (char)-1 + (char)1
   + (char) 2 + (char) 4 + (char) 6 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 7 + (char) 6 + (char) 5 + (char) 4
   + (char) 3 + (char) 2 + (char) 1 + (char) 1;
}

Latest Released Version (1.0.7)

Codesize: 249

/*
Yatagan 1.0.7 by Sheldor & Skilgannon;  Release date:  2013/05/03
The yatagan is a short sabre which was used extensively in the Ottoman Empire.
Codesize:  249 bytes without any colors
 
Credits: 
Pattern Matching code from simonton.WeekendObsession_S and mld.Moebius, heavily modified.
And a general thanks to all open source bot authors and contributors to the RoboWiki.
 
Yatagan is open source and released under the terms of the RoboWiki Public Code License (RWPCL) - Version 1.1.
See license here: http://robowiki.net/wiki/RWPCL
*/
 
package sheldor.jk;
 
import robocode.*;
import robocode.util.Utils;
 
public class Yatagan extends AdvancedRobot
{
//Global variables.
   static double direction;
   static double enemyEnergy;
 
   static int deathCount;
 
   public void run()
   {
      setAdjustGunForRobotTurn(true);
   
   //Start spinning radar and initialize direction to infinity.
      setTurnRadarRightRadians(direction = Double.POSITIVE_INFINITY);
   }
 
   public void onScannedRobot(ScannedRobotEvent e)
   {
      //Local variables.
      int integer = 30;
      double absoluteBearing;
      int matchPosition;
   
      //Orbiting/Oscillating/Random movement, all depending on the size of the number you multiply the random with.
      if( (char) ((enemyEnergy - 1.09999999999 
      + chancesOfReversing.charAt(deathCount)*Math.random() 
      - (enemyEnergy = e.getEnergy()))) <= 1 )
      {
         //Reverse direction.
         //Calling the onHitWall event saves two bytes.
         onHitWall(null);
      }		
      setAhead(direction);     
   
   
   
      //Record the current enemy lateral velocity.
      enemyHistory = String.valueOf((char) (e.getVelocity() * (Math.sin(e.getHeadingRadians() - (absoluteBearing = e.getBearingRadians() + getHeadingRadians()))))).concat(enemyHistory);   
   
      //Pattern Matching.      
      // search for a match
      while((matchPosition = enemyHistory.indexOf(enemyHistory.substring(0, integer--), 64)) < 0);
   
      //Stay mostly perpendicular to the enemy, but try to maintain a distance of 220 pixels.
      //SHELDOR:  Let's try 220 this time.
      setTurnRightRadians(Math.cos(e.getBearingRadians()) + ((220.0 - (integer = (int)(e.getDistance()))) * (getVelocity()  / 3200)));
   
      do
      { 
         absoluteBearing += ((short) enemyHistory.charAt(--matchPosition)) /  e.getDistance();
      }
      while ((integer -= 13) > 0);
   
      //Aim at the predicted target.
      setTurnGunRightRadians(Utils.normalRelativeAngle(absoluteBearing - getGunHeadingRadians()));
   
      //Fire!
      //Bullet power must be a multiple of 0.33333... or else the gun will be inaccurate.
      //SHELDOR:  Though lower-power bullets make us easy rambot prey, they will probably result in a larger overall APS score.
      setFire(2.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333);
   
      //Infinite radar lock.
      setTurnRadarLeftRadians(getRadarTurnRemainingRadians());
   }
 
   public void onDeath(DeathEvent e)
   {
      //When the bot dies, move to the next cell in the table.
      deathCount++;
   }
 
   public void onHitWall(HitWallEvent e)
   {
      //Reverse direction.
      direction = -direction;
   }
 
   //The chance that Yatagan will reverse direction when the enemy fires.
   //Since this is an unchanging table, we can use 'final' to save a few bytes.
   private static final String chancesOfReversing = ""
   + (char)60000 + (char)0 + (char)60000 + (char) 0 + (char)60000 + (char) 0
   //100 rounds of deaths, should be enough?
   // range which will produce 'bullet hit': 3.0999 - 0.0999 = 3
   //required reverse probability, from Toorkild's formula: 0.6*sqrt((20 - 3*2.5)/160) - 0.04 ~= 0.125
   //thus 3/x = 0.125 --> x = 3/0.125 = 24
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29
   + (char) 29 + (char) 29 + (char) 29 + (char) 29 + (char) 29;
 
 
 
//Preloaded log of enemy movements for pattern matcher so it doesn't need error checking.
   static String enemyHistory = ""
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 2
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char) 1 + (char) 1 + (char) 1
   + (char) 1 + (char)-2 + (char)-4 + (char)-6
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-8 + (char)-8 + (char)-8 + (char)-8
   + (char)-7 + (char)-6 + (char)-5 + (char)-4
   + (char)-3 + (char)-2 + (char)-1 + (char)1
   + (char) 2 + (char) 4 + (char) 6 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 8 + (char) 8 + (char) 8 + (char) 8
   + (char) 7 + (char) 6 + (char) 5 + (char) 4
   + (char) 3 + (char) 2 + (char) 1 + (char) 1;
}