"""Create a new grid world from a string describing the layout.
Each line corresponds to a different row, and #s represent the position of a block, while any othe character is interpreted as an empty square. The size of the world is the number of lines (height) and the size of the longest line (width). E.g.:
Each line corresponds to a different row, and #s represent the position of a block, while any other character is interpreted as an empty square. The size of the world is the number of lines (height) and the size of the longest line (width). E.g.:
"""Return all the coordinates in which any of the characters appears in the world description. The decription can be a multiline string or the list of lines."""
"""Return all the coordinates in which any of the characters appears in the world description. The description can be a multiline string or the list of lines."""
"""Run an episode on the world using the player to control the agent. The horizon specifies the maximun number of steps, 0 or None means no limit. If show is true then the world is printed ad each iteration before the player's turn.
"""Run an episode on the world using the player to control the agent. The horizon specifies the maximum number of steps, 0 or None means no limit. If show is true then the world is printed ad each iteration before the player's turn.
Raise the exception GridWorldException is the agent is not in the world."""
"""Create a new world using the decription and placing food in the given list foods or randomly placing a food_amount (if greater than zero) or the percentage of free cells otherwise number foods."""
"""Create a new world using the description and placing food in the given list foods or randomly placing a food_amount (if greater than zero) or the percentage of free cells otherwise number foods."""