def add_thing(self, thing, location=None):
if not isinstance(thing, Thing):<EOL><INDENT>thing = Agent(thing)<EOL><DEDENT>assert thing not in self.things, "<STR_LIT>"<EOL>thing.location = location or self.default_location(thing)<EOL>self.things.append(thing)<EOL>if isinstance(thing, Agent):<EOL><INDENT>thing.performance = <NUM_LIT:0><EOL>self.agents.append(thing)<EOL><DEDENT>
Add a thing to the environment, setting its location. For
        convenience, if thing is an agent program we make a new agent
        for it. (Shouldn't need to override this.