use of bandits.MBanditEA in project SimpleAsteroids by ljialin.
the class TestEA method sweepSamplingRate.
public static void sweepSamplingRate(int from, int to) {
EvoAlg ea = new MBanditEA();
// SolutionEvaluator evaluator = new EvalMaxM(nDims, mValues, 1.0);
// SolutionEvaluator noiseFree = new EvalMaxM(nDims, mValues, 0.0);
SolutionEvaluator evaluator = new EvalNoisyWinRate(nDims, mValues, 1.0);
SolutionEvaluator noiseFree = new EvalNoisyWinRate(nDims, mValues, 0.0);
for (int i = from; i <= to; i++) {
ea = new SimpleRMHC(i);
// ea = new MBanditEA();
ea = new NTupleBanditEA();
StatSummary ss = runTrials(ea, evaluator, noiseFree, nTrials, nFitnessEvals);
// System.out.format("%d\t %.2f \t %.3f \t %.3f \t %.2f\n", i, ss.mean(), ss.stdErr(), ssOpt.mean(), nOpt.mean());
System.out.format("%d\t %.3f \t %.3f \t %.3f \t %.2f\t %.3f\n", i, ss.mean(), nOpt.mean(), ssOpt.mean(), ntOpt.mean(), ntPerf.mean());
// System.out.format("%d\t %.2f \t %.2f \t %.2f \n", i, ss.mean(), ss.stdErr(), ssOpt.mean());
}
}
use of bandits.MBanditEA in project SimpleAsteroids by ljialin.
the class EvoNTupleTest method main.
public static void main(String[] args) {
// the number of bandits is equal to the size of the array
int nDims = 5;
int nTrials = 50;
int nFitnessEvals = 10000;
EvoAlg ea = new MBanditEA();
ea = new SimpleRMHC();
SolutionEvaluator evaluator = new TenFitnessEval(nDims);
System.out.println("Best fitness stats:");
System.out.println(runTrials(ea, evaluator, nTrials, nFitnessEvals));
// evaluator.
}
use of bandits.MBanditEA in project SimpleAsteroids by ljialin.
the class BattleTestEA method main.
public static void main(String[] args) {
// the number of bandits is equal to the size of the array
int nTrials = 10;
int nFitnessEvals = 100;
EvoAlg ea = new MBanditEA();
ea = new SimpleRMHC(1);
int nDims = 10;
int mValues = 2;
// SolutionEvaluator evaluator = new EvalMaxM(nDims, mValues);
SolutionEvaluator evaluator = new EvalBattleGame();
// ea = new NTupleBanditEA();
System.out.println("Best fitness stats:");
System.out.println(runTrials(ea, evaluator, nTrials, nFitnessEvals));
// evaluator.
}
Aggregations