random pick automaton