This is an algorithm to solve Chopsticks problems. For a chart on reachable positions, see here.

Chopsticks Solver