# The &optimization-menu; Menu

&optimization-solve;

  Tries to solve the current level. Note that the algorithms used in the solver are not very sophisticated, so you cannot expect that it solves every level (if you interested in the algorithms which are used for solving sokoban levels, you should look at Andreas Junghann's Sokoban page at http://www.cs.ualberta.ca/~games/Sokoban, where most of the techniques used by this solver are taken from). If a solution is found, the moves are loaded and can be viewed with &movement-undo; and &movement-redo;. So if you don't want to see the whole solution, just look at the first few moves. The solver may also be used to determine, if your own moves made the map unsolvable, because the solver always starts his solving efforts from the current position. Even if you stop the solver, before it finds a solution or proves there is no solution, the moves of the best try are loaded and these may give you some good ideas of how to solve the level (or what to avoid!).

&optimization-reached-before;

  Here you can determine, if you have reached the current position in a game before, so you did not have made any progress. Note that only positions after gem pushes are considered, to make the result meaningful.

&optimization-no-auto;

  If this option is checked, &EasySok; does not automatically tries to optimized your solutions of a level. Note that this and the following options only affects solutions, which you make yourself and not imported solutions.

&optimization-auto-moves;

  If this option is checked, &EasySok; tries to minimize the moves in the solutions you make. This means, that unneeded keeper moves are eliminated (which are not uncommon, if you are trying to solve a map). It does not touches the pushes. Note that this option does not guarantee, that the optimized solution consists of the minimum number of moves possible.

&optimization-auto-pushs;

  If this option is checked, &EasySok; tries to minimize the number of pushes you made in your solutions. Therefore it removes pushes which result in a position, which was reached before the push. Note that this option does not guarantee, that your get a solution with the minimum number of pushes.

&optimization-moves-level;

  Opens a dialog, where you can select the solutions of the current level, which should be optimized for the number of moves. See &optimization-auto-moves; for a description of the optimization performed.

&optimization-moves-coll;

  Optimized the number of moves in all solutions for all levels of the current collection. See &optimization-auto-moves; for a description of the optimization performed.

&optimization-moves-all;

  Optimized the number of moves in all solutions of all collections. See &optimization-auto-moves; for a description of the optimization performed.

&optimization-pushs-level;

  Opens a dialog, where you can select the solutions of the current level, which should be optimized for the number of pushes. See &optimization-auto-pushs; for a description of the optimization performed.

&optimization-pushs-coll;

  Optimized the number of pushes in all solutions for all levels of the current collection. See &optimization-auto-pushs; for a description of the optimization performed.

&optimization-pushs-all;

  Optimized the number of pushes in all solutions of all collections. See &optimization-auto-pushs; for a description of the optimization performed.