Loading

IIT-M RL-ASSIGNMENT-2-GRIDWORLD

Solution for submission 132155

A detailed solution for submission 132155 submitted for challenge IIT-M RL-ASSIGNMENT-2-GRIDWORLD

sreenadhuni_kishan_rao_ed18b033

What is the notebook about?

Problem - Gridworld Environment Algorithms

This problem deals with a grid world and stochastic actions. The tasks you have to do are:

  • Implement Policy Iteration
  • Implement Value Iteration
  • Implement TD lamdda
  • Visualize the results
  • Explain the results

How to use this notebook? 📝

  • This is a shared template and any edits you make here will not be saved.You should make a copy in your own drive. Click the "File" menu (top-left), then "Save a Copy in Drive". You will be working in your copy however you like.

  • Update the config parameters. You can define the common variables here

Variable Description
AICROWD_DATASET_PATH Path to the file containing test data. This should be an absolute path.
AICROWD_RESULTS_DIR Path to write the output to.
AICROWD_ASSETS_DIR In case your notebook needs additional files (like model weights, etc.,), you can add them to a directory and specify the path to the directory here (please specify relative path). The contents of this directory will be sent to AIcrowd for evaluation.
AICROWD_API_KEY In order to submit your code to AIcrowd, you need to provide your account's API key. This key is available at https://www.aicrowd.com/participants/me

Setup AIcrowd Utilities 🛠

We use this to bundle the files for submission and create a submission on AIcrowd. Do not edit this block.

In [74]:
!pip install aicrowd-cli > /dev/null

AIcrowd Runtime Configuration 🧷

Get login API key from https://www.aicrowd.com/participants/me

In [75]:
import os

AICROWD_DATASET_PATH = os.getenv("DATASET_PATH", os.getcwd()+"/a5562c7d-55f0-4d06-841c-110655bb04ec_a2_gridworld_inputs.zip")
AICROWD_RESULTS_DIR = os.getenv("OUTPUTS_DIR", "results")
In [76]:

API Key valid
Saved API Key successfully!
a5562c7d-55f0-4d06-841c-110655bb04ec_a2_gridworld_inputs.zip: 100% 14.2k/14.2k [00:00<00:00, 1.34MB/s]
In [77]:
!unzip -q $AICROWD_DATASET_PATH
replace inputs/inputs_base.npy? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
In [78]:
DATASET_DIR = 'inputs/'

GridWorld Environment

Read the code for the environment thoroughly

Do not edit the code for the environment

In [79]:
import numpy as np

class GridEnv_HW2:
    def __init__(self, 
                 goal_location, 
                 action_stochasticity,
                 non_terminal_reward,
                 terminal_reward,
                 grey_in,
                 brown_in,
                 grey_out,
                 brown_out
                ):

        # Do not edit this section 
        self.action_stochasticity = action_stochasticity
        self.non_terminal_reward = non_terminal_reward
        self.terminal_reward = terminal_reward
        self.grid_size = [10, 10]

        # Index of the actions 
        self.actions = {'N': (1, 0), 
                        'E': (0,1),
                        'S': (-1,0), 
                        'W': (0,-1)}
        
        self.perpendicular_order = ['N', 'E', 'S', 'W']
        
        l = ['normal' for _ in range(self.grid_size[0]) ]
        self.grid = np.array([l for _ in range(self.grid_size[1]) ], dtype=object)

        self.grid[goal_location[0], goal_location[1]] = 'goal'
        self.goal_location = goal_location

        for gi in grey_in:
            self.grid[gi[0],gi[1]] = 'grey_in'
        for bi in brown_in:    
            self.grid[bi[0], bi[1]] = 'brown_in'

        for go in grey_out:    
            self.grid[go[0], go[1]] = 'grey_out'
        for bo in brown_out:    
            self.grid[bo[0], bo[1]] = 'brown_out'

        self.grey_outs = grey_out
        self.brown_outs = brown_out

    def _out_of_grid(self, state):
        if state[0] < 0 or state[1] < 0:
            return True
        elif state[0] > self.grid_size[0] - 1:
            return True
        elif state[1] > self.grid_size[1] - 1:
            return True
        else:
            return False

    def _grid_state(self, state):
        return self.grid[state[0], state[1]]        
        
    def get_transition_probabilites_and_reward(self, state, action):
        """ 
        Returns the probabiltity of all possible transitions for the given action in the form:
        A list of tuples of (next_state, probability, reward)
        Note that based on number of state and action there can be many different next states
        Unless the state is All the probabilities of next states should add up to 1
        """

        grid_state = self._grid_state(state)
        
        if grid_state == 'goal':
            return [(self.goal_location, 1.0, 0.0)]
        elif grid_state == 'grey_in':
            npr = []
            for go in self.grey_outs:
                npr.append((go, 1/len(self.grey_outs), 
                            self.non_terminal_reward))
            return npr
        elif grid_state == 'brown_in':
            npr = []
            for bo in self.brown_outs:
                npr.append((bo, 1/len(self.brown_outs), 
                            self.non_terminal_reward))
            return npr
        
        direction = self.actions.get(action, None)
        if direction is None:
            raise ValueError("Invalid action %s , please select among" % action, list(self.actions.keys()))

        dir_index = self.perpendicular_order.index(action)
        wrap_acts = self.perpendicular_order[dir_index:] + self.perpendicular_order[:dir_index]
        next_state_probs = {}
        for prob, a in zip(self.action_stochasticity, wrap_acts):
            d = self.actions[a]
            next_state = (state[0] + d[0]), (state[1] + d[1])
            if self._out_of_grid(next_state):
                next_state = state
            next_state_probs.setdefault(next_state, 0.0)
            next_state_probs[next_state] += prob

        npr = []
        for ns, prob in next_state_probs.items():
            next_grid_state = self._grid_state(ns)
            reward = self.terminal_reward if next_grid_state == 'goal' else self.non_terminal_reward
            npr.append((ns, prob, reward))

        return npr

    def step(self, state, action):
        npr = self.get_transition_probabilites_and_reward(state, action)
        probs = [t[1] for t in npr]
        sampled_idx = np.random.choice(range(len(npr)), p=probs)
        sampled_npr = npr[sampled_idx]
        next_state = sampled_npr[0]
        reward = sampled_npr[2]
        is_terminal = next_state == tuple(self.goal_location)
        return next_state, reward, is_terminal

Example environment

This has the same setup as the pdf, do not edit the settings

In [80]:
def get_base_kwargs():
    goal_location = (9,9)
    action_stochasticity = [0.8, 0.2/3, 0.2/3, 0.2/3]
    grey_out = [(3,2), (4,2), (5,2), (6,2)]
    brown_in = [(9,7)]
    grey_in = [(0,0)]
    brown_out = [(1,7)]
    non_terminal_reward = 0
    terminal_reward = 10

    base_kwargs =  {"goal_location": goal_location, 
            "action_stochasticity": action_stochasticity,
            "brown_in": brown_in, 
            "grey_in": grey_in, 
            "brown_out": brown_out,
            "non_terminal_reward": non_terminal_reward,
            "terminal_reward": terminal_reward,
            "grey_out": grey_out,}
    
    return base_kwargs

base_kwargs = get_base_kwargs()

Task 2.1 - Value Iteration

Run value iteration on the environment and generate the policy and expected reward

In [81]:
def value_iteration(env, gamma):
    # Initial Values
    values = np.zeros((10, 10))

    # Initial policy
    policy = np.empty((10, 10), object)
    policy[:] = 'N' # Make all the policy values as 'N'

    # Begin code here
    V = np.zeros((10,10))
    actions=env.perpendicular_order
    tol=20
    all_values=[]
    while tol>1e-8:
      tol=0
      for x in range(10):
        for y in range(10):
          state=(x,y)
          J=[0,0,0,0]
          for j in range(len(actions)):
            Ja=0
            for i in range(len(env.get_transition_probabilites_and_reward(state,actions[j]))):
              p=env.get_transition_probabilites_and_reward(state,actions[j])[i]
              Ja+=p[1]*(p[2]+gamma*V[p[0][0]][p[0][1]])
            J[j]=Ja
          best_reward=max(J)
          best_policy=J.index(best_reward)
          tol=max(tol,abs(V[x][y]-best_reward))
          V[x][y]=best_reward
          policy[x][y]=actions[best_policy]
      all_values.append(V.copy())
    values=V
    # Put your extra information needed for plots etc in this dictionary
    extra_info = all_values

    # End code

    # Do not change the number of output values
    return {"Values": values, "Policy": policy}, extra_info
In [82]:
env = GridEnv_HW2(**base_kwargs)
res, extra_info = value_iteration(env, 0.7)

 # The rounding off is just for making print statement cleaner
print(np.flipud(np.round(res['Values'], decimals=2)))
print(np.flipud(res['Policy']))
[[0.1  0.15 0.24 0.37 0.56 0.86 1.29 0.12 8.68 0.  ]
 [0.13 0.2  0.31 0.5  0.81 1.31 2.12 3.43 5.75 8.95]
 [0.1  0.16 0.25 0.39 0.62 0.97 1.52 2.38 3.7  5.61]
 [0.07 0.11 0.17 0.26 0.41 0.64 0.99 1.54 2.38 3.52]
 [0.05 0.07 0.11 0.17 0.27 0.41 0.64 0.99 1.53 2.21]
 [0.03 0.05 0.07 0.11 0.17 0.27 0.41 0.64 0.98 1.39]
 [0.02 0.03 0.05 0.07 0.11 0.17 0.27 0.41 0.63 0.87]
 [0.03 0.02 0.03 0.05 0.07 0.11 0.17 0.27 0.4  0.55]
 [0.04 0.03 0.02 0.03 0.05 0.07 0.11 0.17 0.26 0.35]
 [0.07 0.04 0.03 0.02 0.03 0.05 0.07 0.11 0.17 0.22]]
[['E' 'E' 'E' 'E' 'E' 'S' 'S' 'N' 'E' 'N']
 ['E' 'E' 'E' 'E' 'E' 'E' 'E' 'E' 'E' 'N']
 ['E' 'E' 'E' 'E' 'E' 'E' 'E' 'E' 'N' 'N']
 ['E' 'E' 'E' 'E' 'E' 'E' 'E' 'E' 'N' 'N']
 ['N' 'E' 'E' 'E' 'E' 'E' 'E' 'N' 'N' 'N']
 ['N' 'E' 'E' 'E' 'E' 'E' 'N' 'N' 'N' 'N']
 ['N' 'N' 'E' 'E' 'E' 'N' 'N' 'N' 'N' 'N']
 ['S' 'N' 'E' 'E' 'E' 'N' 'N' 'N' 'N' 'N']
 ['S' 'S' 'E' 'E' 'E' 'E' 'N' 'N' 'N' 'N']
 ['N' 'W' 'W' 'E' 'E' 'E' 'E' 'N' 'N' 'N']]

Task 2.2 - Policy Iteration

Run policy iteration on the environment and generate the policy and expected reward

In [83]:
def policy_iteration(env, gamma):
    # Initial Values
    values = np.zeros((10, 10))

    # Initial policy
    policy = np.empty((10, 10), object)
    policy[:] = 'N' # Make all the policy values as 'N'

    # Begin code here   
    V = np.zeros((10,10))
    actions=env.perpendicular_order
    tol=20
    done=0
    all_values=[]
    while done==0:
      while True:
        tol=0
        for x in range(10):
          for y in range(10):
            state=(x,y)
            J=V[x][y]
            Ja=0
            for i in range(len(env.get_transition_probabilites_and_reward(state,policy[x][y]))):
              p=env.get_transition_probabilites_and_reward(state,policy[x][y])[i]
              Ja+=p[1]*(p[2]+gamma*V[p[0][0]][p[0][1]])
            V[x][y]=Ja
            tol=max(tol,abs(J-Ja))
        if tol<=1e-8:
          break
      values=V
      done=1
      for x in range(10):
        for y in range(10):
          state=(x,y)
          b=policy[x][y]
          J=[0,0,0,0]
          for j in range(len(actions)):
            Ja=0
            for i in range(len(env.get_transition_probabilites_and_reward(state,actions[j]))):
              p=env.get_transition_probabilites_and_reward(state,actions[j])[i]
              Ja+=p[1]*(p[2]+gamma*V[p[0][0]][p[0][1]])
            J[j]=Ja
          V[x][y]=max(J)
          best_policy=J.index(max(J))
          policy[x][y]=actions[best_policy]
          if b!=policy[x][y]:
            done=0
      all_values.append(V.copy())
    # Put your extra information needed for plots etc in this dictionary
    extra_info = all_values

    # End code

    # Do not change the number of output values
    return {"Values": values, "Policy": policy}, extra_info
In [84]:
env = GridEnv_HW2(**base_kwargs)
res, extra_info = policy_iteration(env, 0.7)

 # The rounding off is just for making print statement cleaner
print(np.flipud(np.round(res['Values'], decimals=2)))
print(np.flipud(res['Policy']))
[[0.1  0.15 0.24 0.37 0.56 0.86 1.29 0.12 8.68 0.  ]
 [0.13 0.2  0.31 0.5  0.81 1.31 2.12 3.43 5.75 8.95]
 [0.1  0.16 0.25 0.39 0.62 0.97 1.52 2.38 3.7  5.61]
 [0.07 0.11 0.17 0.26 0.41 0.64 0.99 1.54 2.38 3.52]
 [0.05 0.07 0.11 0.17 0.27 0.41 0.64 0.99 1.53 2.21]
 [0.03 0.05 0.07 0.11 0.17 0.27 0.41 0.64 0.98 1.39]
 [0.02 0.03 0.05 0.07 0.11 0.17 0.27 0.41 0.63 0.87]
 [0.03 0.02 0.03 0.05 0.07 0.11 0.17 0.27 0.4  0.55]
 [0.04 0.03 0.02 0.03 0.05 0.07 0.11 0.17 0.26 0.35]
 [0.07 0.04 0.03 0.02 0.03 0.05 0.07 0.11 0.17 0.22]]
[['E' 'E' 'E' 'E' 'E' 'S' 'S' 'N' 'E' 'N']
 ['E' 'E' 'E' 'E' 'E' 'E' 'E' 'E' 'E' 'N']
 ['E' 'E' 'E' 'E' 'E' 'E' 'E' 'E' 'N' 'N']
 ['E' 'E' 'E' 'E' 'E' 'E' 'E' 'E' 'N' 'N']
 ['N' 'E' 'E' 'E' 'E' 'E' 'E' 'N' 'N' 'N']
 ['N' 'E' 'E' 'E' 'E' 'E' 'N' 'N' 'N' 'N']
 ['N' 'N' 'E' 'E' 'E' 'N' 'N' 'N' 'N' 'N']
 ['S' 'N' 'E' 'E' 'E' 'N' 'N' 'N' 'N' 'N']
 ['S' 'S' 'E' 'E' 'E' 'E' 'N' 'N' 'N' 'N']
 ['N' 'W' 'W' 'E' 'E' 'E' 'E' 'N' 'N' 'N']]

Task 2.3 - TD Lambda

Use the heuristic policy and implement TD lambda to find values on the gridworld

In [85]:
# The policy mentioned in the pdf to be used for TD lambda, do not modify this
def heuristic_policy(env, state):
    goal = env.goal_location
    dx = goal[0] - state[0]
    dy = goal[1] - state[1]
    if abs(dx) >= abs(dy):
        direction = (np.sign(dx), 0)
    else:
        direction = (0, np.sign(dy))
    for action, dir_val in env.actions.items():
        if dir_val == direction:
          global target_action
          target_action = action
          break
    return target_action
In [86]:
def td_lambda(env, lamda, seeds):
    alpha = 0.5
    gamma = 0.7
    N = len(seeds)
    # Usage of input_policy
    # heuristic_policy(env, state) -> action
    example_action = heuristic_policy(env, (1,2)) # Returns 'N' if goal is (9,9)

    # Example of env.step
    # env.step(state, action) -> Returns next_state, reward, is_terminal

    # Initial values
    values = np.zeros((10, 10))
    es = np.zeros((10,10))
    all_values=[]
    for episode_idx in range(N):
         # Do not change this else the results will not match due to environment stochas
        np.random.seed(seeds[episode_idx])
        grey_in_loc = np.where(env.grid == 'grey_in')
        state = grey_in_loc[0][0], grey_in_loc[1][0]
        done = False
        while not done:
            action = heuristic_policy(env, state)
            ns, rew, is_terminal = env.step(state, action) 
            # env.step is already taken inside the loop for you, 
            # Don't use env.step anywhere else in your code

            # Begin code here
            delta=rew+gamma*values[ns[0]][ns[1]]-values[state[0]][state[1]]
            es[state[0]][state[1]]+=1
            for x in range(10):
              for y in range(10):
                values[x][y]+=alpha*delta*es[x][y]
                es[x][y]=gamma*lamda*es[x][y]
            state=ns
            if is_terminal==True:
              done=True
        all_values.append(values.copy())
    # Put your extra information needed for plots etc in this dictionary
    extra_info = all_values

    # End code

    # Do not change the number of output values
    return {"Values": values}, extra_info
In [87]:
env = GridEnv_HW2(**base_kwargs)
res, extra_info = td_lambda(env, lamda=0.5, seeds=np.arange(1000))

 # The rounding off is just for making print statement cleaner
print(np.flipud(np.round(res['Values'], decimals=2)))
[[ 0.    0.    0.01  0.02  0.03  0.06  0.08  0.11 10.    0.  ]
 [ 0.    0.    0.04  0.18  0.91  1.4   1.28  4.85  6.98  9.92]
 [ 0.    0.05  0.24  0.42  0.63  0.71  2.08  3.28  3.8   5.89]
 [ 0.02  0.08  0.21  0.31  0.48  0.82  1.29  1.66  2.2   3.39]
 [ 0.02  0.07  0.08  0.11  0.25  0.4   0.52  0.96  1.62  1.44]
 [ 0.02  0.04  0.05  0.1   0.16  0.23  0.38  0.57  1.08  0.97]
 [ 0.01  0.03  0.03  0.05  0.08  0.17  0.2   0.35  0.58  0.26]
 [ 0.    0.01  0.03  0.03  0.07  0.1   0.15  0.23  0.18  0.18]
 [ 0.    0.    0.01  0.01  0.03  0.03  0.1   0.15  0.16  0.  ]
 [ 0.12  0.    0.    0.    0.    0.01  0.01  0.11  0.13  0.  ]]

Task 2.4 - TD Lamdba for multiple values of $\lambda$

Ideally this code should run as is

In [88]:
# This cell is only for your subjective evaluation results, display the results as asked in the pdf
# You can change it as you require, this code should run TD lamdba by default for different values of lambda

lamda_values = np.arange(0, 100+5, 5)/100
td_lamda_results = {}
extra_info = {}
for lamda in lamda_values:
    env = GridEnv_HW2(**base_kwargs)
    td_lamda_results[lamda], extra_info[lamda] = td_lambda(env, lamda,
                                                           seeds=np.arange(1000))

Generate Results ✅

In [89]:
def get_results(kwargs):

    gridenv = GridEnv_HW2(**kwargs)

    policy_iteration_results = policy_iteration(gridenv, 0.7)[0]
    value_iteration_results = value_iteration(gridenv, 0.7)[0]
    td_lambda_results = td_lambda(env, 0.5, np.arange(1000))[0]

    final_results = {}
    final_results["policy_iteration"] = policy_iteration_results
    final_results["value_iteration"] = value_iteration_results
    final_results["td_lambda"] = td_lambda_results

    return final_results
In [90]:
# Do not edit this cell, generate results with it as is
if not os.path.exists(AICROWD_RESULTS_DIR):
    os.mkdir(AICROWD_RESULTS_DIR)

for params_file in os.listdir(DATASET_DIR):
  kwargs = np.load(os.path.join(DATASET_DIR, params_file), allow_pickle=True).item()
  results = get_results(kwargs)
  idx = params_file.split('_')[-1][:-4]
  np.save(os.path.join(AICROWD_RESULTS_DIR, 'results_' + idx), results)

Check your score on the public data

This scores is not your final score, and it doesn't use the marks weightages. This is only for your reference of how arrays are matched and with what tolerance.

In [91]:
# Check your score on the given test cases (There are more private test cases not provided)
target_folder = 'targets'
result_folder = AICROWD_RESULTS_DIR

def check_algo_match(results, targets):
    if 'Policy' in results:
        policy_match = results['Policy'] == targets['Policy']
    else:
        policy_match = True
    # Reference https://numpy.org/doc/stable/reference/generated/numpy.allclose.html
    rewards_match = np.allclose(results['Values'], targets['Values'], rtol=3)
    equal = rewards_match and policy_match
    return equal

def check_score(target_folder, result_folder):
    match = []
    for out_file in os.listdir(result_folder):
        res_file = os.path.join(result_folder, out_file)
        results = np.load(res_file, allow_pickle=True).item()
        idx = out_file.split('_')[-1][:-4]  # Extract the file number
        target_file = os.path.join(target_folder, f"targets_{idx}.npy")
        targets = np.load(target_file, allow_pickle=True).item()
        algo_match = []
        for k in targets:
            algo_results = results[k]
            algo_targets = targets[k]
            algo_match.append(check_algo_match(algo_results, algo_targets))
        match.append(np.mean(algo_match))
    return np.mean(match)

if os.path.exists(target_folder):
    print("Shared data Score (normalized to 1):", check_score(target_folder, result_folder))
Shared data Score (normalized to 1): 1.0
/usr/local/lib/python3.7/dist-packages/numpy/core/_asarray.py:136: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  return array(a, dtype, copy=False, order=order, subok=True)

Display Results of TD lambda

Display Results of TD lambda with lambda values from 0 to 1 with steps of 0.05

  0.0: {'Values': array([[1.12205780e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 1.73760435e-03, 0.00000000e+00, 6.57787744e-02,
    6.83468875e-02, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 5.54975309e-03, 0.00000000e+00,
    1.27654538e-02, 1.37659396e-03, 8.28701918e-02, 1.53914701e-01,
    1.42261986e-01, 0.00000000e+00],
   [0.00000000e+00, 9.00393221e-03, 2.42017272e-02, 1.90126256e-02,
    3.57879377e-02, 6.93120813e-02, 1.29888473e-01, 2.19197873e-01,
    1.86041779e-01, 7.14497181e-02],
   [1.86486893e-03, 1.71686321e-02, 3.70097105e-02, 4.48033447e-02,
    7.43643489e-02, 1.24373633e-01, 1.43895491e-01, 3.29617087e-01,
    5.54287467e-01, 0.00000000e+00],
   [5.54681074e-03, 2.99737385e-02, 5.34547685e-02, 9.21462313e-02,
    1.37756740e-01, 2.21775837e-01, 3.04568538e-01, 5.66782375e-01,
    9.87898640e-01, 3.47094902e-01],
   [1.30811583e-02, 5.07909928e-02, 9.91140955e-02, 1.07387846e-01,
    1.86668853e-01, 2.57309269e-01, 4.83892685e-01, 9.62428401e-01,
    1.54914648e+00, 1.08445436e+00],
   [4.85809272e-03, 4.74447088e-02, 1.76899510e-01, 1.98858462e-01,
    2.73656121e-01, 4.71328731e-01, 8.19454638e-01, 1.50190621e+00,
    2.28670725e+00, 3.51808552e+00],
   [0.00000000e+00, 4.63756494e-02, 1.94074187e-01, 3.79150319e-01,
    5.50070567e-01, 6.06525109e-01, 1.67621868e+00, 3.13408381e+00,
    3.41814494e+00, 5.58550125e+00],
   [0.00000000e+00, 0.00000000e+00, 3.44987083e-02, 9.33458419e-02,
    6.89167449e-01, 1.09165659e+00, 1.56170961e+00, 4.78755751e+00,
    6.94519419e+00, 9.91044954e+00],
   [0.00000000e+00, 0.00000000e+00, 1.78732819e-03, 9.48535675e-03,
    2.65285395e-02, 5.17893952e-02, 7.84088201e-02, 1.02590038e-01,
    9.99289736e+00, 0.00000000e+00]])}, 

    0.05: {'Values': array([[1.11165857e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 2.09136154e-03, 4.01034518e-06, 7.01934886e-02,
    7.57028621e-02, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 6.26275807e-03, 3.74738832e-04,
    1.40750990e-02, 3.48475454e-03, 8.58422521e-02, 1.55508105e-01,
    1.46923956e-01, 0.00000000e+00],
   [1.20927666e-05, 9.75371093e-03, 2.48750774e-02, 2.01219999e-02,
    3.85384985e-02, 7.17157300e-02, 1.31410591e-01, 2.23105743e-01,
    1.88853483e-01, 7.38013731e-02],
   [2.21406162e-03, 1.82428149e-02, 3.66233116e-02, 4.57266929e-02,
    7.56683016e-02, 1.29708042e-01, 1.48387920e-01, 3.38364663e-01,
    5.62541434e-01, 4.14448672e-03],
   [6.48341234e-03, 3.12256644e-02, 5.38541565e-02, 9.19383341e-02,
    1.35397509e-01, 2.23610796e-01, 3.13953171e-01, 5.79031771e-01,
    1.00392652e+00, 4.01682236e-01],
   [1.40600585e-02, 5.34578375e-02, 9.68248089e-02, 1.06827593e-01,
    1.87137605e-01, 2.66866149e-01, 4.89022916e-01, 9.68732980e-01,
    1.56617503e+00, 1.13096346e+00],
   [5.81052566e-03, 5.03156851e-02, 1.75818199e-01, 2.03994172e-01,
    2.90837716e-01, 5.00603367e-01, 8.67494397e-01, 1.51197532e+00,
    2.27949497e+00, 3.54940086e+00],
   [0.00000000e+00, 4.75345013e-02, 2.00913593e-01, 3.80794194e-01,
    5.48440585e-01, 6.17062931e-01, 1.71917789e+00, 3.14872651e+00,
    3.45275391e+00, 5.61313210e+00],
   [0.00000000e+00, 0.00000000e+00, 3.58453249e-02, 9.97675314e-02,
    7.06425956e-01, 1.14201147e+00, 1.53210437e+00, 4.79381862e+00,
    6.94841517e+00, 9.91011886e+00],
   [0.00000000e+00, 0.00000000e+00, 2.22631679e-03, 1.04227239e-02,
    2.74491962e-02, 5.26205308e-02, 7.79476397e-02, 1.04896471e-01,
    9.99398638e+00, 0.00000000e+00]])}, 

    0.1: {'Values': array([[1.10055292e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 2.52551142e-03, 3.41190521e-05, 7.47447224e-02,
    8.30702733e-02, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 6.90635542e-03, 8.48304182e-04,
    1.54495073e-02, 5.72002328e-03, 8.86270119e-02, 1.57079475e-01,
    1.50931131e-01, 0.00000000e+00],
   [4.91321942e-05, 1.04677737e-02, 2.54413468e-02, 2.12263414e-02,
    4.14518297e-02, 7.42983842e-02, 1.33314975e-01, 2.27003031e-01,
    1.91128538e-01, 7.69010422e-02],
   [2.57819270e-03, 1.93321831e-02, 3.62287424e-02, 4.65995480e-02,
    7.67804503e-02, 1.35084843e-01, 1.53042935e-01, 3.45652982e-01,
    5.69932569e-01, 1.33408832e-02],
   [7.50125348e-03, 3.25312963e-02, 5.39984974e-02, 9.17836981e-02,
    1.33982547e-01, 2.25107509e-01, 3.22974632e-01, 5.87985068e-01,
    1.01687479e+00, 4.57981392e-01],
   [1.50847101e-02, 5.58375929e-02, 9.44399977e-02, 1.06020537e-01,
    1.88817429e-01, 2.77729050e-01, 4.93550275e-01, 9.73947822e-01,
    1.58194772e+00, 1.17412700e+00],
   [6.93982465e-03, 5.32629050e-02, 1.75418258e-01, 2.10437251e-01,
    3.08118077e-01, 5.31250536e-01, 9.15782701e-01, 1.52321725e+00,
    2.27188626e+00, 3.57281593e+00],
   [0.00000000e+00, 4.83769272e-02, 2.06870129e-01, 3.82712863e-01,
    5.49774413e-01, 6.28486363e-01, 1.76203023e+00, 3.16362618e+00,
    3.48841296e+00, 5.64225206e+00],
   [0.00000000e+00, 0.00000000e+00, 3.70130939e-02, 1.06341455e-01,
    7.26502929e-01, 1.18915215e+00, 1.50345498e+00, 4.80013584e+00,
    6.95172707e+00, 9.91000504e+00],
   [0.00000000e+00, 0.00000000e+00, 2.68026974e-03, 1.13621088e-02,
    2.82969782e-02, 5.34683521e-02, 7.77849927e-02, 1.06832276e-01,
    9.99508491e+00, 0.00000000e+00]])}, 

    0.15: {'Values': array([[1.09079561e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 3.06321544e-03, 1.22679781e-04, 7.93613911e-02,
    9.03268389e-02, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 7.47011242e-03, 1.41099630e-03,
    1.68918224e-02, 8.09735875e-03, 9.12397978e-02, 1.58488387e-01,
    1.54339430e-01, 0.00000000e+00],
   [1.13368484e-04, 1.11392057e-02, 2.59126570e-02, 2.23282034e-02,
    4.45209451e-02, 7.71000307e-02, 1.35573795e-01, 2.30497062e-01,
    1.92768978e-01, 8.11071841e-02],
   [2.95831927e-03, 2.04477550e-02, 3.58195297e-02, 4.74109018e-02,
    7.77068367e-02, 1.40472523e-01, 1.57953894e-01, 3.51341776e-01,
    5.76115598e-01, 2.74666255e-02],
   [8.63127125e-03, 3.38699327e-02, 5.39608063e-02, 9.17568385e-02,
    1.33549368e-01, 2.26257150e-01, 3.31700930e-01, 5.93616110e-01,
    1.02724342e+00, 5.16183797e-01],
   [1.61490589e-02, 5.79256713e-02, 9.21085598e-02, 1.05146340e-01,
    1.91767706e-01, 2.89784137e-01, 4.97662067e-01, 9.77797876e-01,
    1.59576357e+00, 1.21459132e+00],
   [8.23415271e-03, 5.62947293e-02, 1.75871325e-01, 2.18205338e-01,
    3.25925928e-01, 5.63309733e-01, 9.64213796e-01, 1.53553429e+00,
    2.26392138e+00, 3.58794180e+00],
   [0.00000000e+00, 4.89431240e-02, 2.12050478e-01, 3.85097577e-01,
    5.53820914e-01, 6.40254794e-01, 1.80463240e+00, 3.17872168e+00,
    3.52496828e+00, 5.67255602e+00],
   [0.00000000e+00, 0.00000000e+00, 3.80224865e-02, 1.13185667e-01,
    7.48849847e-01, 1.23274500e+00, 1.47548213e+00, 4.80647758e+00,
    6.95510719e+00, 9.91013642e+00],
   [0.00000000e+00, 0.00000000e+00, 3.14451296e-03, 1.22958360e-02,
    2.90957925e-02, 5.43324744e-02, 7.79092370e-02, 1.08410510e-01,
    9.99618851e+00, 0.00000000e+00]])}, 

    0.2: {'Values': array([[1.08400803e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 3.72921619e-03, 3.09643923e-04, 8.39779215e-02,
    9.73435873e-02, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 7.95009434e-03, 2.05116002e-03,
    1.84006108e-02, 1.06381955e-02, 9.36822189e-02, 1.59567984e-01,
    1.57149696e-01, 0.00000000e+00],
   [2.08696023e-04, 1.17631611e-02, 2.63045746e-02, 2.34296451e-02,
    4.77545866e-02, 8.01346362e-02, 1.38140466e-01, 2.33288339e-01,
    1.93655960e-01, 8.67809885e-02],
   [3.35644675e-03, 2.15916706e-02, 3.53855660e-02, 4.81542231e-02,
    7.84593652e-02, 1.45838750e-01, 1.63192047e-01, 3.55321853e-01,
    5.80838074e-01, 4.63938644e-02],
   [9.90311751e-03, 3.52201947e-02, 5.37977982e-02, 9.19435095e-02,
    1.34121577e-01, 2.27081422e-01, 3.40175360e-01, 5.96013914e-01,
    1.03556151e+00, 5.76401510e-01],
   [1.72490422e-02, 5.97570031e-02, 8.99472324e-02, 1.04378439e-01,
    1.96006690e-01, 3.02939434e-01, 5.01540342e-01, 9.80083802e-01,
    1.60711667e+00, 1.25282466e+00],
   [9.68129766e-03, 5.94228823e-02, 1.77304332e-01, 2.27339203e-01,
    3.44601823e-01, 5.96736124e-01, 1.01265056e+00, 1.54889624e+00,
    2.25562458e+00, 3.59421421e+00],
   [0.00000000e+00, 4.92951757e-02, 2.16595634e-01, 3.88119894e-01,
    5.60272506e-01, 6.51970353e-01, 1.84683902e+00, 3.19394955e+00,
    3.56228129e+00, 5.70374516e+00],
   [0.00000000e+00, 0.00000000e+00, 3.88906115e-02, 1.20420101e-01,
    7.72864550e-01, 1.27239308e+00, 1.44794549e+00, 4.81281520e+00,
    6.95854045e+00, 9.91055532e+00],
   [0.00000000e+00, 0.00000000e+00, 3.61702837e-03, 1.32261750e-02,
    2.98728427e-02, 5.52046520e-02, 7.82911206e-02, 1.09599403e-01,
    9.99729815e+00, 0.00000000e+00]])},

     0.25: {'Values': array([[1.08150150e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 4.54970963e-03, 6.42565687e-04, 8.85303107e-02,
    1.03982011e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 8.34786405e-03, 2.75569274e-03,
    1.99733025e-02, 1.33697654e-02, 9.59408726e-02, 1.60153437e-01,
    1.59326786e-01, 0.00000000e+00],
   [3.40498666e-04, 1.23383894e-02, 2.66321602e-02, 2.45337053e-02,
    5.11719372e-02, 8.33912835e-02, 1.40941113e-01, 2.35167890e-01,
    1.93674183e-01, 9.42942593e-02],
   [3.77525518e-03, 2.27573160e-02, 3.49168161e-02, 4.88348177e-02,
    7.90431692e-02, 1.51137194e-01, 1.68791547e-01, 3.57539072e-01,
    5.83948335e-01, 7.00092150e-02],
   [1.13388013e-02, 3.65575701e-02, 5.35534979e-02, 9.24337642e-02,
    1.35708783e-01, 2.27617980e-01, 3.48410980e-01, 5.95392987e-01,
    1.04238726e+00, 6.38658157e-01],
   [1.83787628e-02, 6.13936441e-02, 8.80460711e-02, 1.03880605e-01,
    2.01526970e-01, 3.17118273e-01, 5.05336059e-01, 9.80695685e-01,
    1.61568173e+00, 1.28911820e+00],
   [1.12703903e-02, 6.26696262e-02, 1.79814226e-01, 2.37888785e-01,
    3.64406198e-01, 6.31414380e-01, 1.06092847e+00, 1.56334140e+00,
    2.24701799e+00, 3.59088927e+00],
   [0.00000000e+00, 4.95134250e-02, 2.20682151e-01, 3.91913984e-01,
    5.68769811e-01, 6.63360629e-01, 1.88850209e+00, 3.20924554e+00,
    3.60023231e+00, 5.73552721e+00],
   [0.00000000e+00, 0.00000000e+00, 3.96298238e-02, 1.28163594e-01,
    7.97894634e-01, 1.30765583e+00, 1.42062718e+00, 4.81912445e+00,
    6.96201877e+00, 9.91131570e+00],
   [0.00000000e+00, 0.00000000e+00, 4.09876380e-03, 1.41621856e-02,
    3.06534888e-02, 5.60716518e-02, 7.88853024e-02, 1.10335572e-01,
    9.99841883e+00, 0.00000000e+00]])}, 

    0.3: {'Values': array([[1.08439205e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 5.55272983e-03, 1.17575191e-03, 9.29564939e-02,
    1.10092489e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 8.66889180e-03, 3.51070200e-03,
    2.16081935e-02, 1.63243474e-02, 9.79873249e-02, 1.60106106e-01,
    1.60812975e-01, 0.00000000e+00],
   [5.15145777e-04, 1.28682638e-02, 2.69062758e-02, 2.56462002e-02,
    5.47958590e-02, 8.68383188e-02, 1.43868696e-01, 2.36018034e-01,
    1.92730658e-01, 1.04043899e-01],
   [4.21847081e-03, 2.39299715e-02, 3.44057112e-02, 4.94738776e-02,
    7.94484057e-02, 1.56297045e-01, 1.74739104e-01, 3.58021446e-01,
    5.85410576e-01, 9.82288247e-02],
   [1.29463162e-02, 3.78535612e-02, 5.32631220e-02, 9.33170018e-02,
    1.38308490e-01, 2.27912136e-01, 3.56387480e-01, 5.92109399e-01,
    1.04830709e+00, 7.02880014e-01],
   [1.95276376e-02, 6.29148473e-02, 8.64739188e-02, 1.03802671e-01,
    2.08306850e-01, 3.32253742e-01, 5.09148601e-01, 9.79626726e-01,
    1.62130134e+00, 1.32358659e+00],
   [1.29915704e-02, 6.60711674e-02, 1.83477844e-01, 2.49899794e-01,
    3.85526976e-01, 6.67170989e-01, 1.10885921e+00, 1.57897660e+00,
    2.23813757e+00, 3.57703871e+00],
   [0.00000000e+00, 4.96925283e-02, 2.24516252e-01, 3.96560029e-01,
    5.78903211e-01, 6.74261170e-01, 1.92947174e+00, 3.22454630e+00,
    3.63872592e+00, 5.76761737e+00],
   [0.00000000e+00, 0.00000000e+00, 4.02472808e-02, 1.36533224e-01,
    8.23243824e-01, 1.33806575e+00, 1.39331748e+00, 4.82538616e+00,
    6.96554057e+00, 9.91248015e+00],
   [0.00000000e+00, 0.00000000e+00, 4.59287241e-03, 1.51160642e-02,
    3.14572998e-02, 5.69168130e-02, 7.96330731e-02, 1.10541414e-01,
    9.99955910e+00, 0.00000000e+00]])}, 

    0.35: {'Values': array([[1.09370298e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 6.76904144e-03, 1.96854444e-03, 9.71997567e-02,
    1.15514466e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 8.92037858e-03, 4.30199502e-03,
    2.33052390e-02, 1.95392751e-02, 9.97793569e-02, 1.59333809e-01,
    1.61536816e-01, 0.00000000e+00],
   [7.39341907e-04, 1.33613170e-02, 2.71313992e-02, 2.67773164e-02,
    5.86446685e-02, 9.04298325e-02, 1.46780547e-01, 2.35819012e-01,
    1.90767750e-01, 1.16471608e-01],
   [4.69179604e-03, 2.50881270e-02, 3.38489882e-02, 5.01098486e-02,
    7.96461007e-02, 1.61214892e-01, 1.80967932e-01, 3.56910976e-01,
    5.85327631e-01, 1.31009003e-01],
   [1.47135676e-02, 3.90758881e-02, 5.29569859e-02, 9.46790638e-02,
    1.41909254e-01, 2.28012205e-01, 3.64050362e-01, 5.86681193e-01,
    1.05393528e+00, 7.68888028e-01],
   [2.06790482e-02, 6.44109192e-02, 8.52838583e-02, 1.04276474e-01,
    2.16318585e-01, 3.48283822e-01, 5.13010103e-01, 9.76986516e-01,
    1.62397467e+00, 1.35616897e+00],
   [1.48349841e-02, 6.96763171e-02, 1.88357572e-01, 2.63400494e-01,
    4.08086996e-01, 7.03785570e-01, 1.15623397e+00, 1.59597666e+00,
    2.22905077e+00, 3.55154479e+00],
   [0.00000000e+00, 4.99377882e-02, 2.28321196e-01, 4.02067916e-01,
    5.90211791e-01, 6.84597648e-01, 1.96959801e+00, 3.23979089e+00,
    3.67769780e+00, 5.79973988e+00],
   [0.00000000e+00, 0.00000000e+00, 4.07446203e-02, 1.45644710e-01,
    8.48181257e-01, 1.36314205e+00, 1.36580455e+00, 4.83158645e+00,
    6.96911045e+00, 9.91411677e+00],
   [0.00000000e+00, 0.00000000e+00, 5.10322359e-03, 1.60994108e-02,
    3.22952868e-02, 5.77206886e-02, 8.04672665e-02, 1.10144207e-01,
    1.00007312e+01, 0.00000000e+00]])}, 

    0.4: {'Values': array([[1.11045109e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 8.23371054e-03, 3.08263290e-03, 1.01213979e-01,
    1.20078603e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 9.10879770e-03, 5.11511981e-03,
    2.50658213e-02, 2.30585293e-02, 1.01263419e-01, 1.57807747e-01,
    1.61419747e-01, 0.00000000e+00],
   [1.01961872e-03, 1.38312851e-02, 2.73058256e-02, 2.79424345e-02,
    6.27224263e-02, 9.41136082e-02, 1.49499841e-01, 2.34663829e-01,
    1.87771331e-01, 1.32087313e-01],
   [5.20418556e-03, 2.62053920e-02, 3.32492921e-02, 5.07973993e-02,
    7.95871943e-02, 1.65748762e-01, 1.87355741e-01, 3.54501467e-01,
    5.83972837e-01, 1.68352899e-01],
   [1.66031529e-02, 4.01894234e-02, 5.26642866e-02, 9.66012463e-02,
    1.46494606e-01, 2.27966451e-01, 3.71312420e-01, 5.79811536e-01,
    1.05991475e+00, 8.36391858e-01],
   [2.18110772e-02, 6.59815147e-02, 8.45189735e-02, 1.05412681e-01,
    2.25534110e-01, 3.65147096e-01, 5.16874470e-01, 9.73013550e-01,
    1.62384778e+00, 1.38663128e+00],
   [1.67902473e-02, 7.35397432e-02, 1.94503360e-01, 2.78388736e-01,
    4.32151502e-01, 7.41001480e-01, 1.20282674e+00, 1.61458380e+00,
    2.21987542e+00, 3.51309501e+00],
   [0.00000000e+00, 5.03622367e-02, 2.32317950e-01, 4.08360952e-01,
    6.02180250e-01, 6.94367472e-01, 2.00873304e+00, 3.25492233e+00,
    3.71712225e+00, 5.83162974e+00],
   [0.00000000e+00, 0.00000000e+00, 4.11171995e-02, 1.55612978e-01,
    8.71953538e-01, 1.38240129e+00, 1.33786947e+00, 4.83771702e+00,
    6.97273925e+00, 9.91629633e+00],
   [0.00000000e+00, 0.00000000e+00, 5.63257222e-03, 1.71198412e-02,
    3.31685184e-02, 5.84619699e-02, 8.13204854e-02, 1.09094820e-01,
    1.00019522e+01, 0.00000000e+00]])}, 

    0.45: {'Values': array([[1.13571115e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 9.98868519e-03, 4.57815073e-03, 1.04969206e-01,
    1.23611019e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 9.23775710e-03, 5.93485487e-03,
    2.68915261e-02, 2.69367740e-02, 1.02378241e-01, 1.55576991e-01,
    1.60383951e-01, 0.00000000e+00],
   [1.36226238e-03, 1.42966976e-02, 2.74245807e-02, 2.91616311e-02,
    6.70076250e-02, 9.78390580e-02, 1.51821581e-01, 2.32783210e-01,
    1.83776028e-01, 1.51494471e-01],
   [5.76911097e-03, 2.72528252e-02, 3.26165013e-02, 5.16039821e-02,
    7.92036116e-02, 1.69714366e-01, 1.93726669e-01, 3.51282806e-01,
    5.81832951e-01, 2.10313886e-01],
   [1.85487604e-02, 4.11577856e-02, 5.24167264e-02, 9.91609898e-02,
    1.52047364e-01, 2.27820230e-01, 3.78057755e-01, 5.72412814e-01,
    1.06691986e+00, 9.04987399e-01],
   [2.29000212e-02, 6.77382645e-02, 8.42188304e-02, 1.07298922e-01,
    2.35928659e-01, 3.82779053e-01, 5.20611299e-01, 9.68086767e-01,
    1.62120482e+00, 1.41457092e+00],
   [1.88473146e-02, 7.77095876e-02, 2.01951649e-01, 2.94819607e-01,
    4.57735816e-01, 7.78535806e-01, 1.24839742e+00, 1.63510728e+00,
    2.21079926e+00, 3.46017668e+00],
   [0.00000000e+00, 5.10849673e-02, 2.36699034e-01, 4.15259831e-01,
    6.14234448e-01, 7.03620608e-01, 2.04673363e+00, 3.26988906e+00,
    3.75701995e+00, 5.86303390e+00],
   [0.00000000e+00, 0.00000000e+00, 4.13526491e-02, 1.66552439e-01,
    8.93799391e-01, 1.39536495e+00, 1.30928761e+00, 4.84377549e+00,
    6.97644451e+00, 9.91908940e+00],
   [0.00000000e+00, 0.00000000e+00, 6.18090688e-03, 1.81786384e-02,
    3.40688462e-02, 5.91205442e-02, 8.21375737e-02, 1.07384622e-01,
    1.00032458e+01, 0.00000000e+00]])}, 

    0.5: {'Values': array([[1.17065175e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 1.20869146e-02, 6.50801063e-03, 1.08455100e-01,
    1.25939840e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 9.30697487e-03, 6.74433462e-03,
    2.87816477e-02, 3.12467594e-02, 1.03059572e-01, 1.52781881e-01,
    1.58366091e-01, 0.00000000e+00],
   [1.77384263e-03, 1.47800884e-02, 2.74846931e-02, 3.04573845e-02,
    7.14399810e-02, 1.01562738e-01, 1.53524012e-01, 2.30581627e-01,
    1.78870946e-01, 1.75414748e-01],
   [6.40534487e-03, 2.82016679e-02, 3.19684901e-02, 5.26038043e-02,
    7.84100241e-02, 1.72884035e-01, 1.99857466e-01, 3.47990968e-01,
    5.79664376e-01, 2.56996466e-01],
   [2.04541062e-02, 4.19457138e-02, 5.22520506e-02, 1.02433955e-01,
    1.58553992e-01, 2.27612595e-01, 3.84148807e-01, 5.65629731e-01,
    1.07566085e+00, 9.74159503e-01],
   [2.39275526e-02, 6.98107944e-02, 8.44269638e-02, 1.09999353e-01,
    2.47482489e-01, 4.01109042e-01, 5.24005132e-01, 9.62735996e-01,
    1.61645974e+00, 1.43942491e+00],
   [2.09996045e-02, 8.22097499e-02, 2.10721662e-01, 3.12594289e-01,
    4.84813194e-01, 8.16088700e-01, 1.29269479e+00, 1.65792382e+00,
    2.20209915e+00, 3.39107140e+00],
   [0.00000000e+00, 5.22314165e-02, 2.41595651e-01, 4.22467516e-01,
    6.25736022e-01, 7.12439438e-01, 2.08346370e+00, 3.28464640e+00,
    3.79746486e+00, 5.89371046e+00],
   [0.00000000e+00, 0.00000000e+00, 4.14289002e-02, 1.78576928e-01,
    9.12966633e-01, 1.40156387e+00, 1.27983718e+00, 4.84976577e+00,
    6.98025075e+00, 9.92256338e+00],
   [0.00000000e+00, 0.00000000e+00, 6.74471744e-03, 1.92706213e-02,
    3.49830663e-02, 5.96848511e-02, 8.28928265e-02, 1.05060024e-01,
    1.00046447e+01, 0.00000000e+00]])}, 

    0.55: {'Values': array([[1.21653444e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 1.45988309e-02, 8.90935444e-03, 1.11678094e-01,
    1.26904807e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 9.31312760e-03, 7.52432785e-03,
    3.07285399e-02, 3.60911461e-02, 1.03245917e-01, 1.49668080e-01,
    1.55342754e-01, 0.00000000e+00],
   [2.26222173e-03, 1.53068971e-02, 2.74917169e-02, 3.18501557e-02,
    7.59047726e-02, 1.05247863e-01, 1.54386781e-01, 2.28683817e-01,
    1.73210599e-01, 2.04708608e-01],
   [7.13680093e-03, 2.90269439e-02, 3.13309204e-02, 5.38689342e-02,
    7.71050690e-02, 1.74989563e-01, 2.05488793e-01, 3.45661250e-01,
    5.78564848e-01, 3.08555656e-01],
   [2.21954430e-02, 4.25224625e-02, 5.22176823e-02, 1.06497168e-01,
    1.66008682e-01, 2.27372350e-01, 3.89437217e-01, 5.60859270e-01,
    1.08688930e+00, 1.04329181e+00],
   [2.48926179e-02, 7.23542836e-02, 8.51993363e-02, 1.13555496e-01,
    2.60180763e-01, 4.20057989e-01, 5.26760565e-01, 9.57651180e-01,
    1.61014726e+00, 1.46048309e+00],
   [2.32502749e-02, 8.70176981e-02, 2.20809481e-01, 3.31550796e-01,
    5.13322694e-01, 8.53351831e-01, 1.33545919e+00, 1.68347917e+00,
    2.19415866e+00, 3.30384929e+00],
   [0.00000000e+00, 5.39367485e-02, 2.47038732e-01, 4.29555987e-01,
    6.35976169e-01, 7.20917875e-01, 2.11879659e+00, 3.29915757e+00,
    3.83858971e+00, 5.92342408e+00],
   [0.00000000e+00, 0.00000000e+00, 4.13123514e-02, 1.91799780e-01,
    9.28731068e-01, 1.40053987e+00, 1.24931529e+00, 4.85569802e+00,
    6.98418930e+00, 9.92677852e+00],
   [0.00000000e+00, 0.00000000e+00, 7.31814342e-03, 2.03878852e-02,
    3.59021560e-02, 6.01654150e-02, 8.36117672e-02, 1.02235154e-01,
    1.00061942e+01, 0.00000000e+00]])}, 

    0.6: {'Values': array([[1.27466653e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 1.76224833e-02, 1.17899738e-02, 1.14645563e-01,
    1.26372063e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 9.25294553e-03, 8.25343355e-03,
    3.27088867e-02, 4.16200260e-02, 1.02884827e-01, 1.46603171e-01,
    1.51374491e-01, 0.00000000e+00],
   [2.83749906e-03, 1.59040606e-02, 2.74655628e-02, 3.33517047e-02,
    8.02138115e-02, 1.08852854e-01, 1.54217417e-01, 2.27988947e-01,
    1.67036938e-01, 2.40387133e-01],
   [7.99123744e-03, 2.97131347e-02, 3.07356604e-02, 5.54571962e-02,
    7.51713379e-02, 1.75731514e-01, 2.10343500e-01, 3.45679843e-01,
    5.80062066e-01, 3.65195988e-01],
   [2.36287790e-02, 4.28664816e-02, 5.23748284e-02, 1.11432876e-01,
    1.74416843e-01, 2.27114132e-01, 3.93779706e-01, 5.59765189e-01,
    1.10140322e+00, 1.11168577e+00],
   [2.58293936e-02, 7.55557412e-02, 8.66132726e-02, 1.17987853e-01,
    2.74011612e-01, 4.39536983e-01, 5.28513615e-01, 9.53690258e-01,
    1.60291186e+00, 1.47690797e+00],
   [2.56227113e-02, 9.20391968e-02, 2.32180135e-01, 3.51457180e-01,
    5.43176566e-01, 8.90015481e-01, 1.37642439e+00, 1.71229075e+00,
    2.18748252e+00, 3.19636281e+00],
   [0.00000000e+00, 5.63542908e-02, 2.52915383e-01, 4.35955798e-01,
    6.44167997e-01, 7.29140386e-01, 2.15261690e+00, 3.31339381e+00,
    3.88058914e+00, 5.95193535e+00],
   [0.00000000e+00, 0.00000000e+00, 4.09573677e-02, 2.06335052e-01,
    9.40416712e-01, 1.39184478e+00, 1.21756230e+00, 4.86158745e+00,
    6.98829649e+00, 9.93178239e+00],
   [0.00000000e+00, 0.00000000e+00, 7.89696465e-03, 2.15291549e-02,
    3.68368292e-02, 6.06151535e-02, 8.43963522e-02, 9.91043040e-02,
    1.00079551e+01, 0.00000000e+00]])}, 

    0.65: {'Values': array([[1.34629719e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 2.12992819e-02, 1.51059330e-02, 1.17327355e-01,
    1.24258781e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 9.12806088e-03, 8.90994309e-03,
    3.46673034e-02, 4.80556677e-02, 1.01938465e-01, 1.44097160e-01,
    1.46676064e-01, 0.00000000e+00],
   [3.51191612e-03, 1.65981833e-02, 2.74426335e-02, 3.49561461e-02,
    8.40816537e-02, 1.12302330e-01, 1.52887466e-01, 2.29726386e-01,
    1.60718564e-01, 2.83608728e-01],
   [8.99843386e-03, 3.02639528e-02, 3.02174798e-02, 5.73963090e-02,
    7.24747768e-02, 1.74799796e-01, 2.14154857e-01, 3.49825853e-01,
    5.86219472e-01, 4.27171430e-01],
   [2.46029517e-02, 4.29717411e-02, 5.28038517e-02, 1.17332744e-01,
    1.83797670e-01, 2.26835644e-01, 3.97060605e-01, 5.64284445e-01,
    1.12004933e+00, 1.17859077e+00],
   [2.68328464e-02, 7.96351663e-02, 8.87758206e-02, 1.23297521e-01,
    2.88962422e-01, 4.59446958e-01, 5.28849467e-01, 9.51885383e-01,
    1.59549303e+00, 1.48776329e+00],
   [2.81764504e-02, 9.70817426e-02, 2.44757709e-01, 3.72007548e-01,
    5.74266177e-01, 9.25773417e-01, 1.41531794e+00, 1.74495111e+00,
    2.18270633e+00, 3.06624040e+00],
   [0.00000000e+00, 5.96722150e-02, 2.58923229e-01, 4.40949199e-01,
    6.49435934e-01, 7.37162353e-01, 2.18482168e+00, 3.32733240e+00,
    3.92372027e+00, 5.97898203e+00],
   [0.00000000e+00, 0.00000000e+00, 4.03085905e-02, 2.22301233e-01,
    9.47416502e-01, 1.37503751e+00, 1.18449485e+00, 4.86745121e+00,
    6.99260941e+00, 9.93760227e+00],
   [0.00000000e+00, 0.00000000e+00, 8.48578489e-03, 2.27156020e-02,
    3.78390732e-02, 6.11544002e-02, 8.54510119e-02, 9.59567249e-02,
    1.00100067e+01, 0.00000000e+00]])}, 

    0.7: {'Values': array([[1.43244600e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 2.58381033e-02, 1.87242411e-02, 1.19581977e-01,
    1.20576509e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 8.94960256e-03, 9.47558971e-03,
    3.64862347e-02, 5.57260884e-02, 1.00385629e-01, 1.42826920e-01,
    1.41720228e-01, 0.00000000e+00],
   [4.29759565e-03, 1.74132481e-02, 2.74694782e-02, 3.66287748e-02,
    8.70950153e-02, 1.15432015e-01, 1.50378234e-01, 2.35502927e-01,
    1.54811384e-01, 3.35652388e-01],
   [1.01902299e-02, 3.07188018e-02, 2.98085854e-02, 5.96632638e-02,
    6.88668420e-02, 1.71914196e-01, 2.16708989e-01, 3.60292255e-01,
    5.99757500e-01, 4.94787652e-01],
   [2.49792812e-02, 4.28565553e-02, 5.36126160e-02, 1.24301986e-01,
    1.94185598e-01, 2.26517457e-01, 3.99223387e-01, 5.76622612e-01,
    1.14371985e+00, 1.24324725e+00],
   [2.80936593e-02, 8.48367137e-02, 9.18299927e-02, 1.29466968e-01,
    3.05014587e-01, 4.79679756e-01, 5.27326200e-01, 9.53446944e-01,
    1.58870534e+00, 1.49205234e+00],
   [3.10296378e-02, 1.01828696e-01, 2.58413118e-01, 3.92820746e-01,
    6.06464720e-01, 9.60324113e-01, 1.45185857e+00, 1.78213098e+00,
    2.18060023e+00, 2.91088126e+00],
   [0.00000000e+00, 6.41434839e-02, 2.64526376e-01, 4.43666960e-01,
    6.50799361e-01, 7.44994148e-01, 2.21532065e+00, 3.34095177e+00,
    3.96829972e+00, 6.00425106e+00],
   [0.00000000e+00, 0.00000000e+00, 3.93070509e-02, 2.39828658e-01,
    9.49212210e-01, 1.34968023e+00, 1.15014860e+00, 4.87330207e+00,
    6.99715804e+00, 9.94423531e+00],
   [0.00000000e+00, 0.00000000e+00, 9.10702049e-03, 2.40114513e-02,
    3.90261682e-02, 6.19941525e-02, 8.71047146e-02, 9.31968335e-02,
    1.00124475e+01, 0.00000000e+00]])}, 

    0.75: {'Values': array([[1.53365551e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 3.15510606e-02, 2.23611714e-02, 1.21032147e-01,
    1.15507978e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 8.73806822e-03, 9.93997302e-03,
    3.79328126e-02, 6.51083592e-02, 9.82149343e-02, 1.43662061e-01,
    1.37380239e-01, 0.00000000e+00],
   [5.20166022e-03, 1.83686741e-02, 2.75795939e-02, 3.82925028e-02,
    8.86725112e-02, 1.17896809e-01, 1.46832984e-01, 2.47326312e-01,
    1.50139668e-01, 3.97856745e-01],
   [1.16082292e-02, 3.11783747e-02, 2.95300246e-02, 6.21571675e-02,
    6.41978750e-02, 1.66899791e-01, 2.17906957e-01, 3.79670555e-01,
    6.24186400e-01, 5.68408214e-01],
   [2.46569014e-02, 4.25774012e-02, 5.49513305e-02, 1.32462955e-01,
    2.05630500e-01, 2.26126820e-01, 4.00314728e-01, 5.99235211e-01,
    1.17334064e+00, 1.30494439e+00],
   [2.99445423e-02, 9.14039018e-02, 9.59570769e-02, 1.36459561e-01,
    3.22137244e-01, 5.00120958e-01, 5.23503390e-01, 9.59764609e-01,
    1.58341213e+00, 1.48876640e+00],
   [3.43881616e-02, 1.05816063e-01, 2.72948699e-01, 4.13440957e-01,
    6.39623971e-01, 9.93366276e-01, 1.48574905e+00, 1.82458095e+00,
    2.18206556e+00, 2.72745587e+00],
   [0.00000000e+00, 7.01365596e-02, 2.68917733e-01, 4.43088145e-01,
    6.47145858e-01, 7.52592808e-01, 2.24403575e+00, 3.35422217e+00,
    4.01469595e+00, 6.02734355e+00],
   [0.00000000e+00, 0.00000000e+00, 3.78990809e-02, 2.59070470e-01,
    9.45391455e-01, 1.31533436e+00, 1.11473032e+00, 4.87913840e+00,
    7.00195318e+00, 9.95163729e+00],
   [0.00000000e+00, 0.00000000e+00, 9.80698277e-03, 2.55429036e-02,
    4.05987445e-02, 6.34445811e-02, 8.98209193e-02, 9.13722396e-02,
    1.00153933e+01, 0.00000000e+00]])}, 

    0.8: {'Values': array([[1.64966725e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 3.89037057e-02, 2.54827166e-02, 1.20872239e-01,
    1.09538823e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 8.50985026e-03, 1.03013648e-02,
    3.85694417e-02, 7.68799896e-02, 9.54002893e-02, 1.47685855e-01,
    1.35110195e-01, 0.00000000e+00],
   [6.22072968e-03, 1.94815332e-02, 2.77375872e-02, 3.98113529e-02,
    8.80108741e-02, 1.19029272e-01, 1.42606714e-01, 2.67584992e-01,
    1.47885846e-01, 4.71511415e-01],
   [1.33307773e-02, 3.18406006e-02, 2.93775719e-02, 6.46629152e-02,
    5.83595424e-02, 1.59821947e-01, 2.17853089e-01, 4.10881302e-01,
    6.63944927e-01, 6.48466865e-01],
   [2.35986683e-02, 4.22542315e-02, 5.70407408e-02, 1.41957546e-01,
    2.18196566e-01, 2.25626423e-01, 4.00546772e-01, 6.34792581e-01,
    1.20984853e+00, 1.36309433e+00],
   [3.29203995e-02, 9.95317367e-02, 1.01373364e-01, 1.44218908e-01,
    3.40280828e-01, 5.20654668e-01, 5.16973322e-01, 9.72404800e-01,
    1.58049283e+00, 1.47694213e+00],
   [3.85790313e-02, 1.08413673e-01, 2.88078493e-01, 4.33338867e-01,
    6.73561361e-01, 1.02458630e+00, 1.51666300e+00, 1.87313190e+00,
    2.18812392e+00, 2.51292408e+00],
   [0.00000000e+00, 7.82174430e-02, 2.70993307e-01, 4.38040751e-01,
    6.37186866e-01, 7.59867420e-01, 2.27090033e+00, 3.36709158e+00,
    4.06331318e+00, 6.04774203e+00],
   [0.00000000e+00, 0.00000000e+00, 3.60427390e-02, 2.80213276e-01,
    9.35658077e-01, 1.27155651e+00, 1.07867551e+00, 4.88493002e+00,
    7.00696986e+00, 9.95971306e+00],
   [0.00000000e+00, 0.00000000e+00, 1.06494313e-02, 2.75015720e-02,
    4.28378867e-02, 6.58872611e-02, 9.41825738e-02, 9.12095971e-02,
    1.00189704e+01, 0.00000000e+00]])}, 

    0.85: {'Values': array([[1.77904318e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 4.85793164e-02, 2.71488068e-02, 1.17587566e-01,
    1.03671014e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 8.23421985e-03, 1.05533219e-02,
    3.76115928e-02, 9.19706266e-02, 9.18455437e-02, 1.56200449e-01,
    1.37149099e-01, 0.00000000e+00],
   [7.34270043e-03, 2.07844249e-02, 2.77205412e-02, 4.09698406e-02,
    8.40131023e-02, 1.17635713e-01, 1.38295792e-01, 2.98961591e-01,
    1.49659370e-01, 5.57684101e-01],
   [1.55394729e-02, 3.30457004e-02, 2.92969484e-02, 6.68030233e-02,
    5.13911375e-02, 1.51220807e-01, 2.16977694e-01, 4.57034125e-01,
    7.24540068e-01, 7.35490368e-01],
   [2.18436453e-02, 4.21220036e-02, 6.02262659e-02, 1.52947216e-01,
    2.31959612e-01, 2.24987425e-01, 4.00386819e-01, 6.86129442e-01,
    1.25415877e+00, 1.41732774e+00],
   [3.78356721e-02, 1.09287198e-01, 1.08320327e-01, 1.52672135e-01,
    3.59371592e-01, 5.41170031e-01, 5.07390335e-01, 9.93105724e-01,
    1.58080574e+00, 1.45572607e+00],
   [4.40805330e-02, 1.08812125e-01, 3.03403454e-01, 4.51912160e-01,
    7.08032807e-01, 1.05363563e+00, 1.54422510e+00, 1.92870054e+00,
    2.19989854e+00, 2.26409767e+00],
   [0.00000000e+00, 8.92768195e-02, 2.69344006e-01, 4.27198985e-01,
    6.19384185e-01, 7.66706284e-01, 2.29586000e+00, 3.37946695e+00,
    4.11455997e+00, 6.06480407e+00],
   [0.00000000e+00, 0.00000000e+00, 3.36997979e-02, 3.03476091e-01,
    9.19828809e-01, 1.21789108e+00, 1.04269940e+00, 4.89060054e+00,
    7.01212696e+00, 9.96831370e+00],
   [0.00000000e+00, 0.00000000e+00, 1.16816358e-02, 3.01093077e-02,
    4.60588972e-02, 6.96791893e-02, 1.00833308e-01, 9.36535107e-02,
    1.00233022e+01, 0.00000000e+00]])}, 

    0.9: {'Values': array([[1.91880564e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 6.15492574e-02, 2.57773423e-02, 1.08560903e-01,
    9.97435631e-02, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 7.73018198e-03, 1.06339873e-02,
    3.37171043e-02, 1.11594952e-01, 8.72814930e-02, 1.70702914e-01,
    1.46707401e-01, 0.00000000e+00],
   [8.57600696e-03, 2.23868444e-02, 2.68812499e-02, 4.14462718e-02,
    7.51947114e-02, 1.11724014e-01, 1.34717828e-01, 3.44263445e-01,
    1.57487988e-01, 6.56962965e-01],
   [1.86559773e-02, 3.53262211e-02, 2.91389282e-02, 6.79783416e-02,
    4.37152182e-02, 1.42509529e-01, 2.16206560e-01, 5.21213373e-01,
    8.12692807e-01, 8.30143032e-01],
   [1.94756167e-02, 4.26376962e-02, 6.50804817e-02, 1.65607917e-01,
    2.47001857e-01, 2.24201700e-01, 4.00689313e-01, 7.56190673e-01,
    1.30713197e+00, 1.46762411e+00],
   [4.58833999e-02, 1.20487479e-01, 1.17048443e-01, 1.61746951e-01,
    3.79308309e-01, 5.61567814e-01, 4.94488981e-01, 1.02377679e+00,
    1.58515303e+00, 1.42444805e+00],
   [5.15342335e-02, 1.06015196e-01, 3.18382843e-01, 4.68485615e-01,
    7.42686277e-01, 1.08009741e+00, 1.56798619e+00, 1.99232089e+00,
    2.21858906e+00, 1.97780512e+00],
   [0.00000000e+00, 1.04717976e-01, 2.62268350e-01, 4.09069078e-01,
    5.91827374e-01, 7.73029446e-01, 2.31887844e+00, 3.39119281e+00,
    4.16879099e+00, 6.07783567e+00],
   [0.00000000e+00, 0.00000000e+00, 3.07940959e-02, 3.29072794e-01,
    8.97802869e-01, 1.15384933e+00, 1.00781327e+00, 4.89600784e+00,
    7.01726461e+00, 9.97724897e+00],
   [0.00000000e+00, 0.00000000e+00, 1.28556438e-02, 3.35121044e-02,
    5.04925723e-02, 7.49452634e-02, 1.10349612e-01, 9.98971162e-02,
    1.00284907e+01, 0.00000000e+00]])}, 

    0.95: {'Values': array([[2.06427172e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 7.91277325e-02, 1.87972518e-02, 8.95361983e-02,
    1.00869627e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 6.44636407e-03, 1.02912332e-02,
    2.47052474e-02, 1.37231425e-01, 8.10988050e-02, 1.92824209e-01,
    1.68042388e-01, 0.00000000e+00],
   [1.00507589e-02, 2.46374246e-02, 2.36995080e-02, 4.07777127e-02,
    5.95692694e-02, 9.81834233e-02, 1.32800598e-01, 4.06180685e-01,
    1.73638733e-01, 7.69085298e-01],
   [2.35873428e-02, 3.94571556e-02, 2.85801382e-02, 6.73121560e-02,
    3.66242758e-02, 1.36644100e-01, 2.17202522e-01, 6.06222379e-01,
    9.36530675e-01, 9.33320810e-01],
   [1.64888272e-02, 4.46940808e-02, 7.25928053e-02, 1.80112892e-01,
    2.63399802e-01, 2.23276447e-01, 4.02893263e-01, 8.48010424e-01,
    1.36956879e+00, 1.51451217e+00],
   [5.87605298e-02, 1.32522415e-01, 1.27796084e-01, 1.71421878e-01,
    3.99961321e-01, 5.81761023e-01, 4.78070409e-01, 1.06652477e+00,
    1.59426440e+00, 1.38271841e+00],
   [6.17179318e-02, 9.88291985e-02, 3.32308072e-01, 4.82315285e-01,
    7.76990585e-01, 1.10344388e+00, 1.58739667e+00, 2.06525765e+00,
    2.24544949e+00, 1.65127813e+00],
   [0.00000000e+00, 1.26717974e-01, 2.47801766e-01, 3.81947200e-01,
    5.52024699e-01, 7.78837008e-01, 2.33995389e+00, 3.40203123e+00,
    4.22621053e+00, 6.08635471e+00],
   [0.00000000e+00, 0.00000000e+00, 2.71154315e-02, 3.57092445e-01,
    8.69478836e-01, 1.07885210e+00, 9.75257161e-01, 4.90092420e+00,
    7.02212144e+00, 9.98632371e+00],
   [0.00000000e+00, 0.00000000e+00, 1.38955868e-02, 3.75664940e-02,
    5.60608203e-02, 8.12052990e-02, 1.23013948e-01, 1.11387951e-01,
    1.00345917e+01, 0.00000000e+00]])}, 

    1.0: {'Values': array([[2.20945402e-01, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
    0.00000000e+00, 1.02971252e-01, 2.14930106e-03, 5.39178349e-02,
    1.11954117e-01, 0.00000000e+00],
   [0.00000000e+00, 0.00000000e+00, 3.02571248e-03, 8.77752244e-03,
    7.25326452e-03, 1.70497906e-01, 7.21137973e-02, 2.24249844e-01,
    2.06233504e-01, 0.00000000e+00],
   [1.22836965e-02, 2.84890595e-02, 1.49804309e-02, 3.83196395e-02,
    3.45297982e-02, 7.25112277e-02, 1.33338763e-01, 4.87057755e-01,
    2.00140304e-01, 8.92396370e-01],
   [3.21081937e-02, 4.65092237e-02, 2.69956882e-02, 6.36546451e-02,
    3.32441458e-02, 1.39262969e-01, 2.22740905e-01, 7.14410123e-01,
    1.10597296e+00, 1.04635805e+00],
   [1.24473753e-02, 5.00149187e-02, 8.45096152e-02, 1.96581234e-01,
    2.81186039e-01, 2.22162635e-01, 4.09321760e-01, 9.64819982e-01,
    1.44229717e+00, 1.55942585e+00],
   [7.88161288e-02, 1.44104293e-01, 1.40764434e-01, 1.81842903e-01,
    4.21165900e-01, 6.01647437e-01, 4.57911994e-01, 1.12376729e+00,
    1.60883936e+00, 1.33059449e+00],
   [7.54712003e-02, 8.58085800e-02, 3.44293928e-01, 4.92607956e-01,
    8.10134573e-01, 1.12298569e+00, 1.60177914e+00, 2.14933307e+00,
    2.28181240e+00, 1.28300973e+00],
   [0.00000000e+00, 1.58558172e-01, 2.23735803e-01, 3.43813678e-01,
    4.96532678e-01, 7.84097544e-01, 2.35915195e+00, 3.41164779e+00,
    4.28674532e+00, 6.09076338e+00],
   [0.00000000e+00, 0.00000000e+00, 2.21673263e-02, 3.87222749e-01,
    8.34567060e-01, 9.92090584e-01, 9.46290694e-01, 4.90501487e+00,
    7.02631206e+00, 9.99540071e+00],
   [0.00000000e+00, 0.00000000e+00, 1.41357508e-02, 4.14922056e-02,
    6.20141471e-02, 8.67754656e-02, 1.38454282e-01, 1.29799933e-01,
    1.00415920e+01, 0.00000000e+00]])}

Subjective questions

2.a Value Iteration vs Policy Iteration

  1. Compare value iteration and policy iteration for states Brown in, Brown Out, Grey out and Grey In
  2. Which one converges faster and why
In [92]:
import matplotlib.pyplot as plt
res, pol_info = policy_iteration(env, 0.7)
res, val_info = value_iteration(env, 0.7)
BI=(7,9)
BO=(1,7)
GI=(0,0)
GO1=(2,3)
GO2=(2,4)
GO3=(2,5)
GO4=(2,6)
states=[GI,GO1,GO2,GO3,GO4,BO,BI]
s_info=['GREY_OUT','GREY_IN1','GREY_IN2','GREY_IN3','GREY_IN4','BROWN_OUT','BROWN_IN']
pol_iter=np.arange(1,len(pol_info)+1)
val_iter=np.arange(1,len(val_info)+1)

for s in states:
  y=[]
  for i in range(len(pol_info)):
    y.append(pol_info[i][s[0]][s[1]])
  plt.plot(pol_iter,y)
plt.title('Policy Iteration')
plt.xlabel('Iterations')
plt.ylabel('PI')
plt.legend(s_info)
plt.show()
for s in states:
  y=[]
  for i in range(len(val_info)):
    y.append(val_info[i][s[0]][s[1]])
  plt.plot(val_iter,y)
plt.title('Value Iteration')
plt.xlabel('Iterations')
plt.ylabel('VI')
plt.legend(s_info)
plt.show()
pol_info
Out[92]:
[array([[7.44138334e-07, 8.65933167e-07, 6.98070460e-06, 5.45046184e-05,
         3.86069440e-04, 2.38876052e-03, 1.22010889e-02, 4.68659018e-02,
         1.14213593e-01, 1.85440435e-01],
        [4.27750303e-07, 8.77320153e-07, 7.53141549e-06, 6.20024037e-05,
         4.66907041e-04, 3.09348238e-03, 1.70003874e-02, 7.01499115e-02,
         1.79737591e-01, 2.94016294e-01],
        [2.48036284e-07, 8.38684418e-07, 7.61957487e-06, 6.65692873e-05,
         5.38119963e-04, 3.86623311e-03, 2.32214488e-02, 1.04907349e-01,
         2.88843337e-01, 4.75792204e-01],
        [1.46461446e-07, 7.72902611e-07, 7.36250903e-06, 6.82277829e-05,
         5.94265907e-04, 4.66608896e-03, 3.09849586e-02, 1.55480493e-01,
         4.65253679e-01, 7.71662464e-01],
        [8.86814666e-08, 6.86118515e-07, 6.76368390e-06, 6.61546694e-05,
         6.21822368e-04, 5.37851135e-03, 4.00495825e-02, 2.27548108e-01,
         7.50361901e-01, 1.25365794e+00],
        [6.23209012e-08, 5.90416894e-07, 5.89573606e-06, 6.00681479e-05,
         6.07156796e-04, 5.82636450e-03, 4.95244824e-02, 3.27511573e-01,
         1.21175916e+00, 2.04036685e+00],
        [5.40779585e-08, 5.01193614e-07, 4.91091044e-06, 5.06665823e-05,
         5.41858061e-04, 5.77838116e-03, 5.73209531e-02, 4.60772783e-01,
         1.95956846e+00, 3.32706492e+00],
        [4.90253163e-08, 4.32590731e-07, 4.01552044e-06, 3.99089117e-05,
         4.31257383e-04, 5.01111121e-03, 5.93525447e-02, 6.27441796e-01,
         3.17351040e+00, 5.43608554e+00],
        [4.64529660e-08, 3.92557190e-07, 3.40086785e-06, 3.07735882e-05,
         3.04033367e-04, 3.48490229e-03, 4.85055356e-02, 8.12628803e-01,
         5.14746554e+00, 8.90087776e+00],
        [4.56392023e-08, 3.78220990e-07, 3.14250284e-06, 2.60102054e-05,
         2.14009697e-04, 2.10699753e-03, 2.83228198e-02, 4.91049381e-02,
         8.32020786e+00, 0.00000000e+00]]),
 array([[0.06524183, 0.03813979, 0.02346655, 0.01789035, 0.02648401,
         0.04037618, 0.06155737, 0.09375744, 0.14403562, 0.21678964],
        [0.0401642 , 0.02584372, 0.01793351, 0.0256283 , 0.03946379,
         0.06097632, 0.09423261, 0.14563426, 0.22514993, 0.33926986],
        [0.02526485, 0.01834579, 0.02637757, 0.04060259, 0.06277733,
         0.09708573, 0.15014654, 0.23220874, 0.35912739, 0.54121487],
        [0.01738336, 0.02677009, 0.04184477, 0.06476533, 0.10017984,
         0.15494894, 0.23965288, 0.37065339, 0.57325634, 0.86391941],
        [0.02767463, 0.04303447, 0.0666863 , 0.10324122, 0.15978381,
         0.24723697, 0.38248511, 0.59163791, 0.91507837, 1.3790691 ],
        [0.04498826, 0.06781557, 0.10524963, 0.16345682, 0.25367434,
         0.39338126, 0.60956481, 0.94387637, 1.46062231, 2.20139662],
        [0.06891984, 0.10517561, 0.16344621, 0.2539654 , 0.39429125,
         0.6140133 , 0.95972517, 1.49725196, 2.32978158, 3.51400273],
        [0.10147923, 0.15661338, 0.24615085, 0.38681042, 0.60721453,
         0.95200963, 1.49017951, 2.32730518, 3.69572851, 5.60842285],
        [0.12482713, 0.19558128, 0.31295977, 0.50225232, 0.80811234,
         1.30390277, 2.11038765, 3.42857458, 5.74783623, 8.94749299],
        [0.1015869 , 0.15407178, 0.23752486, 0.36543852, 0.56046751,
         0.85633679, 1.2864557 , 0.10194398, 8.67794769, 0.        ]]),
 array([[0.06843495, 0.04289557, 0.02718919, 0.02106739, 0.03115042,
         0.04748334, 0.07244215, 0.11189612, 0.16714108, 0.22256074],
        [0.04289465, 0.02788702, 0.02039018, 0.02952312, 0.04568535,
         0.07116195, 0.11025047, 0.17077695, 0.25668223, 0.34640927],
        [0.0271705 , 0.02032294, 0.02936809, 0.0453892 , 0.07051533,
         0.11007108, 0.17105061, 0.26507978, 0.40133535, 0.54978377],
        [0.02062788, 0.02930433, 0.04527044, 0.07026518, 0.10915424,
         0.17049223, 0.26544645, 0.41147824, 0.62737727, 0.87362949],
        [0.03049595, 0.04519993, 0.070098  , 0.10882237, 0.16897872,
         0.26406096, 0.41174767, 0.63839924, 0.97978481, 1.38915371],
        [0.04644138, 0.06994924, 0.10857019, 0.1685473 , 0.26157791,
         0.40893587, 0.63838734, 0.98995018, 1.52838124, 2.2104181 ],
        [0.07070724, 0.1079108 , 0.16771429, 0.26058899, 0.40451212,
         0.63322243, 0.98935236, 1.5365814 , 2.38102685, 3.51985145],
        [0.10318848, 0.1593139 , 0.25051523, 0.39389349, 0.61875812,
         0.97107709, 1.52109098, 2.37670456, 3.70311163, 5.60950895],
        [0.12552443, 0.19659526, 0.31444255, 0.5043853 , 0.81110793,
         1.30797099, 2.11557997, 3.43452286, 5.74876361, 8.94760774],
        [0.10195342, 0.15460707, 0.23832108, 0.3666258 , 0.56224459,
         0.85901727, 1.29061636, 0.11954386, 8.67886805, 0.        ]]),
 array([[0.0698721 , 0.04379986, 0.02778864, 0.02125711, 0.03137179,
         0.04778359, 0.07365136, 0.1123015 , 0.16721816, 0.22257445],
        [0.04379925, 0.0285147 , 0.02082691, 0.03000235, 0.04623386,
         0.07154854, 0.11078858, 0.17112381, 0.25676354, 0.34642384],
        [0.02777632, 0.02083436, 0.03000047, 0.04624379, 0.07160584,
         0.11090875, 0.17178907, 0.26560563, 0.40144324, 0.54980055],
        [0.02103453, 0.03006525, 0.04630023, 0.07170036, 0.11106884,
         0.17205101, 0.26650962, 0.41228323, 0.62751628, 0.87364777],
        [0.0309927 , 0.04634676, 0.07170747, 0.11108364, 0.172131  ,
         0.26671708, 0.41321962, 0.63959981, 0.97995104, 1.38917163],
        [0.04714647, 0.07162527, 0.11098415, 0.17204782, 0.26665367,
         0.41319787, 0.64017315, 0.99168954, 1.52855537, 2.21043277],
        [0.07170977, 0.10952558, 0.17032739, 0.26485833, 0.41154569,
         0.63897454, 0.99132223, 1.53684692, 2.38105706, 3.51985473],
        [0.10347481, 0.15971291, 0.25106315, 0.39461357, 0.6196342 ,
         0.97171001, 1.52130968, 2.37673763, 3.70311619, 5.60950949],
        [0.12557783, 0.19666127, 0.31452143, 0.50447335, 0.81119644,
         1.30803293, 2.11560939, 3.43454115, 5.74876547, 8.94760787],
        [0.10196553, 0.15462224, 0.23834038, 0.36665082, 0.56227823,
         0.85905782, 1.29065061, 0.11978667, 8.67888015, 0.        ]]),
 array([[0.06989308, 0.04381416, 0.02781307, 0.02150096, 0.03177341,
         0.04842988, 0.07380914, 0.11235004, 0.16722415, 0.2225751 ],
        [0.04381294, 0.02853064, 0.02091038, 0.03013996, 0.04648507,
         0.07188084, 0.11118546, 0.17117649, 0.25676878, 0.34642434],
        [0.02778816, 0.02087771, 0.03005953, 0.04634002, 0.07177316,
         0.1111707 , 0.17214001, 0.26564695, 0.40144694, 0.54980087],
        [0.02103945, 0.0300837 , 0.04633148, 0.07174878, 0.11116521,
         0.17220422, 0.26672602, 0.41230594, 0.62751815, 0.87364793],
        [0.0309945 , 0.04636707, 0.07173938, 0.11113199, 0.17219964,
         0.266771  , 0.41324315, 0.63960305, 0.97995139, 1.38917167],
        [0.04714724, 0.07163101, 0.11099245, 0.17205922, 0.26666869,
         0.41321121, 0.64017595, 0.99168994, 1.52855546, 2.21043278],
        [0.07171043, 0.10952663, 0.17032872, 0.26485989, 0.41154738,
         0.63897583, 0.99132254, 1.53684702, 2.38105715, 3.51985474],
        [0.10347495, 0.15971309, 0.25106337, 0.39461382, 0.61963446,
         0.97171027, 1.52130989, 2.37673783, 3.70311633, 5.6095095 ],
        [0.12557792, 0.19666142, 0.31452165, 0.5044737 , 0.81119701,
         1.30803385, 2.11561091, 3.4345435 , 5.7487657 , 8.94760788],
        [0.10196562, 0.15462236, 0.23834058, 0.36665112, 0.5622787 ,
         0.85905853, 1.29065378, 0.11982354, 8.67888199, 0.        ]]),
 array([[0.06990123, 0.04381939, 0.02781757, 0.02150566, 0.03177758,
         0.04843078, 0.0738093 , 0.11235013, 0.16722416, 0.2225751 ],
        [0.04381812, 0.02853524, 0.02093494, 0.03018145, 0.04649546,
         0.07188254, 0.11118625, 0.1711766 , 0.2567688 , 0.34642434],
        [0.02779155, 0.02088371, 0.03007567, 0.04635918, 0.0717817 ,
         0.11117895, 0.17214118, 0.26564707, 0.40144695, 0.54980087],
        [0.02104052, 0.03009213, 0.04634983, 0.07177349, 0.11117723,
         0.17221672, 0.26672727, 0.41230604, 0.62751816, 0.87364793],
        [0.03099534, 0.04637978, 0.07176096, 0.11116745, 0.17221352,
         0.26677289, 0.41324336, 0.63960307, 0.97995139, 1.38917167],
        [0.04714752, 0.07163348, 0.11099575, 0.17206307, 0.26667019,
         0.41321143, 0.64017598, 0.99168994, 1.52855546, 2.21043278],
        [0.07171064, 0.10952695, 0.17032907, 0.26486022, 0.41154751,
         0.63897585, 0.99132254, 1.53684702, 2.38105715, 3.51985474],
        [0.10347498, 0.15971313, 0.2510634 , 0.39461385, 0.61963447,
         0.97171027, 1.52130989, 2.37673783, 3.70311633, 5.6095095 ],
        [0.12557793, 0.19666142, 0.31452166, 0.5044737 , 0.81119701,
         1.30803385, 2.11561091, 3.4345435 , 5.7487657 , 8.94760788],
        [0.10196562, 0.15462236, 0.23834058, 0.36665112, 0.5622787 ,
         0.85905854, 1.29065379, 0.11982362, 8.67888199, 0.        ]])]

As we can see from the above visualizations we can infer that Policy Iteration converges faster than Value Iteration.

It takes nearly 5 or 10 iterations for VI to converge but PI does it in 2 iterations

It is because converging discrete policies is much faster than converging values that are continous

2.b How changing $\lambda$ affecting TD Lambda

As lambda increases the values in the Expected Reward grid increase

2.c Policy iteration error curve

Plot error curve of $J_i$ vs iteration $i$ for policy iteration

In [93]:
import matplotlib.pyplot as plt
res, pol_info = policy_iteration(env, 0.7)
pol_iter=np.arange(1,len(pol_info)+1)
J_u=pol_info[-1]
y=[]
for J in pol_info:
  err=np.sqrt(np.sum((J-J_u)*(J-J_u))/100)
  y.append(err)
plt.plot(pol_iter,y)
plt.xlabel('Iterations')
plt.ylabel('error Ji')
plt.title('Policy Iteration')
Out[93]:
Text(0.5, 1.0, 'Policy Iteration')

2.d TD Lamdba error curve

Plot error curve of $J_i$ vs iteration $i$ for TD Lambda for $\lambda = [0, 0.25, 0.5, 0.75, 1]$

In [94]:
lamda=[0,0.25,0.5,0.75,1]
for l in lamda:
  res, td_info = td_lambda(env, lamda=l, seeds=np.arange(1000))
  J_u=td_info[-1]
  iter=np.arange(1,len(td_info)+1)
  y=[]
  for J in td_info:
    err=np.sqrt(np.sum((J-J_u)*(J-J_u))/100)
    y.append(err)
  plt.plot(iter,y)
  plt.title('TD Lambda at {}'.format(l))
  plt.xlabel('Iterations')
  plt.ylabel('TD Error')
  plt.show()

Submit to AIcrowd 🚀

In [ ]:
!DATASET_PATH=$AICROWD_DATASET_PATH aicrowd notebook submit --no-verify -c iit-m-rl-assignment-2-gridworld -a assets
WARNING: No assets directory at assets... Creating one...
No jupyter lab module found. Using jupyter notebook.
Using notebook: /content/2ndCopy%20of%20IITM_Assignment_2_Gridworld_Release.ipynb for submission...
Mounting Google Drive 💾
Your Google Drive will be mounted to access the colab notebook
Go to this URL in a browser: https://accounts.google.com/o/oauth2/auth?client_id=947318989803-6bn6qk8qdgf4n4g3pfee6491hc0brc4i.apps.googleusercontent.com&redirect_uri=urn%3aietf%3awg%3aoauth%3a2.0%3aoob&scope=email%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdocs.test%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive.photos.readonly%20https%3a%2f%2fwww.googleapis.com%2fauth%2fpeopleapi.readonly%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive.activity.readonly%20https%3a%2f%2fwww.googleapis.com%2fauth%2fexperimentsandconfigs%20https%3a%2f%2fwww.googleapis.com%2fauth%2fphotos.native&response_type=code

Enter your authorization code:
774

Comments

You must login before you can post a comment.

Execute