Operant conditioning is one of the fundamental mechanisms of animal learning,which suggests that the behavior of all animals,from protists to humans,is guided by its consequences.We present a new stochastic learning automaton called a Skinner automaton that is a psychological model for formalizing the theory of operant conditioning.We identify animal operant learning with a thermodynamic process,and derive a so-called Skinner algorithm from Monte Carlo method as well as Metropolis algorithm and simulated annealing.Under certain conditions,we prove that the Skinner automaton is expedient,ε-optimal,optimal,and that the operant probabilities converge to the set of stable roots with probability of 1.The Skinner automaton enables machines to autonomously learn in an animal-like way.