@@ -1109,7 +1109,8 @@ $(OPTION_DESCRIPTIONS)
11091109end
11101110
11111111function default_options (@nospecialize (version:: Union{VersionNumber,Nothing} = nothing ))
1112- if version isa VersionNumber && version < v " 1.0.0"
1112+ version isa VersionNumber &&
1113+ version < v " 1.0.0" &&
11131114 return (;
11141115 # Creating the Search Space
11151116 operators= OperatorEnum (((), (+ , - , / , * ))),
@@ -1155,56 +1156,61 @@ function default_options(@nospecialize(version::Union{VersionNumber,Nothing} = n
11551156 batching= false ,
11561157 batch_size= 50 ,
11571158 )
1158- else
1159- return (;
1160- # Creating the Search Space
1161- operators= OperatorEnum (((), (+ , - , / , * ))),
1162- maxsize= 30 ,
1163- # Setting the Search Size
1164- populations= 31 ,
1165- population_size= 27 ,
1166- ncycles_per_iteration= 380 ,
1167- # Working with Complexities
1168- parsimony= 0.0 ,
1169- warmup_maxsize_by= 0.0 ,
1170- adaptive_parsimony_scaling= 1040 ,
1171- # Mutations
1172- mutation_weights= MutationWeights (;
1173- mutate_constant= 0.0346 ,
1174- mutate_operator= 0.293 ,
1175- swap_operands= 0.198 ,
1176- rotate_tree= 4.26 ,
1177- add_node= 2.47 ,
1178- insert_node= 0.0112 ,
1179- delete_node= 0.870 ,
1180- simplify= 0.00209 ,
1181- randomize= 0.000502 ,
1182- do_nothing= 0.273 ,
1183- optimize= 0.0 ,
1184- form_connection= 0.5 ,
1185- break_connection= 0.1 ,
1186- ),
1187- crossover_probability= 0.0259 ,
1188- annealing= true ,
1189- alpha= 3.17 ,
1190- perturbation_factor= 0.129 ,
1191- probability_negate_constant= 0.00743 ,
1192- # Tournament Selection
1193- tournament_selection_n= 15 ,
1194- tournament_selection_p= 0.982 ,
1195- # Migration between Populations
1196- fraction_replaced= 0.00036 ,
1197- # # ^Note: the optimal value found was 0.00000425,
1198- # # but I thought this was a symptom of doing the sweep on such
1199- # # a small problem, so I increased it to the older value of 0.00036
1200- fraction_replaced_hof= 0.0614 ,
1201- fraction_replaced_guesses= 0.001 ,
1202- topn= 12 ,
1203- # Performance and Parallelization
1204- batching= false ,
1205- batch_size= 50 ,
1206- )
1159+
1160+ defaults = (;
1161+ # Creating the Search Space
1162+ operators= OperatorEnum (((), (+ , - , / , * ))),
1163+ maxsize= 30 ,
1164+ # Setting the Search Size
1165+ populations= 31 ,
1166+ population_size= 27 ,
1167+ ncycles_per_iteration= 380 ,
1168+ # Working with Complexities
1169+ parsimony= 0.0 ,
1170+ warmup_maxsize_by= 0.0 ,
1171+ adaptive_parsimony_scaling= 1040.0 ,
1172+ # Mutations
1173+ mutation_weights= MutationWeights (;
1174+ mutate_constant= 0.0346 ,
1175+ mutate_operator= 0.293 ,
1176+ swap_operands= 0.198 ,
1177+ rotate_tree= 4.26 ,
1178+ add_node= 2.47 ,
1179+ insert_node= 0.0112 ,
1180+ delete_node= 0.870 ,
1181+ simplify= 0.00209 ,
1182+ randomize= 0.000502 ,
1183+ do_nothing= 0.273 ,
1184+ optimize= 0.0 ,
1185+ form_connection= 0.5 ,
1186+ break_connection= 0.1 ,
1187+ ),
1188+ crossover_probability= 0.0259 ,
1189+ annealing= true ,
1190+ alpha= 3.17 ,
1191+ perturbation_factor= 0.129 ,
1192+ probability_negate_constant= 0.00743 ,
1193+ # Tournament Selection
1194+ tournament_selection_n= 15 ,
1195+ tournament_selection_p= 0.982 ,
1196+ # Migration between Populations
1197+ fraction_replaced= 0.00036 ,
1198+ # # ^Note: the optimal value found was 0.00000425,
1199+ # # but I thought this was a symptom of doing the sweep on such
1200+ # # a small problem, so I increased it to the older value of 0.00036
1201+ fraction_replaced_hof= 0.0614 ,
1202+ fraction_replaced_guesses= 0.001 ,
1203+ topn= 12 ,
1204+ # Performance and Parallelization
1205+ batching= false ,
1206+ batch_size= 50 ,
1207+ )
1208+
1209+ if version isa VersionNumber && version >= v " 2.0.0-"
1210+ defaults = (; defaults... , adaptive_parsimony_scaling= 20.0 )
12071211 end
1212+
1213+ return defaults
12081214end
12091215
12101216end
0 commit comments