GridWorld.world#
- property GridWorld.world#
A copy of
worldattribute of the gridworld environment.GridWorld.worldis a NetworkX Graph object which represents here the areas, states and their connections in the gridworld environment. Each node in the graph is a state named by its global coordinate(area_idx, x, y), and it has an attributealtitudewhich represents the altitude of the state. Each edge in the graph denotes the connections between two states (including inter-area connections).Note
More information about NetworkX Graph object can be found at networkx.Graph
- Returns:
world – World attribute of the gridworld environment represented by a NetworkX Graph object.
- Return type:
netwokx.Graph
Examples
>>> W = GridWorld() >>> W.add_area((2, 2)) >>> G = W.world >>> G.nodes NodeView(((0, 0, 0), (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1)))
References