Пример #1
0
        public void Test_That_HillClimb_On_Sphere_Works()
        {
            HillClimb <double[]> hill = new HillClimb <double[]>();
            Sphere sphere             = new Sphere();

            hill.create(sphere.getConfiguration());
            hill.fullIteration();
        }
Пример #2
0
        public void Test_That_Knapsack_Hill_Climbing_Works()
        {
            this.Load(Constants.SAMPLE_MKNAPCB4_DATASET);
            Console.WriteLine($"Goal:\t{this.goal}");
            HillClimb <List <int> > hillClimb = new HillClimb <List <int> >();

            hillClimb.create(this.getConfiguration());
            List <int> finalSolution = hillClimb.fullIteration();
        }
Пример #3
0
        public void Test_That_Knapsack_Hill_Climbing_Works()
        {
            Knapsack knapsack = new Knapsack();

            knapsack.Load(Constants.SAMPLE_MKNAPCB4_DATASET);
            HillClimb <List <int> > hillClimb = new HillClimb <List <int> >();

            hillClimb.create(knapsack.getConfiguration());
            List <int> finalSolution = hillClimb.fullIteration();
        }