Let's implement a partially observable world (AIMA ch. 4).
We're going to break up 4.11 into several subproblems; the first of which is to implement a partially observable world containing disjoint, convex polygons and which has the following properties:
- The percept will be a list of the positions, relative to the agent, of the visible vertices.
- The percept does not include the position of the robot! The robot must learn its own position from the map; for now, you can assume that each location has a different 'view."
- Each action will be a vector describing a straight-fine path to follow. If the path is unobstructed, the action succeeds; otherwise, the robot stops at the point where its path first intersects an obstacle. If the agent returns a zero motion vector and is at the goal (which is fixed and known), then the environment teleports the agent to a random location (not inside an obstacle).
- The performance measure charges the agent l point for each unit of distance traversed and awards 1000 points each time the goal is reached.