Work only on problems that are manifestly important and seem to be nearly impossible to solve. That way you will have a natural market for your product and no competition.