def clone_worker_agent(agent, factor, environment, network, agent_config):
ret = [agent]<EOL>for i in xrange(factor - <NUM_LIT:1>):<EOL><INDENT>worker = WorkerAgentGenerator(type(agent))(<EOL>states=environment.states,<EOL>actions=environment.actions,<EOL>network=network,<EOL>model=agent.model,<EOL>**agent_config<EOL>)<EOL>ret.append(worker)<EOL><DEDENT>return ret<EOL>
Clones a given Agent (`factor` times) and returns a list of the cloned Agents with the original Agent
in the first slot.

Args:
    agent (Agent): The Agent object to clone.
    factor (int): The length of the final list.
    environment (Environment): The Environment to use for all cloned agents.
    network (LayeredNetwork): The Network to use (or None) for an Agent's Model.
    agent_config (dict): A dict of Agent specifications passed into the Agent's c'tor as kwargs.
Returns:
    The list with `factor` cloned agents (including the original one).