Puzzles and Search Flashcards
What is necessary when defining a search problem?
- state description: an abstract representation of the current state of the puzzle
- goal function: checks whether a state description satisfies the goal
What is a state space, in the context of a search problem?
a collection of all state descriptions of a puzzle
What is a Simple Exhaustive Search? How does it work?
it means you try out every single possible state of a puzzle and check them all with the goal function. you don’t use heuristics, nor constraints to reduce the number of states.
you do this until you’ve found the solution or until all states have been checked (if all have been checked and non satisfy the goal function, then there is no solution to the puzzle).
What is a Local Search? How does it work?
you choose one state and try to improve it by maximizing a heuristic evaluation. similar to solving a puzzle by hand.
if you keep track of the solutions you’ve tried, you will either find a solution or the certainty that there is not solution. without keeping track, if there is no solution, the program might run forever.
What are the advantages of the Local Search?
- uses very little memory
- quick
What are the disadvantages of the Local Search?
- no guarantee for completeness (unless you keep track of the tried solutions)
- no guarantee for optimality (that best/shortest solution is found)
What is the 8 Queen Problem?
it’s a puzzle where you need to put 8 queens on a chess board.
considering that a queen can move any number of tiles in horizontal, vertical and diagonal direction, all queens must be placed without them being in the hit-path of any of the other 7 queens.
What is an heuristic?
comes from the greek. is like a “rule of thumb”, some knowledge that may be helpful in solving a puzzle. they can also go wrong though.
in search algorithms, it’s often a function that estimates how close to the goal a certain state is.
On the example of the 8-Queens-Problem, how does the basic idea of an heuristic work?
heuristic = the number of queens, that are in each others hit paths is calculated for each state.
the algorithm follows the state where the heuristic is getting smaller until it reaches the goal (zero).
What is a different name for Hill-climbing Search?
Greedy Local Search
How does the Hill-Climbing Search work?
starting with the current state, the algorithm calculates all possible states that can exist, if one move is made. from these possible states it chooses the one with the higher evaluation (the best one). it does this until all possible future states would be worse than the current one.
What is the main problem of the Hill-Climbing Search?
Local Optima: the algorithm stops as soon as it has reached the top of a hill, even if it isn’t the highest hill there is.
What is Random Restart Hill-Climbing?
its a randomized variant of the Hill-Climbing Search. once the algorithm has reached a top, it starts again with a different starting position. after x iterations of this, a solution should be found.
What is Stochastic Hill-Climbing?
it is a randomized variant of the Hill-Climbing Search. Instead of always moving the the state with the best evaluation, you select a random state to move to.
What is a Beam Search? How does it work?
it is similar to the Hill-Climbing Search, but instead of moving to the one best possible future state, the algorithm moves to the k best possible future states.
k = number of states it should move to = beam size
the information from different beams is combined.
What is a problem of the Beam Search?
it suffers from lack of diversity of the k-number of states.
means: if one state has better successors, it’s chosen more often than other states.
therefore, it is often no more effective than Hill-Climbing
What is Stochastic Beam Search?
randomized variant of the Beam Search. it chooses k-number of successors at random.
What does the term “Annealing” mean? Where does it come from?
it’s comes from metallurgy and material science. it’s a heat treatment of materials to change its properties like strength and hardness, and then cooling it very slowly.