def env_info(env, brain):
    """Prints and returns environment information
    
    Params
    ======
        env : unity environment object
        brain : unity brain object
    """

    # reset the environment
    env_info = env.reset(train_mode=True)[brain.brain_name]

    # number of agents in the environment
    print('Number of agents:', len(env_info.agents))

    # number of actions
    action_size = brain.vector_action_space_size
    print('Number of actions:', action_size)

    # examine the state space 
    state = env_info.vector_observations[0]
    print('States look like:', state)
    state_size = len(state)
    print('States have length:', state_size)
    return state_size, action_size