9
9
project_dir_path = Path (* script_dir_path .parts [:project_dir_id + 1 ])
10
10
sys .path .append (str (project_dir_path ))
11
11
12
- from copy import deepcopy
13
-
14
12
from examples .object_oriented .nqueens .persistence .DomainBuilderNQueens import DomainBuilderNQueens
15
13
from examples .object_oriented .nqueens .persistence .CotwinBuilderNQueens import CotwinBuilderNQueens
16
- from greyjack .score_calculation .scores .SimpleScore import SimpleScore
17
14
from greyjack .agents .termination_strategies import *
18
15
from greyjack .agents import *
19
16
from greyjack .Solver import Solver
26
23
cotwin_builder = CotwinBuilderNQueens ()
27
24
28
25
#termination_strategy = StepsLimit(step_count_limit=1000)
29
- # termination_strategy = TimeSpentLimit(time_seconds_limit=60)
26
+ termination_strategy = TimeSpentLimit (time_seconds_limit = 60 )
30
27
#termination_strategy = ScoreNoImprovement(time_seconds_limit=15)
31
- termination_strategy = ScoreLimit (score_to_compare = [0 ])
28
+ # termination_strategy = ScoreLimit(score_to_compare=[0])
32
29
agent = TabuSearch (neighbours_count = 128 , tabu_entity_rate = 0.0 ,
33
30
mutation_rate_multiplier = None , move_probas = None ,
34
31
migration_frequency = 1 , termination_strategy = termination_strategy )
37
34
n_jobs = 10 , parallelization_backend = "processing" , #processing, threading
38
35
score_precision = [0 ], logging_level = "info" )
39
36
solution = solver .solve ()
40
- print ( "Cotwin solution looks that: " )
41
- print ( solution )
37
+ # print( "Cotwin solution looks that: " )
38
+ # print( solution )
42
39
43
40
print ( "done" )
0 commit comments