1. A method comprising: obtaining a stream of tasks in a system, wherein the tasks are to be performed by agents, wherein the agents choose whether or not to perform a task, wherein a quality of each agent affects contributions of performing tasks by the agent; calculating, by a processor, for each agent, an average quality of tasks in the system that were completed in the past by the agent; allocating, by the processor, the tasks to the agents, wherein said allocating comprises selecting an agent to perform a task, wherein said selecting is based on the average quality of the agent; obtaining an indication that the agent has completed the task; in response to the indication, computing, by the processor, a reward for the agent, wherein the reward is calculated according to a total contribution of the agent to the system by completing the task; outputting the reward to be provided to the user; whereby biasing said allocating to prefer allocating tasks to a first agent over a second agent, if a quality of the first agent is greater than a quality of the second agent, wherein said biasing is not dependent on prior knowledge of the qualities.