public RoundRobinTournament([NotNull] IBattleRunner battleRunner, int battlesPerPair, [NotNull] string tournamentId, [NotNull] TournamentPlayer[] players, [CanBeNull] AutoResetEvent botSubmissionSignal, [CanBeNull] ManualResetEvent stopSignal, bool suppressBattleErrors = true)
 {
     this.battleRunner         = battleRunner;
     this.battlesPerPair       = battlesPerPair;
     this.tournamentId         = tournamentId;
     this.players              = players;
     this.botSubmissionSignal  = botSubmissionSignal;
     this.stopSignal           = stopSignal;
     this.suppressBattleErrors = suppressBattleErrors;
     rules = new Rules
     {
         WarriorsCount = 2,
         Rounds        = 1,
         MaxCycles     = Parameters.MaxStepsPerWarrior,
         CoreSize      = Parameters.CoreSize,
         PSpaceSize    = 500,              // coreSize / 16
         EnablePSpace  = false,
         MaxProcesses  = Parameters.MaxQueueSize,
         MaxLength     = Parameters.MaxWarriorLength,
         MinDistance   = Parameters.MinWarriorsDistance,
         Version       = 93,
         ScoreFormula  = ScoreFormula.Standard,
         ICWSStandard  = ICWStandard.ICWS88,
     };
     this.randomAllocator = new RandomAllocator(rules.CoreSize, rules.MinDistance);
 }
Exemplo n.º 2
0
 public TournamentRunner([NotNull] ArenaState arenaState, [NotNull] IBattleRunner battleRunner, int battlesPerPair)
 {
     this.arenaState     = arenaState;
     this.battleRunner   = battleRunner;
     this.battlesPerPair = battlesPerPair;
     thread = new Thread(TournamentCycle)
     {
         IsBackground = true,
         Name         = "tournament",
     };
 }