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); }
public float Heuristic(RubikCube cube, HeuristicSettings settings) { this.settings = settings.onPlaceSettings; return(HeuristicNotOnPlace(cube)); }