GridWorld.init_agent#
- GridWorld.init_agent(init_coord=None, overwrite=False)[source]#
Initialize an agent in the world.
- Parameters:
init_coord (tuple of ints (optional, default: None)) – Coordinate of the agent initial state. If not provided, the agent will be initialized at
(0, 0, 0)by default.overwrite (bool (default: False)) – Whether to overwrite the existing agent.
Examples
>>> W = GridWorld() >>> W.init_agent() >>> W.add_area((2, 4)) >>> W.init_agent((1, 1, 3), overwrite=True)