Iterative bot code