diff --git a/pysollib/hint.py b/pysollib/hint.py index a68b79f2..7b62ca9e 100644 --- a/pysollib/hint.py +++ b/pysollib/hint.py @@ -716,7 +716,6 @@ class FreeCellSolver_Hint: self.dialog = dialog self.game_type = game_type self.options = { - 'method': 'soft-dfs', 'max_iters': 10000, 'max_depth': 1000, 'progress': False, @@ -823,7 +822,6 @@ class FreeCellSolver_Hint: args += ['--load-config', self.options['preset']] args += ['--max-iters', self.options['max_iters'], '--max-depth', self.options['max_depth'], - '--method', self.options['method'], '--decks-num', game.gameinfo.decks, '--stacks-num', len(game.s.rows), '--freecells-num', len(game.s.reserves), diff --git a/pysollib/tile/solverdialog.py b/pysollib/tile/solverdialog.py index 58c1213e..05aa84bc 100644 --- a/pysollib/tile/solverdialog.py +++ b/pysollib/tile/solverdialog.py @@ -91,23 +91,6 @@ class SolverDialog(MfxDialog): cb.grid(row=row, column=1, sticky='ew', padx=2, pady=2) self.games_var = cb - # - row += 1 - ttk.Label(frame, text=_('Solving method:'), anchor='w' - ).grid(row=row, column=0, sticky='ew', padx=2, pady=2) - ##sm = self.solving_methods.values() - ##sm.sort() - sm = ['A*', - 'Breadth-First Search', - 'Depth-First Search', - 'A randomized DFS', - ##'"Soft" DFS' - ] - cb = PysolCombo(frame, values=tuple(sm), state='readonly') - cb.grid(row=row, column=1, sticky='ew', padx=2, pady=2) - cb.current(sm.index('Depth-First Search')) - self.solving_method_var = cb - # row += 1 ttk.Label(frame, text=_('Preset:'), anchor='w' @@ -247,13 +230,11 @@ class SolverDialog(MfxDialog): game = self.app.game solver = game.Solver_Class(game, self) # create solver instance game.solver = solver - method = self.solving_method_var.get() - method = self.solving_methods[method] preset = self.preset_var.get() max_iters = self.max_iters_var.get() max_depth = self.max_depth_var.get() progress = self.progress_var.get() - solver.config(method=method, preset=preset, max_iters=max_iters, + solver.config(preset=preset, max_iters=max_iters, max_depth=max_depth, progress=progress) solver.computeHints() hints_len = len(solver.hints)-1 diff --git a/pysollib/tk/solverdialog.py b/pysollib/tk/solverdialog.py index 46ea1f11..cc27f4cc 100644 --- a/pysollib/tk/solverdialog.py +++ b/pysollib/tk/solverdialog.py @@ -94,23 +94,6 @@ class SolverDialog(MfxDialog): for i in xrange(cb_max, n, cb_max): om['menu'].entryconfig(i, columnbreak=True) - # - row += 1 - Tkinter.Label(frame, text=_('Solving method:'), anchor='w' - ).grid(row=row, column=0, sticky='ew', padx=2, pady=2) - ##sm = self.solving_methods.values() - ##sm.sort() - sm = ['A*', - 'Breadth-First Search', - 'Depth-First Search', - 'A randomized DFS', - ##'"Soft" DFS' - ] - self.solving_method_var = var = Tkinter.StringVar() - var.set('Depth-First Search') - om = Tkinter.OptionMenu(frame, var, *sm) - om.grid(row=row, column=1, sticky='ew', padx=2, pady=2) - # row += 1 Tkinter.Label(frame, text=_('Preset:'), anchor='w' @@ -250,13 +233,11 @@ class SolverDialog(MfxDialog): game = self.app.game solver = game.Solver_Class(game, self) # create solver instance game.solver = solver - method = self.solving_method_var.get() - method = self.solving_methods[method] preset = self.preset_var.get() max_iters = self.max_iters_var.get() max_depth = self.max_depth_var.get() progress = self.progress_var.get() - solver.config(method=method, preset=preset, max_iters=max_iters, + solver.config(preset=preset, max_iters=max_iters, max_depth=max_depth, progress=progress) solver.computeHints() hints_len = len(solver.hints)-1