A **problem** is an inquiry starting from given conditions to investigate or
demonstrate a fact, result, or law.

A problem consists of:

- A starting state
- A goal state
- A transition function that map from state to state (action)

There are two kinds of goals: metric goals, goals that can be easily quantified with a single target value, and milestone goals, goals that are reached by completing a set of related achievements.

A solution is a sequence of actions that when reduced against the starting state result in the goal state. Solutions are derived by perform a tree traversal from the starting state.

The XY Problem is a name for a sitatuon where:

You're trying to do X, and you thought of solution Y. So you're asking about solution Y, without even mentioning X. The problem is, there might be a better solution, but we can't know that unless you describe what X is.

For example, a person who want to round a decimal to the fifth decimal place may ask about how to do so by first converting them to strings, when a built-in round function could do the same more simply.

[1] | XY Problem. http://www.perlmonks.org/?node=xy+problem |

[2] | DecimalFormat and Double.valueOf() http://stackoverflow.com/questions/2691018/decimalformat-and-double-valueof/2691162#comment2712294_2691162 |

A lot of times solving problems when there is no solution is kind of like finding an object in a dark room-- you don't know what you need to do next, but you know the general area of where you could find the answer. So you explore a little bit. This is like the math problem which is incomprehensible at first, until the textbook tells you. Said another way, sometime to solve a problem, you just need to know where you can find solution, rather than coming up with it.