Decision-making without a brain: how an amoeboid organism solves the two-armed bandit