Memory and Hypothesis in Solving Alternation Problems with Random Competition