Changed agents to algorithms