Skip to content

Instantly share code, notes, and snippets.

Created Jan 27, 2020
What would you like to do?
Kurobako blog:
# A solver implementation based on Simulated Annealing algorithm.
from kurobako import solver
from kurobako.solver.optuna import OptunaSolverFactory
import optuna
class SimulatedAnnealingSampler(optuna.BaseSampler):
# Please refer to
# for the implementation.
def create_study(seed):
sampler = SimulatedAnnealingSampler(seed=seed)
return optuna.create_study(sampler=sampler)
if __name__ ==__main__’:
factory = OptunaSolverFactory(create_study)
runner = solver.SolverRunner(factory)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment