Skip to content

Commit

Permalink
Merge pull request Wandalen#1108 from YuliaProkopovych/opt-params-fix
Browse files Browse the repository at this point in the history
READY: Fix to optimal params search algorithm
  • Loading branch information
Wandalen authored Feb 12, 2024
2 parents 3aa3374 + d0b1f11 commit 6c7e083
Show file tree
Hide file tree
Showing 13 changed files with 959 additions and 871 deletions.
7 changes: 2 additions & 5 deletions module/move/optimization_tools/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,11 @@ fn main()
.filter_level( log::LevelFilter::max() )
.try_init();

let seed : Seed = "seed1".into();
let board = Board::from( INPUT );
println!("{board}");
let initial = optimization::SudokuInitial::new( board );
let mut optimizer = HybridOptimizer::new( seed, initial )
.set_crossover_operator( BestRowsColumnsCrossover{} )
.set_mutation_operator( RandomPairInBlockMutation{} )
;
let sudoku_problem = optimization::Problem::new( initial, BestRowsColumnsCrossover{}, RandomPairInBlockMutation{} );
let optimizer = HybridOptimizer::new( optimization::Config::default(), sudoku_problem );

let ( reason, solution ) = optimizer.optimize( );

Expand Down
Loading

0 comments on commit 6c7e083

Please sign in to comment.