Performing Local Search
355
history, solution = sat2(clauses, n, start=better_start)
Found solution in 1 external loops, 393 internal loops
By providing this new, simplified starting point, after charting the results you can
immediately see an improvement because on average, fewer operations are needed
to complete the task.
In a local search, always consider that the starting point is important to allow the
algorithm to complete earlier and more successfully, as shown in Figure 18-6. In
sum, try to provide the best-quality start for your search as possible.
FIGURE 18-6:
Execution is
speedier
because the
starting point is
better.
CHAPTER 19
Do'stlaringiz bilan baham: |