def trajectory_4way(self, env):
    '\n        Generate trajectory of agent diffusing through 4-way connected graph\n        At each point we sample the one-hot observation and take an action\n        0 = up\n        1 = right\n        2 = down\n        3 = left \n\n        Params:\n            steps (int): Number of steps to take\n            env (3d np array): environment in which to wander (NxNx(num_categories))\n        Returns \n            Observations (steps, num_categories), Actions (steps, 4) \n        '
    observations = np.zeros((self.steps, self.num_categories))
    actions = np.zeros((self.steps, 4))
    positions = np.zeros((self.steps, 2))
    loc = np.random.randint(0, env.shape[0], 2)
    for step in range(self.steps):
        positions[step] = loc
        obs = env[(loc[0], loc[1])]
        (action, loc) = self.update_location_4way(env, loc)
        observations[step] = obs
        actions[step] = action
    return (observations, actions, positions)
Generate trajectory of agent diffusing through 4-way connected graph
At each point we sample the one-hot observation and take an action
0 = up
1 = right
2 = down
3 = left 

Params:
    steps (int): Number of steps to take
    env (3d np array): environment in which to wander (NxNx(num_categories))
Returns 
    Observations (steps, num_categories), Actions (steps, 4)
def trajectory_4way(self, env):
    '\n        Generate trajectory of agent diffusing through 4-way connected graph\n        At each point we sample the one-hot observation and take an action\n        0 = up\n        1 = right\n        2 = down\n        3 = left \n\n        Params:\n            steps (int): Number of steps to take\n            env (3d np array): environment in which to wander (NxNx(num_categories))\n        Returns \n            Observations (steps, num_categories), Actions (steps, 4) \n        '
    observations = np.zeros((self.steps, self.num_categories))
    actions = np.zeros((self.steps, 4))
    positions = np.zeros((self.steps, 2))
    loc = np.random.randint(0, env.shape[0], 2)
    for step in range(self.steps):
        positions[step] = loc
        obs = env[(loc[0], loc[1])]
        (action, loc) = self.update_location_4way(env, loc)
        observations[step] = obs
        actions[step] = action
    return (observations, actions, positions)