Пример #1
0
 public RubikCube(RubikCube copy, HeuristicSettings settings)
 {
     this.settings = settings;
     Init();
     obfuscationCommands = new List <RubikCommand>(copy.obfuscationCommands);
     solutionCommands    = new List <RubikCommand>(copy.solutionCommands);
     CubeInitialization(copy.Cube);
     Heuristic = RubikHeuristics.GetHeuristic(settings.heuristicType);
     H         = Heuristic.Heuristic(this, settings);
 }
 public float Heuristic(RubikCube cube, HeuristicSettings settings)
 {
     this.settings = settings.manhattanSettings;
     return(GetHeuristicMap(cube).Sum() / cube.Cube.Length);
 }
Пример #3
0
 public float Heuristic(RubikCube cube, HeuristicSettings settings)
 {
     this.settings = settings.onPlaceSettings;
     return(HeuristicNotOnPlace(cube));
 }