// Path: src/main/java/ch/idsia/benchmark/tasks/MarioSystemOfValues.java
// public class MarioSystemOfValues extends SystemOfValues
// {
// final public int distance = 1;
// final public int win = 1024;
// final public int mode = 32;
// final public int coins = 16;
// final public int hiddenItems = 24;
// final public int flowerFire = 64;  // not used for now
// final public int kills = 42;
// final public int killedByFire = 4;
// final public int killedByShell = 17;
// final public int killedByStomp = 12;
// final public int timeLeft = 8;
// final public int hiddenBlocks = 24;
// 
// public interface timeLengthMapping
// {
//     final public static int TIGHT = 10;
//     final public static int MEDIUM = 20;
//     final public static int FLEXIBLE = 30;
// }
// }
// 
// Path: src/main/java/ch/idsia/benchmark/tasks/SystemOfValues.java
// public class SystemOfValues
// {
// public int distance = 1;
// public int win = 1024;
// public int mode = 32;
// public int coins = 16;
// public int flowerFire = 64;
// public int kills = 42;
// public int killedByFire = 4;
// public int killedByShell = 17;
// public int killedByStomp = 12;
// public int mushroom = 58;
// public int timeLeft = 8;
// public int hiddenBlock = 24;
// public int greenMushroom = 58;
// // For Intermediate rewards only
// public int stomp = 10;
// }


import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.text.DecimalFormat;
import ch.idsia.benchmark.mario.engine.sprites.Mario;
import ch.idsia.benchmark.tasks.MarioSystemOfValues;
import ch.idsia.benchmark.tasks.SystemOfValues;
public long bytecodeInstructions = MagicNumberUnDef;

public int levelLength = MagicNumberUnDef;

public int collisionsWithCreatures = MagicNumberUnDef;

private static final int[] retFloatArray = new int[EvaluationInfo.numberOfElements];
private static final int[] zeros = new int[EvaluationInfo.numberOfElements];
public String Memo = "";

private static final DecimalFormat df = new DecimalFormat("#.##");
private static MarioSystemOfValues marioSystemOfValues = new MarioSystemOfValues();

public int[][] marioTrace;
public String marioTraceFileName;

private long evaluationStarted = 0;
private long evaluationFinished = 0;
private long evaluationLasted = 0;

public EvaluationInfo()
{
    System.arraycopy(EvaluationInfo.zeros, 0, retFloatArray, 0, EvaluationInfo.numberOfElements);
}

public int computeBasicFitness()
{
    return distancePassedPhys - timeSpent + coinsGained + marioStatus * marioSystemOfValues.win;
}

// Path: src/main/java/ch/idsia/benchmark/tasks/MarioSystemOfValues.java
// public class MarioSystemOfValues extends SystemOfValues
// {
// final public int distance = 1;
// final public int win = 1024;
// final public int mode = 32;
// final public int coins = 16;
// final public int hiddenItems = 24;
// final public int flowerFire = 64;  // not used for now
// final public int kills = 42;
// final public int killedByFire = 4;
// final public int killedByShell = 17;
// final public int killedByStomp = 12;
// final public int timeLeft = 8;
// final public int hiddenBlocks = 24;
// 
// public interface timeLengthMapping
// {
//     final public static int TIGHT = 10;
//     final public static int MEDIUM = 20;
//     final public static int FLEXIBLE = 30;
// }
// }
// 
// Path: src/main/java/ch/idsia/benchmark/tasks/SystemOfValues.java
// public class SystemOfValues
// {
// public int distance = 1;
// public int win = 1024;
// public int mode = 32;
// public int coins = 16;
// public int flowerFire = 64;
// public int kills = 42;
// public int killedByFire = 4;
// public int killedByShell = 17;
// public int killedByStomp = 12;
// public int mushroom = 58;
// public int timeLeft = 8;
// public int hiddenBlock = 24;
// public int greenMushroom = 58;
// // For Intermediate rewards only
// public int stomp = 10;
// }


// Path: src/main/java/ch/idsia/tools/EvaluationInfo.java
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.text.DecimalFormat;
import ch.idsia.benchmark.mario.engine.sprites.Mario;
import ch.idsia.benchmark.tasks.MarioSystemOfValues;
import ch.idsia.benchmark.tasks.SystemOfValues;

public long bytecodeInstructions = MagicNumberUnDef;

public int levelLength = MagicNumberUnDef;

public int collisionsWithCreatures = MagicNumberUnDef;

private static final int[] retFloatArray = new int[EvaluationInfo.numberOfElements];
private static final int[] zeros = new int[EvaluationInfo.numberOfElements];
public String Memo = "";

private static final DecimalFormat df = new DecimalFormat("#.##");
private static MarioSystemOfValues marioSystemOfValues = new MarioSystemOfValues();

public int[][] marioTrace;
public String marioTraceFileName;

private long evaluationStarted = 0;
private long evaluationFinished = 0;
private long evaluationLasted = 0;

public EvaluationInfo()
{
    System.arraycopy(EvaluationInfo.zeros, 0, retFloatArray, 0, EvaluationInfo.numberOfElements);
}

public int computeBasicFitness()
{
    return distancePassedPhys - timeSpent + coinsGained + marioStatus * marioSystemOfValues.win;
}

public int computeWeightedFitness(SystemOfValues sov)