public void RunTest_KoTS()
        {
            var competitors = Helpers.CompetitorListHelper.GetStandardCompetitors(8);

            TournamentStrategy tournamentStrategy = new KoTS(2);
            MatchStrategy matchStrategy = new SimpleRandomMs();

            var study = new Study(tournamentStrategy, matchStrategy, false);
            study.Run(competitors, _numberOfTournamentIterations);

            DisplayTestResults(tournamentStrategy, matchStrategy, study);
        }
예제 #2
0
        public void RunTest_Knockout()
        {
            var competitors = Helpers.CompetitorListHelper.GetStandardCompetitors(8);

            TournamentStrategy tournamentStrategy = new KoTS(2);
            MatchStrategy matchStrategy = new SimpleRandomMs();

            var study = new Study(tournamentStrategy, matchStrategy, false);
            study.Run(competitors, _numberOfTournamentIterations);

            foreach (var competitor in competitors)
            {
                foreach (var rankFrequency in competitor.RankFrequencies.OrderByDescending(x => x.Value).ThenBy(x => x.Key))
                {
                    Assert.IsTrue(rankFrequency.Key > 0);
                }
            }
        }
예제 #3
0
        public void StudyKo_RandomSeeding()
        {
            List<Competitor> competitors = Helpers.CompetitorListHelper.GetCompetitorsWithRandomizedSeeds(_numberOfCompetitors);

            TournamentStrategy tournamentStrategy = new KoTS(2);
            MatchStrategy matchStrategy = new SimpleRandomMs();

            RunStudy(competitors, tournamentStrategy, matchStrategy);
        }
예제 #4
0
        public void StudyKo_Dominant2In16()
        {
            var competitors = Helpers.CompetitorListHelper.GetCompetitorsWithTwoDominants_16();

            TournamentStrategy tournamentStrategy = new KoTS(2);
            MatchStrategy matchStrategy = new SimpleRandomMs();

            RunStudy(competitors, tournamentStrategy, matchStrategy);
        }
예제 #5
0
        public void StudyKo()
        {
            List<Competitor> competitors = Helpers.CompetitorListHelper.GetEvenlySpacedCompetitors(_numberOfCompetitors);

            TournamentStrategy tournamentStrategy = new KoTS(2);
            MatchStrategy matchStrategy = new SimpleRandomMs();

            RunStudy(competitors, tournamentStrategy, matchStrategy);
        }