mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Remove 'Solving method' from the solver dialog.
The --method parameter affects only the current "soft thread" (= single scan), may confuse laymen, and should not matter when an aggregate scan preset or theme is specified, and those are in general superior and more encouraged for fc-solve beginners and most experts a like. An aggregate scan explicitly sets the --method for each scan individually, so there. As a result, I don't see the point of having the 'Solving method' there. Perhaps in the future, a more comprehensive GUI for editing the fc-solve command line will be in order, but that may end up something like thess monstrocities: * http://www.codinghorror.com/blog/2006/11/this-is-what-happens-when-you-let-developers-create-ui.html * http://i.stack.imgur.com/cVWub.gif
This commit is contained in:
parent
e2a6c00606
commit
7f42260031
3 changed files with 2 additions and 42 deletions
|
@ -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),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue