Although play occurs in a wide variety of animals, models of the origins of play behavior are lacking. We propose a novel computational model exploring the evolution of non-social frivolous play. Asexually reproducing semelparous animals can either rest or forage. Foraging occurs when an organism is below an energy threshold. Success is determined by the combination of skill and availability of resources, which declines over time but replenishes for each generation. Play was introduced as a mutant strategy: a frivolous activity that uses energy and increases the probability of dying over resting with no direct fitness benefit. Simulations show that play behavior becomes fixed in the population and the time spent playing is maintained at a low rate in spite of its costly nature. When play behavior is functional by increasing foraging ability, it evolves quickly and the time individuals spend playing increases, but eventually the population of players collapses and play disappears. We suggest a mechanism underlying the origins of adaptive play from non-adaptive behavior when resources expand. Initially play acts as a spiteful behavior in that playing individuals suffer a direct cost to their fitness, but also may incur even greater costs to other individuals in the population.