"""
Class: Stat232C
Project 3: Goal Inference
Name:Mingjia Yao
Date: May, 2020

"""

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
import copy
import math

class ValueIteration(object):
    def __init__(self, transitionTable, rewardTable, valueTable, convergenceTolerance, gamma):
        self.transitionTable = transitionTable
        self.rewardTable  = rewardTable
        self.valueTable = valueTable
        self.convergenceTolerance = convergenceTolerance
        self.gamma = gamma

    def __call__(self):
        ValueTable=self.valueTable
        tempValueTable=copy.copy(ValueTable)
        delta=1
        while delta >= self.convergenceTolerance:
            delta=0
            for s in ValueTable:
                v=ValueTable[s]
                lib_s=self.transitionTable[s]
                max_a =0
                for a in lib_s:
                    sum_sr=0
                    lib_a=lib_s[a]
                    for ns in lib_a:
                        sum_sr=sum_sr+lib_a[ns]*(self.rewardTable[s][a][ns]+self.gamma*tempValueTable[ns])
                    max_a=max(max_a,sum_sr)
                ValueTable[s]=max_a
                delta=max(delta,abs(v-ValueTable[s]))
            tempValueTable=copy.copy(ValueTable)
        policyTable={}
        for s in ValueTable:
            lib_s=self.transitionTable[s]
            pi_s=(0,0)
            vs=0
            prob_ns=0
            for a in lib_s:
                sum_sr=0
                lib_a=lib_s[a]
                for ns in lib_a:
                    sum_sr=sum_sr+lib_a[ns]*(self.rewardTable[s][a][ns]+self.gamma*ValueTable[ns])
                if sum_sr>vs:
                    pi_s=a
                    vs=sum_sr
                    pi_ns=(0,0)
                    v_ns=0
                    for ns in lib_a:
                        if ValueTable[ns]>v_ns:
                            pi_ns=ns
                            v_ns=ValueTable[ns]
                            prob_ns=lib_a[ns]
            policyTable[s]={pi_s:prob_ns}
            
        return ([ValueTable, policyTable])


def visualizeValueTable(gridWidth, gridHeight, goalState, trapStates, valueTable):
    gridAdjust = .5
    gridScale = 1.5
    
    xs = np.linspace(-gridAdjust, gridWidth-gridAdjust, gridWidth+1)
    ys = np.linspace(-gridAdjust, gridHeight-gridAdjust, gridHeight+1)
    
    plt.rcParams["figure.figsize"] = [gridWidth*gridScale,gridHeight*gridScale]
    ax = plt.gca(frameon=False, xticks = range(gridWidth), yticks = range(gridHeight))

    #goal and trap coloring 
    ax.add_patch(Rectangle((goalState[0]-gridAdjust, goalState[1]-gridAdjust), 1, 1, fill=True, color='green', alpha=.1))
    
    for (trapx, trapy) in trapStates:
        ax.add_patch(Rectangle((trapx-gridAdjust, trapy-gridAdjust), 1, 1, fill=True, color='black', alpha=.1))
    
    # grid lines
    for x in xs:
        plt.plot([x, x], [ys[0], ys[-1]], color = "black")
    for y in ys:
        plt.plot([xs[0], xs[-1]], [y, y], color = "black")

    #labeled values
    for (statex, statey), val in valueTable.items():
        plt.text(statex-.2, statey, str(round(val, 3)))    

    plt.show()


def visualizePolicy(gridWidth, gridHeight, goalState, trapStates, policy):
    #grid height/width
    gridAdjust = .5
    gridScale = 1.5
    arrowScale = .5
    
    xs = np.linspace(-gridAdjust, gridWidth-gridAdjust, gridWidth+1)
    ys = np.linspace(-gridAdjust, gridHeight-gridAdjust, gridHeight+1)
    
    plt.rcParams["figure.figsize"] = [gridWidth*gridScale,gridHeight*gridScale]
    ax = plt.gca(frameon=False, xticks = range(gridWidth), yticks = range(gridHeight))

    #goal and trap coloring 
    ax.add_patch(Rectangle((goalState[0]-gridAdjust, goalState[1]-gridAdjust), 1, 1, fill=True, color='green', alpha=.1))
    
    for (trapx, trapy) in trapStates:
        ax.add_patch(Rectangle((trapx-gridAdjust, trapy-gridAdjust), 1, 1, fill=True, color='black', alpha=.1))

    # grid lines
    for x in xs:
        plt.plot([x, x], [ys[0], ys[-1]], color = "black")
    for y in ys:
        plt.plot([xs[0], xs[-1]], [y, y], color = "black")

    #labeled values
    for (statex, statey), actionDict in policy.items():
        for (optimalActionX, optimalActionY), actionProb in actionDict.items():
            plt.arrow(statex, statey, optimalActionX*actionProb*arrowScale, optimalActionY*actionProb*arrowScale, head_width=0.05*actionProb, head_length=0.1*actionProb)    

    plt.show()


def viewDictionaryStructure(d, levels, indent=0):
    for key, value in d.items():
        print('\t' * indent + str(levels[indent]) + ": "+ str(key))
        if isinstance(value, dict):
            viewDictionaryStructure(value, levels, indent+1)
        else:
            print('\t' * (indent+1) + str(levels[indent+1])+ ": " + str(value))

def p_traj(traj,beta,gamma,transitTable,rewardTable,valueTable):
    p=1
    ret=[]
    for i in range(len(traj)-1):
        p=p*p_stn_st(traj[i],traj[i+1],beta,gamma,transitTable,rewardTable,valueTable)
        ret=ret+[p]
    return ret

def p_stn_st(st,stn,beta,gamma,transitTable,rewardTable,valueTable):
    lib_s=transitTable[st]
    p=0
    for at in lib_s:
        if stn in lib_s[at]:
            p=p+lib_s[at][stn]*pias(st,at,beta,gamma,transitTable,rewardTable,valueTable)
    return p

def pias(st,at,beta,gamma,transitTable,rewardTable,valueTable):
    return math.log(beta*q(st,at,gamma,transitTable,rewardTable,valueTable))

def q(st,at,gamma,transitTable,rewardTable,valueTable):
    lib_sa=transitTable[st][at]
    q=0
    for ns in lib_sa:
        q=q+lib_sa[ns]*(rewardTable[st][at][ns]+gamma*valueTable[ns])
    return q

def main():
    gamma = .95
    beta = .4
    convergenceTolerance = 10e-7
    transition = {(0, 0): {(1, 0): {(1, 0): 1},(0, 1): {(0, 1): 1},(-1, 0): {(0, 0): 1},(0, -1): {(0, 0): 1},(-1, 1): {(0, 0): 1},(1, -1): {(0, 0): 1},(1, 1): {(1, 1): 1},(-1, -1): {(0, 0): 1}},(0, 1): {(1, 0): {(1, 1): 1},(0, 1): {(0, 2): 1},(-1, 0): {(0, 1): 1},(0, -1): {(0, 0): 1},(-1, 1): {(0, 1): 1},(1, -1): {(1, 0): 1},(1, 1): {(1, 2): 1},(-1, -1): {(0, 1): 1}},(0, 2): {(1, 0): {(1, 2): 1},(0, 1): {(0, 3): 1},(-1, 0): {(0, 2): 1},(0, -1): {(0, 1): 1},(-1, 1): {(0, 2): 1},(1, -1): {(1, 1): 1},(1, 1): {(1, 3): 1},(-1, -1): {(0, 2): 1}},(0, 3): {(1, 0): {(1, 3): 1},(0, 1): {(0, 4): 1},(-1, 0): {(0, 3): 1},(0, -1): {(0, 2): 1},(-1, 1): {(0, 3): 1},(1, -1): {(1, 2): 1},(1, 1): {(1, 4): 1},(-1, -1): {(0, 3): 1}},(0, 4): {(1, 0): {(1, 4): 1},(0, 1): {(0, 5): 1},(-1, 0): {(0, 4): 1},(0, -1): {(0, 3): 1},(-1, 1): {(0, 4): 1},(1, -1): {(1, 3): 1},(1, 1): {(1, 5): 1},(-1, -1): {(0, 4): 1}},(0, 5): {(1, 0): {(1, 5): 1},(0, 1): {(0, 5): 1},(-1, 0): {(0, 5): 1},(0, -1): {(0, 4): 1},(-1, 1): {(0, 5): 1},(1, -1): {(1, 4): 1},(1, 1): {(0, 5): 1},(-1, -1): {(0, 5): 1}},(1, 0): {(1, 0): {(2, 0): 1},(0, 1): {(1, 1): 1},(-1, 0): {(0, 0): 1},(0, -1): {(1, 0): 1},(-1, 1): {(0, 1): 1},(1, -1): {(1, 0): 1},(1, 1): {(2, 1): 1},(-1, -1): {(1, 0): 1}},(1, 1): {(1, 0): {(2, 1): 1},(0, 1): {(1, 2): 1},(-1, 0): {(0, 1): 1},(0, -1): {(1, 0): 1},(-1, 1): {(0, 2): 1},(1, -1): {(2, 0): 1},(1, 1): {(2, 2): 1},(-1, -1): {(0, 0): 1}},(1, 2): {(1, 0): {(2, 2): 1},(0, 1): {(1, 3): 1},(-1, 0): {(0, 2): 1},(0, -1): {(1, 1): 1},(-1, 1): {(0, 3): 1},(1, -1): {(2, 1): 1},(1, 1): {(2, 3): 1},(-1, -1): {(0, 1): 1}},(1, 3): {(1, 0): {(2, 3): 1},(0, 1): {(1, 4): 1},(-1, 0): {(0, 3): 1},(0, -1): {(1, 2): 1},(-1, 1): {(0, 4): 1},(1, -1): {(2, 2): 1},(1, 1): {(2, 4): 1},(-1, -1): {(0, 2): 1}},(1, 4): {(1, 0): {(2, 4): 1},(0, 1): {(1, 5): 1},(-1, 0): {(0, 4): 1},(0, -1): {(1, 3): 1},(-1, 1): {(0, 5): 1},(1, -1): {(2, 3): 1},(1, 1): {(2, 5): 1},(-1, -1): {(0, 3): 1}},(1, 5): {(1, 0): {(2, 5): 1},(0, 1): {(1, 5): 1},(-1, 0): {(0, 5): 1},(0, -1): {(1, 4): 1},(-1, 1): {(1, 5): 1},(1, -1): {(2, 4): 1},(1, 1): {(1, 5): 1},(-1, -1): {(0, 4): 1}},(2, 0): {(1, 0): {(3, 0): 1},(0, 1): {(2, 1): 1},(-1, 0): {(1, 0): 1},(0, -1): {(2, 0): 1},(-1, 1): {(1, 1): 1},(1, -1): {(2, 0): 1},(1, 1): {(3, 1): 1},(-1, -1): {(2, 0): 1}},(2, 1): {(1, 0): {(3, 1): 1},(0, 1): {(2, 2): 1},(-1, 0): {(1, 1): 1},(0, -1): {(2, 0): 1},(-1, 1): {(1, 2): 1},(1, -1): {(3, 0): 1},(1, 1): {(3, 2): 1},(-1, -1): {(1, 0): 1}},(2, 2): {(1, 0): {(3, 2): 1},(0, 1): {(2, 3): 1},(-1, 0): {(1, 2): 1},(0, -1): {(2, 1): 1},(-1, 1): {(1, 3): 1},(1, -1): {(3, 1): 1},(1, 1): {(3, 3): 1},(-1, -1): {(1, 1): 1}},(2, 3): {(1, 0): {(3, 3): 1},(0, 1): {(2, 4): 1},(-1, 0): {(1, 3): 1},(0, -1): {(2, 2): 1},(-1, 1): {(1, 4): 1},(1, -1): {(3, 2): 1},(1, 1): {(3, 4): 1},(-1, -1): {(1, 2): 1}},(2, 4): {(1, 0): {(3, 4): 1},(0, 1): {(2, 5): 1},(-1, 0): {(1, 4): 1},(0, -1): {(2, 3): 1},(-1, 1): {(1, 5): 1},(1, -1): {(3, 3): 1},(1, 1): {(3, 5): 1},(-1, -1): {(1, 3): 1}},(2, 5): {(1, 0): {(3, 5): 1},(0, 1): {(2, 5): 1},(-1, 0): {(1, 5): 1},(0, -1): {(2, 4): 1},(-1, 1): {(2, 5): 1},(1, -1): {(3, 4): 1},(1, 1): {(2, 5): 1},(-1, -1): {(1, 4): 1}},(3, 0): {(1, 0): {(4, 0): 1},(0, 1): {(3, 1): 1},(-1, 0): {(2, 0): 1},(0, -1): {(3, 0): 1},(-1, 1): {(2, 1): 1},(1, -1): {(3, 0): 1},(1, 1): {(4, 1): 1},(-1, -1): {(3, 0): 1}},(3, 1): {(1, 0): {(4, 1): 1},(0, 1): {(3, 2): 1},(-1, 0): {(2, 1): 1},(0, -1): {(3, 0): 1},(-1, 1): {(2, 2): 1},(1, -1): {(4, 0): 1},(1, 1): {(4, 2): 1},(-1, -1): {(2, 0): 1}},(3, 2): {(1, 0): {(4, 2): 1},(0, 1): {(3, 3): 1},(-1, 0): {(2, 2): 1},(0, -1): {(3, 1): 1},(-1, 1): {(2, 3): 1},(1, -1): {(4, 1): 1},(1, 1): {(4, 3): 1},(-1, -1): {(2, 1): 1}},(3, 3): {(1, 0): {(4, 3): 1},(0, 1): {(3, 4): 1},(-1, 0): {(2, 3): 1},(0, -1): {(3, 2): 1},(-1, 1): {(2, 4): 1},(1, -1): {(4, 2): 1},(1, 1): {(4, 4): 1},(-1, -1): {(2, 2): 1}},(3, 4): {(1, 0): {(4, 4): 1},(0, 1): {(3, 5): 1},(-1, 0): {(2, 4): 1},(0, -1): {(3, 3): 1},(-1, 1): {(2, 5): 1},(1, -1): {(4, 3): 1},(1, 1): {(4, 5): 1},(-1, -1): {(2, 3): 1}},(3, 5): {(1, 0): {(4, 5): 1},(0, 1): {(3, 5): 1},(-1, 0): {(2, 5): 1},(0, -1): {(3, 4): 1},(-1, 1): {(3, 5): 1},(1, -1): {(4, 4): 1},(1, 1): {(3, 5): 1},(-1, -1): {(2, 4): 1}},(4, 0): {(1, 0): {(5, 0): 1},(0, 1): {(4, 1): 1},(-1, 0): {(3, 0): 1},(0, -1): {(4, 0): 1},(-1, 1): {(3, 1): 1},(1, -1): {(4, 0): 1},(1, 1): {(5, 1): 1},(-1, -1): {(4, 0): 1}},(4, 1): {(1, 0): {(5, 1): 1},(0, 1): {(4, 2): 1},(-1, 0): {(3, 1): 1},(0, -1): {(4, 0): 1},(-1, 1): {(3, 2): 1},(1, -1): {(5, 0): 1},(1, 1): {(5, 2): 1},(-1, -1): {(3, 0): 1}},(4, 2): {(1, 0): {(5, 2): 1},(0, 1): {(4, 3): 1},(-1, 0): {(3, 2): 1},(0, -1): {(4, 1): 1},(-1, 1): {(3, 3): 1},(1, -1): {(5, 1): 1},(1, 1): {(5, 3): 1},(-1, -1): {(3, 1): 1}},(4, 3): {(1, 0): {(5, 3): 1},(0, 1): {(4, 4): 1},(-1, 0): {(3, 3): 1},(0, -1): {(4, 2): 1},(-1, 1): {(3, 4): 1},(1, -1): {(5, 2): 1},(1, 1): {(5, 4): 1},(-1, -1): {(3, 2): 1}},(4, 4): {(1, 0): {(5, 4): 1},(0, 1): {(4, 5): 1},(-1, 0): {(3, 4): 1},(0, -1): {(4, 3): 1},(-1, 1): {(3, 5): 1},(1, -1): {(5, 3): 1},(1, 1): {(5, 5): 1},(-1, -1): {(3, 3): 1}},(4, 5): {(1, 0): {(5, 5): 1},(0, 1): {(4, 5): 1},(-1, 0): {(3, 5): 1},(0, -1): {(4, 4): 1},(-1, 1): {(4, 5): 1},(1, -1): {(5, 4): 1},(1, 1): {(4, 5): 1},(-1, -1): {(3, 4): 1}},(5, 0): {(1, 0): {(6, 0): 1},(0, 1): {(5, 1): 1},(-1, 0): {(4, 0): 1},(0, -1): {(5, 0): 1},(-1, 1): {(4, 1): 1},(1, -1): {(5, 0): 1},(1, 1): {(6, 1): 1},(-1, -1): {(5, 0): 1}},(5, 1): {(1, 0): {(6, 1): 1},(0, 1): {(5, 2): 1},(-1, 0): {(4, 1): 1},(0, -1): {(5, 0): 1},(-1, 1): {(4, 2): 1},(1, -1): {(6, 0): 1},(1, 1): {(6, 2): 1},(-1, -1): {(4, 0): 1}},(5, 2): {(1, 0): {(6, 2): 1},(0, 1): {(5, 3): 1},(-1, 0): {(4, 2): 1},(0, -1): {(5, 1): 1},(-1, 1): {(4, 3): 1},(1, -1): {(6, 1): 1},(1, 1): {(6, 3): 1},(-1, -1): {(4, 1): 1}},(5, 3): {(1, 0): {(6, 3): 1},(0, 1): {(5, 4): 1},(-1, 0): {(4, 3): 1},(0, -1): {(5, 2): 1},(-1, 1): {(4, 4): 1},(1, -1): {(6, 2): 1},(1, 1): {(6, 4): 1},(-1, -1): {(4, 2): 1}},(5, 4): {(1, 0): {(6, 4): 1},(0, 1): {(5, 5): 1},(-1, 0): {(4, 4): 1},(0, -1): {(5, 3): 1},(-1, 1): {(4, 5): 1},(1, -1): {(6, 3): 1},(1, 1): {(6, 5): 1},(-1, -1): {(4, 3): 1}},(5, 5): {(1, 0): {(6, 5): 1},(0, 1): {(5, 5): 1},(-1, 0): {(4, 5): 1},(0, -1): {(5, 4): 1},(-1, 1): {(5, 5): 1},(1, -1): {(6, 4): 1},(1, 1): {(5, 5): 1},(-1, -1): {(4, 4): 1}},(6, 0): {(1, 0): {(6, 0): 1},(0, 1): {(6, 1): 1},(-1, 0): {(5, 0): 1},(0, -1): {(6, 0): 1},(-1, 1): {(5, 1): 1},(1, -1): {(6, 0): 1},(1, 1): {(6, 0): 1},(-1, -1): {(6, 0): 1}},(6, 1): {(1, 0): {(6, 1): 1},(0, 1): {(6, 2): 1},(-1, 0): {(5, 1): 1},(0, -1): {(6, 0): 1},(-1, 1): {(5, 2): 1},(1, -1): {(6, 1): 1},(1, 1): {(6, 1): 1},(-1, -1): {(5, 0): 1}},(6, 2): {(1, 0): {(6, 2): 1},(0, 1): {(6, 3): 1},(-1, 0): {(5, 2): 1},(0, -1): {(6, 1): 1},(-1, 1): {(5, 3): 1},(1, -1): {(6, 2): 1},(1, 1): {(6, 2): 1},(-1, -1): {(5, 1): 1}},(6, 3): {(1, 0): {(6, 3): 1},(0, 1): {(6, 4): 1},(-1, 0): {(5, 3): 1},(0, -1): {(6, 2): 1},(-1, 1): {(5, 4): 1},(1, -1): {(6, 3): 1},(1, 1): {(6, 3): 1},(-1, -1): {(5, 2): 1}},(6, 4): {(1, 0): {(6, 4): 1},(0, 1): {(6, 5): 1},(-1, 0): {(5, 4): 1},(0, -1): {(6, 3): 1},(-1, 1): {(5, 5): 1},(1, -1): {(6, 4): 1},(1, 1): {(6, 4): 1},(-1, -1): {(5, 3): 1}},(6, 5): {(1, 0): {(6, 5): 1},(0, 1): {(6, 5): 1},(-1, 0): {(5, 5): 1},(0, -1): {(6, 4): 1},(-1, 1): {(6, 5): 1},(1, -1): {(6, 5): 1},(1, 1): {(6, 5): 1},(-1, -1): {(5, 4): 1}}}
    valueTable = {(0, 0): 0,(0, 1): 0,(0, 2): 0,(0, 3): 0,(0, 4): 0,(0, 5): 0,(1, 0): 0,(1, 1): 0,(1, 2): 0,(1, 3): 0,(1, 4): 0,(1, 5): 0,(2, 0): 0,(2, 1): 0,(2, 2): 0,(2, 3): 0,(2, 4): 0,(2, 5): 0,(3, 0): 0,(3, 1): 0,(3, 2): 0,(3, 3): 0,(3, 4): 0,(3, 5): 0,(4, 0): 0,(4, 1): 0,(4, 2): 0,(4, 3): 0,(4, 4): 0,(4, 5): 0,(5, 0): 0,(5, 1): 0,(5, 2): 0,(5, 3): 0,(5, 4): 0,(5, 5): 0,(6, 0): 0,(6, 1): 0,(6, 2): 0,(6, 3): 0,(6, 4): 0,(6, 5): 0}
    
    #Observed Trajectories
    trajectoryToGoalA = [(0,0), (1,1), (1,2), (2,3), (3,4), (4,4), (5,4), (6,4)]
    trajectoryToGoalB = [(0,0), (1,1), (2,2), (2,3), (3,4), (4,3), (5,2), (6,1)]
    trajectoryToGoalC = [(0,0), (0,1), (1,2), (1,3), (1,4), (1,5)]

    #Environment 1: Solid  Barrier
    rewardA = {(0, 0): {(1, 0): {(1, 0): -1.0},(0, 1): {(0, 1): -1.0},(-1, 0): {(0, 0): -1},(0, -1): {(0, 0): -1},(-1, 1): {(0, 0): -1},(1, -1): {(0, 0): -1},(1, 1): {(1, 1): -1.4142135623730951},(-1, -1): {(0, 0): -1}},(0, 1): {(1, 0): {(1, 1): -1.0},(0, 1): {(0, 2): -1.0},(-1, 0): {(0, 1): -1},(0, -1): {(0, 0): -1.0},(-1, 1): {(0, 1): -1},(1, -1): {(1, 0): -1.4142135623730951},(1, 1): {(1, 2): -1.4142135623730951},(-1, -1): {(0, 1): -1}},(0, 2): {(1, 0): {(1, 2): -1.0},(0, 1): {(0, 3): -1.0},(-1, 0): {(0, 2): -1},(0, -1): {(0, 1): -1.0},(-1, 1): {(0, 2): -1},(1, -1): {(1, 1): -1.4142135623730951},(1, 1): {(1, 3): -1.4142135623730951},(-1, -1): {(0, 2): -1}},(0, 3): {(1, 0): {(1, 3): -1.0},(0, 1): {(0, 4): -1.0},(-1, 0): {(0, 3): -1},(0, -1): {(0, 2): -1.0},(-1, 1): {(0, 3): -1},(1, -1): {(1, 2): -1.4142135623730951},(1, 1): {(1, 4): -1.4142135623730951},(-1, -1): {(0, 3): -1}},(0, 4): {(1, 0): {(1, 4): -1.0},(0, 1): {(0, 5): -1.0},(-1, 0): {(0, 4): -1},(0, -1): {(0, 3): -1.0},(-1, 1): {(0, 4): -1},(1, -1): {(1, 3): -1.4142135623730951},(1, 1): {(1, 5): -1.4142135623730951},(-1, -1): {(0, 4): -1}},(0, 5): {(1, 0): {(1, 5): -1.0},(0, 1): {(0, 5): -1},(-1, 0): {(0, 5): -1},(0, -1): {(0, 4): -1.0},(-1, 1): {(0, 5): -1},(1, -1): {(1, 4): -1.4142135623730951},(1, 1): {(0, 5): -1},(-1, -1): {(0, 5): -1}},(1, 0): {(1, 0): {(2, 0): -1.0},(0, 1): {(1, 1): -1.0},(-1, 0): {(0, 0): -1.0},(0, -1): {(1, 0): -1},(-1, 1): {(0, 1): -1.4142135623730951},(1, -1): {(1, 0): -1},(1, 1): {(2, 1): -1.4142135623730951},(-1, -1): {(1, 0): -1}},(1, 1): {(1, 0): {(2, 1): -1.0},(0, 1): {(1, 2): -1.0},(-1, 0): {(0, 1): -1.0},(0, -1): {(1, 0): -1.0},(-1, 1): {(0, 2): -1.4142135623730951},(1, -1): {(2, 0): -1.4142135623730951},(1, 1): {(2, 2): -1.4142135623730951},(-1, -1): {(0, 0): -1.4142135623730951}},(1, 2): {(1, 0): {(2, 2): -1.0},(0, 1): {(1, 3): -1.0},(-1, 0): {(0, 2): -1.0},(0, -1): {(1, 1): -1.0},(-1, 1): {(0, 3): -1.4142135623730951},(1, -1): {(2, 1): -1.4142135623730951},(1, 1): {(2, 3): -1.4142135623730951},(-1, -1): {(0, 1): -1.4142135623730951}},(1, 3): {(1, 0): {(2, 3): -1.0},(0, 1): {(1, 4): -1.0},(-1, 0): {(0, 3): -1.0},(0, -1): {(1, 2): -1.0},(-1, 1): {(0, 4): -1.4142135623730951},(1, -1): {(2, 2): -1.4142135623730951},(1, 1): {(2, 4): -1.4142135623730951},(-1, -1): {(0, 2): -1.4142135623730951}},(1, 4): {(1, 0): {(2, 4): -1.0},(0, 1): {(1, 5): -1.0},(-1, 0): {(0, 4): -1.0},(0, -1): {(1, 3): -1.0},(-1, 1): {(0, 5): -1.4142135623730951},(1, -1): {(2, 3): -1.4142135623730951},(1, 1): {(2, 5): -1.4142135623730951},(-1, -1): {(0, 3): -1.4142135623730951}},(1, 5): {(1, 0): {(2, 5): -1.0},(0, 1): {(1, 5): -1},(-1, 0): {(0, 5): -1.0},(0, -1): {(1, 4): -1.0},(-1, 1): {(1, 5): -1},(1, -1): {(2, 4): -1.4142135623730951},(1, 1): {(1, 5): -1},(-1, -1): {(0, 4): -1.4142135623730951}},(2, 0): {(1, 0): {(3, 0): -1.0},(0, 1): {(2, 1): -1.0},(-1, 0): {(1, 0): -1.0},(0, -1): {(2, 0): -1},(-1, 1): {(1, 1): -1.4142135623730951},(1, -1): {(2, 0): -1},(1, 1): {(3, 1): -1.4142135623730951},(-1, -1): {(2, 0): -1}},(2, 1): {(1, 0): {(3, 1): -1.0},(0, 1): {(2, 2): -1.0},(-1, 0): {(1, 1): -1.0},(0, -1): {(2, 0): -1.0},(-1, 1): {(1, 2): -1.4142135623730951},(1, -1): {(3, 0): -1.4142135623730951},(1, 1): {(3, 2): -1.4142135623730951},(-1, -1): {(1, 0): -1.4142135623730951}},(2, 2): {(1, 0): {(3, 2): -1.0},(0, 1): {(2, 3): -1.0},(-1, 0): {(1, 2): -1.0},(0, -1): {(2, 1): -1.0},(-1, 1): {(1, 3): -1.4142135623730951},(1, -1): {(3, 1): -1.4142135623730951},(1, 1): {(3, 3): -1.4142135623730951},(-1, -1): {(1, 1): -1.4142135623730951}},(2, 3): {(1, 0): {(3, 3): -1.0},(0, 1): {(2, 4): -1.0},(-1, 0): {(1, 3): -1.0},(0, -1): {(2, 2): -1.0},(-1, 1): {(1, 4): -1.4142135623730951},(1, -1): {(3, 2): -1.4142135623730951},(1, 1): {(3, 4): -1.4142135623730951},(-1, -1): {(1, 2): -1.4142135623730951}},(2, 4): {(1, 0): {(3, 4): -1.0},(0, 1): {(2, 5): -1.0},(-1, 0): {(1, 4): -1.0},(0, -1): {(2, 3): -1.0},(-1, 1): {(1, 5): -1.4142135623730951},(1, -1): {(3, 3): -1.4142135623730951},(1, 1): {(3, 5): -1.4142135623730951},(-1, -1): {(1, 3): -1.4142135623730951}},(2, 5): {(1, 0): {(3, 5): -1.0},(0, 1): {(2, 5): -1},(-1, 0): {(1, 5): -1.0},(0, -1): {(2, 4): -1.0},(-1, 1): {(2, 5): -1},(1, -1): {(3, 4): -1.4142135623730951},(1, 1): {(2, 5): -1},(-1, -1): {(1, 4): -1.4142135623730951}},(3, 0): {(1, 0): {(4, 0): -100},(0, 1): {(3, 1): -100},(-1, 0): {(2, 0): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 1): -100},(1, -1): {(3, 0): -100},(1, 1): {(4, 1): -100},(-1, -1): {(3, 0): -100}},(3, 1): {(1, 0): {(4, 1): -100},(0, 1): {(3, 2): -100},(-1, 0): {(2, 1): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 2): -100},(1, -1): {(4, 0): -100},(1, 1): {(4, 2): -100},(-1, -1): {(2, 0): -100}},(3, 2): {(1, 0): {(4, 2): -100},(0, 1): {(3, 3): -100},(-1, 0): {(2, 2): -100},(0, -1): {(3, 1): -100},(-1, 1): {(2, 3): -100},(1, -1): {(4, 1): -100},(1, 1): {(4, 3): -100},(-1, -1): {(2, 1): -100}},(3, 3): {(1, 0): {(4, 3): -100},(0, 1): {(3, 4): -100},(-1, 0): {(2, 3): -100},(0, -1): {(3, 2): -100},(-1, 1): {(2, 4): -100},(1, -1): {(4, 2): -100},(1, 1): {(4, 4): -100},(-1, -1): {(2, 2): -100}},(3, 4): {(1, 0): {(4, 4): -1.0},(0, 1): {(3, 5): -1.0},(-1, 0): {(2, 4): -1.0},(0, -1): {(3, 3): -1.0},(-1, 1): {(2, 5): -1.4142135623730951},(1, -1): {(4, 3): -1.4142135623730951},(1, 1): {(4, 5): -1.4142135623730951},(-1, -1): {(2, 3): -1.4142135623730951}},(3, 5): {(1, 0): {(4, 5): -1.0},(0, 1): {(3, 5): -1},(-1, 0): {(2, 5): -1.0},(0, -1): {(3, 4): -1.0},(-1, 1): {(3, 5): -1},(1, -1): {(4, 4): -1.4142135623730951},(1, 1): {(3, 5): -1},(-1, -1): {(2, 4): -1.4142135623730951}},(4, 0): {(1, 0): {(5, 0): -1.0},(0, 1): {(4, 1): -1.0},(-1, 0): {(3, 0): -1.0},(0, -1): {(4, 0): -1},(-1, 1): {(3, 1): -1.4142135623730951},(1, -1): {(4, 0): -1},(1, 1): {(5, 1): -1.4142135623730951},(-1, -1): {(4, 0): -1}},(4, 1): {(1, 0): {(5, 1): -1.0},(0, 1): {(4, 2): -1.0},(-1, 0): {(3, 1): -1.0},(0, -1): {(4, 0): -1.0},(-1, 1): {(3, 2): -1.4142135623730951},(1, -1): {(5, 0): -1.4142135623730951},(1, 1): {(5, 2): -1.4142135623730951},(-1, -1): {(3, 0): -1.4142135623730951}},(4, 2): {(1, 0): {(5, 2): -1.0},(0, 1): {(4, 3): -1.0},(-1, 0): {(3, 2): -1.0},(0, -1): {(4, 1): -1.0},(-1, 1): {(3, 3): -1.4142135623730951},(1, -1): {(5, 1): -1.4142135623730951},(1, 1): {(5, 3): -1.4142135623730951},(-1, -1): {(3, 1): -1.4142135623730951}},(4, 3): {(1, 0): {(5, 3): -1.0},(0, 1): {(4, 4): -1.0},(-1, 0): {(3, 3): -1.0},(0, -1): {(4, 2): -1.0},(-1, 1): {(3, 4): -1.4142135623730951},(1, -1): {(5, 2): -1.4142135623730951},(1, 1): {(5, 4): -1.4142135623730951},(-1, -1): {(3, 2): -1.4142135623730951}},(4, 4): {(1, 0): {(5, 4): -1.0},(0, 1): {(4, 5): -1.0},(-1, 0): {(3, 4): -1.0},(0, -1): {(4, 3): -1.0},(-1, 1): {(3, 5): -1.4142135623730951},(1, -1): {(5, 3): -1.4142135623730951},(1, 1): {(5, 5): -1.4142135623730951},(-1, -1): {(3, 3): -1.4142135623730951}},(4, 5): {(1, 0): {(5, 5): -1.0},(0, 1): {(4, 5): -1},(-1, 0): {(3, 5): -1.0},(0, -1): {(4, 4): -1.0},(-1, 1): {(4, 5): -1},(1, -1): {(5, 4): -1.4142135623730951},(1, 1): {(4, 5): -1},(-1, -1): {(3, 4): -1.4142135623730951}},(5, 0): {(1, 0): {(6, 0): -1.0},(0, 1): {(5, 1): -1.0},(-1, 0): {(4, 0): -1.0},(0, -1): {(5, 0): -1},(-1, 1): {(4, 1): -1.4142135623730951},(1, -1): {(5, 0): -1},(1, 1): {(6, 1): -1.4142135623730951},(-1, -1): {(5, 0): -1}},(5, 1): {(1, 0): {(6, 1): -1.0},(0, 1): {(5, 2): -1.0},(-1, 0): {(4, 1): -1.0},(0, -1): {(5, 0): -1.0},(-1, 1): {(4, 2): -1.4142135623730951},(1, -1): {(6, 0): -1.4142135623730951},(1, 1): {(6, 2): -1.4142135623730951},(-1, -1): {(4, 0): -1.4142135623730951}},(5, 2): {(1, 0): {(6, 2): -1.0},(0, 1): {(5, 3): -1.0},(-1, 0): {(4, 2): -1.0},(0, -1): {(5, 1): -1.0},(-1, 1): {(4, 3): -1.4142135623730951},(1, -1): {(6, 1): -1.4142135623730951},(1, 1): {(6, 3): -1.4142135623730951},(-1, -1): {(4, 1): -1.4142135623730951}},(5, 3): {(1, 0): {(6, 3): -1.0},(0, 1): {(5, 4): -1.0},(-1, 0): {(4, 3): -1.0},(0, -1): {(5, 2): -1.0},(-1, 1): {(4, 4): -1.4142135623730951},(1, -1): {(6, 2): -1.4142135623730951},(1, 1): {(6, 4): -1.4142135623730951},(-1, -1): {(4, 2): -1.4142135623730951}},(5, 4): {(1, 0): {(6, 4): -1.0},(0, 1): {(5, 5): -1.0},(-1, 0): {(4, 4): -1.0},(0, -1): {(5, 3): -1.0},(-1, 1): {(4, 5): -1.4142135623730951},(1, -1): {(6, 3): -1.4142135623730951},(1, 1): {(6, 5): -1.4142135623730951},(-1, -1): {(4, 3): -1.4142135623730951}},(5, 5): {(1, 0): {(6, 5): -1.0},(0, 1): {(5, 5): -1},(-1, 0): {(4, 5): -1.0},(0, -1): {(5, 4): -1.0},(-1, 1): {(5, 5): -1},(1, -1): {(6, 4): -1.4142135623730951},(1, 1): {(5, 5): -1},(-1, -1): {(4, 4): -1.4142135623730951}},(6, 0): {(1, 0): {(6, 0): -1},(0, 1): {(6, 1): -1.0},(-1, 0): {(5, 0): -1.0},(0, -1): {(6, 0): -1},(-1, 1): {(5, 1): -1.4142135623730951},(1, -1): {(6, 0): -1},(1, 1): {(6, 0): -1},(-1, -1): {(6, 0): -1}},(6, 1): {(1, 0): {(6, 1): -1},(0, 1): {(6, 2): -1.0},(-1, 0): {(5, 1): -1.0},(0, -1): {(6, 0): -1.0},(-1, 1): {(5, 2): -1.4142135623730951},(1, -1): {(6, 1): -1},(1, 1): {(6, 1): -1},(-1, -1): {(5, 0): -1.4142135623730951}},(6, 2): {(1, 0): {(6, 2): -1},(0, 1): {(6, 3): -1.0},(-1, 0): {(5, 2): -1.0},(0, -1): {(6, 1): -1.0},(-1, 1): {(5, 3): -1.4142135623730951},(1, -1): {(6, 2): -1},(1, 1): {(6, 2): -1},(-1, -1): {(5, 1): -1.4142135623730951}},(6, 3): {(1, 0): {(6, 3): -1},(0, 1): {(6, 4): -1.0},(-1, 0): {(5, 3): -1.0},(0, -1): {(6, 2): -1.0},(-1, 1): {(5, 4): -1.4142135623730951},(1, -1): {(6, 3): -1},(1, 1): {(6, 3): -1},(-1, -1): {(5, 2): -1.4142135623730951}},(6, 4): {(1, 0): {(6, 4): -1},(0, 1): {(6, 5): 10},(-1, 0): {(5, 4): 10},(0, -1): {(6, 3): 10},(-1, 1): {(5, 5): 10},(1, -1): {(6, 4): -1},(1, 1): {(6, 4): -1},(-1, -1): {(5, 3): 10}},(6, 5): {(1, 0): {(6, 5): -1},(0, 1): {(6, 5): -1},(-1, 0): {(5, 5): -1.0},(0, -1): {(6, 4): -1.0},(-1, 1): {(6, 5): -1},(1, -1): {(6, 5): -1},(1, 1): {(6, 5): -1},(-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardB = {(0, 0): {(1, 0): {(1, 0): -1.0},(0, 1): {(0, 1): -1.0},(-1, 0): {(0, 0): -1},(0, -1): {(0, 0): -1},(-1, 1): {(0, 0): -1},(1, -1): {(0, 0): -1},(1, 1): {(1, 1): -1.4142135623730951},(-1, -1): {(0, 0): -1}},(0, 1): {(1, 0): {(1, 1): -1.0},(0, 1): {(0, 2): -1.0},(-1, 0): {(0, 1): -1},(0, -1): {(0, 0): -1.0},(-1, 1): {(0, 1): -1},(1, -1): {(1, 0): -1.4142135623730951},(1, 1): {(1, 2): -1.4142135623730951},(-1, -1): {(0, 1): -1}},(0, 2): {(1, 0): {(1, 2): -1.0},(0, 1): {(0, 3): -1.0},(-1, 0): {(0, 2): -1},(0, -1): {(0, 1): -1.0},(-1, 1): {(0, 2): -1},(1, -1): {(1, 1): -1.4142135623730951},(1, 1): {(1, 3): -1.4142135623730951},(-1, -1): {(0, 2): -1}},(0, 3): {(1, 0): {(1, 3): -1.0},(0, 1): {(0, 4): -1.0},(-1, 0): {(0, 3): -1},(0, -1): {(0, 2): -1.0},(-1, 1): {(0, 3): -1},(1, -1): {(1, 2): -1.4142135623730951},(1, 1): {(1, 4): -1.4142135623730951},(-1, -1): {(0, 3): -1}},(0, 4): {(1, 0): {(1, 4): -1.0},(0, 1): {(0, 5): -1.0},(-1, 0): {(0, 4): -1},(0, -1): {(0, 3): -1.0},(-1, 1): {(0, 4): -1},(1, -1): {(1, 3): -1.4142135623730951},(1, 1): {(1, 5): -1.4142135623730951},(-1, -1): {(0, 4): -1}},(0, 5): {(1, 0): {(1, 5): -1.0},(0, 1): {(0, 5): -1},(-1, 0): {(0, 5): -1},(0, -1): {(0, 4): -1.0},(-1, 1): {(0, 5): -1},(1, -1): {(1, 4): -1.4142135623730951},(1, 1): {(0, 5): -1},(-1, -1): {(0, 5): -1}},(1, 0): {(1, 0): {(2, 0): -1.0},(0, 1): {(1, 1): -1.0},(-1, 0): {(0, 0): -1.0},(0, -1): {(1, 0): -1},(-1, 1): {(0, 1): -1.4142135623730951},(1, -1): {(1, 0): -1},(1, 1): {(2, 1): -1.4142135623730951},(-1, -1): {(1, 0): -1}},(1, 1): {(1, 0): {(2, 1): -1.0},(0, 1): {(1, 2): -1.0},(-1, 0): {(0, 1): -1.0},(0, -1): {(1, 0): -1.0},(-1, 1): {(0, 2): -1.4142135623730951},(1, -1): {(2, 0): -1.4142135623730951},(1, 1): {(2, 2): -1.4142135623730951},(-1, -1): {(0, 0): -1.4142135623730951}},(1, 2): {(1, 0): {(2, 2): -1.0},(0, 1): {(1, 3): -1.0},(-1, 0): {(0, 2): -1.0},(0, -1): {(1, 1): -1.0},(-1, 1): {(0, 3): -1.4142135623730951},(1, -1): {(2, 1): -1.4142135623730951},(1, 1): {(2, 3): -1.4142135623730951},(-1, -1): {(0, 1): -1.4142135623730951}},(1, 3): {(1, 0): {(2, 3): -1.0},(0, 1): {(1, 4): -1.0},(-1, 0): {(0, 3): -1.0},(0, -1): {(1, 2): -1.0},(-1, 1): {(0, 4): -1.4142135623730951},(1, -1): {(2, 2): -1.4142135623730951},(1, 1): {(2, 4): -1.4142135623730951},(-1, -1): {(0, 2): -1.4142135623730951}},(1, 4): {(1, 0): {(2, 4): -1.0},(0, 1): {(1, 5): -1.0},(-1, 0): {(0, 4): -1.0},(0, -1): {(1, 3): -1.0},(-1, 1): {(0, 5): -1.4142135623730951},(1, -1): {(2, 3): -1.4142135623730951},(1, 1): {(2, 5): -1.4142135623730951},(-1, -1): {(0, 3): -1.4142135623730951}},(1, 5): {(1, 0): {(2, 5): -1.0},(0, 1): {(1, 5): -1},(-1, 0): {(0, 5): -1.0},(0, -1): {(1, 4): -1.0},(-1, 1): {(1, 5): -1},(1, -1): {(2, 4): -1.4142135623730951},(1, 1): {(1, 5): -1},(-1, -1): {(0, 4): -1.4142135623730951}},(2, 0): {(1, 0): {(3, 0): -1.0},(0, 1): {(2, 1): -1.0},(-1, 0): {(1, 0): -1.0},(0, -1): {(2, 0): -1},(-1, 1): {(1, 1): -1.4142135623730951},(1, -1): {(2, 0): -1},(1, 1): {(3, 1): -1.4142135623730951},(-1, -1): {(2, 0): -1}},(2, 1): {(1, 0): {(3, 1): -1.0},(0, 1): {(2, 2): -1.0},(-1, 0): {(1, 1): -1.0},(0, -1): {(2, 0): -1.0},(-1, 1): {(1, 2): -1.4142135623730951},(1, -1): {(3, 0): -1.4142135623730951},(1, 1): {(3, 2): -1.4142135623730951},(-1, -1): {(1, 0): -1.4142135623730951}},(2, 2): {(1, 0): {(3, 2): -1.0},(0, 1): {(2, 3): -1.0},(-1, 0): {(1, 2): -1.0},(0, -1): {(2, 1): -1.0},(-1, 1): {(1, 3): -1.4142135623730951},(1, -1): {(3, 1): -1.4142135623730951},(1, 1): {(3, 3): -1.4142135623730951},(-1, -1): {(1, 1): -1.4142135623730951}},(2, 3): {(1, 0): {(3, 3): -1.0},(0, 1): {(2, 4): -1.0},(-1, 0): {(1, 3): -1.0},(0, -1): {(2, 2): -1.0},(-1, 1): {(1, 4): -1.4142135623730951},(1, -1): {(3, 2): -1.4142135623730951},(1, 1): {(3, 4): -1.4142135623730951},(-1, -1): {(1, 2): -1.4142135623730951}},(2, 4): {(1, 0): {(3, 4): -1.0},(0, 1): {(2, 5): -1.0},(-1, 0): {(1, 4): -1.0},(0, -1): {(2, 3): -1.0},(-1, 1): {(1, 5): -1.4142135623730951},(1, -1): {(3, 3): -1.4142135623730951},(1, 1): {(3, 5): -1.4142135623730951},(-1, -1): {(1, 3): -1.4142135623730951}},(2, 5): {(1, 0): {(3, 5): -1.0},(0, 1): {(2, 5): -1},(-1, 0): {(1, 5): -1.0},(0, -1): {(2, 4): -1.0},(-1, 1): {(2, 5): -1},(1, -1): {(3, 4): -1.4142135623730951},(1, 1): {(2, 5): -1},(-1, -1): {(1, 4): -1.4142135623730951}},(3, 0): {(1, 0): {(4, 0): -100},(0, 1): {(3, 1): -100},(-1, 0): {(2, 0): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 1): -100},(1, -1): {(3, 0): -100},(1, 1): {(4, 1): -100},(-1, -1): {(3, 0): -100}},(3, 1): {(1, 0): {(4, 1): -100},(0, 1): {(3, 2): -100},(-1, 0): {(2, 1): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 2): -100},(1, -1): {(4, 0): -100},(1, 1): {(4, 2): -100},(-1, -1): {(2, 0): -100}},(3, 2): {(1, 0): {(4, 2): -100},(0, 1): {(3, 3): -100},(-1, 0): {(2, 2): -100},(0, -1): {(3, 1): -100},(-1, 1): {(2, 3): -100},(1, -1): {(4, 1): -100},(1, 1): {(4, 3): -100},(-1, -1): {(2, 1): -100}},(3, 3): {(1, 0): {(4, 3): -100},(0, 1): {(3, 4): -100},(-1, 0): {(2, 3): -100},(0, -1): {(3, 2): -100},(-1, 1): {(2, 4): -100},(1, -1): {(4, 2): -100},(1, 1): {(4, 4): -100},(-1, -1): {(2, 2): -100}},(3, 4): {(1, 0): {(4, 4): -1.0},(0, 1): {(3, 5): -1.0},(-1, 0): {(2, 4): -1.0},(0, -1): {(3, 3): -1.0},(-1, 1): {(2, 5): -1.4142135623730951},(1, -1): {(4, 3): -1.4142135623730951},(1, 1): {(4, 5): -1.4142135623730951},(-1, -1): {(2, 3): -1.4142135623730951}},(3, 5): {(1, 0): {(4, 5): -1.0},(0, 1): {(3, 5): -1},(-1, 0): {(2, 5): -1.0},(0, -1): {(3, 4): -1.0},(-1, 1): {(3, 5): -1},(1, -1): {(4, 4): -1.4142135623730951},(1, 1): {(3, 5): -1},(-1, -1): {(2, 4): -1.4142135623730951}},(4, 0): {(1, 0): {(5, 0): -1.0},(0, 1): {(4, 1): -1.0},(-1, 0): {(3, 0): -1.0},(0, -1): {(4, 0): -1},(-1, 1): {(3, 1): -1.4142135623730951},(1, -1): {(4, 0): -1},(1, 1): {(5, 1): -1.4142135623730951},(-1, -1): {(4, 0): -1}},(4, 1): {(1, 0): {(5, 1): -1.0},(0, 1): {(4, 2): -1.0},(-1, 0): {(3, 1): -1.0},(0, -1): {(4, 0): -1.0},(-1, 1): {(3, 2): -1.4142135623730951},(1, -1): {(5, 0): -1.4142135623730951},(1, 1): {(5, 2): -1.4142135623730951},(-1, -1): {(3, 0): -1.4142135623730951}},(4, 2): {(1, 0): {(5, 2): -1.0},(0, 1): {(4, 3): -1.0},(-1, 0): {(3, 2): -1.0},(0, -1): {(4, 1): -1.0},(-1, 1): {(3, 3): -1.4142135623730951},(1, -1): {(5, 1): -1.4142135623730951},(1, 1): {(5, 3): -1.4142135623730951},(-1, -1): {(3, 1): -1.4142135623730951}},(4, 3): {(1, 0): {(5, 3): -1.0},(0, 1): {(4, 4): -1.0},(-1, 0): {(3, 3): -1.0},(0, -1): {(4, 2): -1.0},(-1, 1): {(3, 4): -1.4142135623730951},(1, -1): {(5, 2): -1.4142135623730951},(1, 1): {(5, 4): -1.4142135623730951},(-1, -1): {(3, 2): -1.4142135623730951}},(4, 4): {(1, 0): {(5, 4): -1.0},(0, 1): {(4, 5): -1.0},(-1, 0): {(3, 4): -1.0},(0, -1): {(4, 3): -1.0},(-1, 1): {(3, 5): -1.4142135623730951},(1, -1): {(5, 3): -1.4142135623730951},(1, 1): {(5, 5): -1.4142135623730951},(-1, -1): {(3, 3): -1.4142135623730951}},(4, 5): {(1, 0): {(5, 5): -1.0},(0, 1): {(4, 5): -1},(-1, 0): {(3, 5): -1.0},(0, -1): {(4, 4): -1.0},(-1, 1): {(4, 5): -1},(1, -1): {(5, 4): -1.4142135623730951},(1, 1): {(4, 5): -1},(-1, -1): {(3, 4): -1.4142135623730951}},(5, 0): {(1, 0): {(6, 0): -1.0},(0, 1): {(5, 1): -1.0},(-1, 0): {(4, 0): -1.0},(0, -1): {(5, 0): -1},(-1, 1): {(4, 1): -1.4142135623730951},(1, -1): {(5, 0): -1},(1, 1): {(6, 1): -1.4142135623730951},(-1, -1): {(5, 0): -1}},(5, 1): {(1, 0): {(6, 1): -1.0},(0, 1): {(5, 2): -1.0},(-1, 0): {(4, 1): -1.0},(0, -1): {(5, 0): -1.0},(-1, 1): {(4, 2): -1.4142135623730951},(1, -1): {(6, 0): -1.4142135623730951},(1, 1): {(6, 2): -1.4142135623730951},(-1, -1): {(4, 0): -1.4142135623730951}},(5, 2): {(1, 0): {(6, 2): -1.0},(0, 1): {(5, 3): -1.0},(-1, 0): {(4, 2): -1.0},(0, -1): {(5, 1): -1.0},(-1, 1): {(4, 3): -1.4142135623730951},(1, -1): {(6, 1): -1.4142135623730951},(1, 1): {(6, 3): -1.4142135623730951},(-1, -1): {(4, 1): -1.4142135623730951}},(5, 3): {(1, 0): {(6, 3): -1.0},(0, 1): {(5, 4): -1.0},(-1, 0): {(4, 3): -1.0},(0, -1): {(5, 2): -1.0},(-1, 1): {(4, 4): -1.4142135623730951},(1, -1): {(6, 2): -1.4142135623730951},(1, 1): {(6, 4): -1.4142135623730951},(-1, -1): {(4, 2): -1.4142135623730951}},(5, 4): {(1, 0): {(6, 4): -1.0},(0, 1): {(5, 5): -1.0},(-1, 0): {(4, 4): -1.0},(0, -1): {(5, 3): -1.0},(-1, 1): {(4, 5): -1.4142135623730951},(1, -1): {(6, 3): -1.4142135623730951},(1, 1): {(6, 5): -1.4142135623730951},(-1, -1): {(4, 3): -1.4142135623730951}},(5, 5): {(1, 0): {(6, 5): -1.0},(0, 1): {(5, 5): -1},(-1, 0): {(4, 5): -1.0},(0, -1): {(5, 4): -1.0},(-1, 1): {(5, 5): -1},(1, -1): {(6, 4): -1.4142135623730951},(1, 1): {(5, 5): -1},(-1, -1): {(4, 4): -1.4142135623730951}},(6, 0): {(1, 0): {(6, 0): -1},(0, 1): {(6, 1): -1.0},(-1, 0): {(5, 0): -1.0},(0, -1): {(6, 0): -1},(-1, 1): {(5, 1): -1.4142135623730951},(1, -1): {(6, 0): -1},(1, 1): {(6, 0): -1},(-1, -1): {(6, 0): -1}},(6, 1): {(1, 0): {(6, 1): -1},(0, 1): {(6, 2): 10},(-1, 0): {(5, 1): 10},(0, -1): {(6, 0): 10},(-1, 1): {(5, 2): 10},(1, -1): {(6, 1): -1},(1, 1): {(6, 1): -1},(-1, -1): {(5, 0): 10}},(6, 2): {(1, 0): {(6, 2): -1},(0, 1): {(6, 3): -1.0},(-1, 0): {(5, 2): -1.0},(0, -1): {(6, 1): -1.0},(-1, 1): {(5, 3): -1.4142135623730951},(1, -1): {(6, 2): -1},(1, 1): {(6, 2): -1},(-1, -1): {(5, 1): -1.4142135623730951}},(6, 3): {(1, 0): {(6, 3): -1},(0, 1): {(6, 4): -1.0},(-1, 0): {(5, 3): -1.0},(0, -1): {(6, 2): -1.0},(-1, 1): {(5, 4): -1.4142135623730951},(1, -1): {(6, 3): -1},(1, 1): {(6, 3): -1},(-1, -1): {(5, 2): -1.4142135623730951}},(6, 4): {(1, 0): {(6, 4): -1},(0, 1): {(6, 5): -1.0},(-1, 0): {(5, 4): -1.0},(0, -1): {(6, 3): -1.0},(-1, 1): {(5, 5): -1.4142135623730951},(1, -1): {(6, 4): -1},(1, 1): {(6, 4): -1},(-1, -1): {(5, 3): -1.4142135623730951}},(6, 5): {(1, 0): {(6, 5): -1},(0, 1): {(6, 5): -1},(-1, 0): {(5, 5): -1.0},(0, -1): {(6, 4): -1.0},(-1, 1): {(6, 5): -1},(1, -1): {(6, 5): -1},(1, 1): {(6, 5): -1},(-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardC = {(0, 0): {(1, 0): {(1, 0): -1.0},(0, 1): {(0, 1): -1.0},(-1, 0): {(0, 0): -1},(0, -1): {(0, 0): -1},(-1, 1): {(0, 0): -1},(1, -1): {(0, 0): -1},(1, 1): {(1, 1): -1.4142135623730951},(-1, -1): {(0, 0): -1}},(0, 1): {(1, 0): {(1, 1): -1.0},(0, 1): {(0, 2): -1.0},(-1, 0): {(0, 1): -1},(0, -1): {(0, 0): -1.0},(-1, 1): {(0, 1): -1},(1, -1): {(1, 0): -1.4142135623730951},(1, 1): {(1, 2): -1.4142135623730951},(-1, -1): {(0, 1): -1}},(0, 2): {(1, 0): {(1, 2): -1.0},(0, 1): {(0, 3): -1.0},(-1, 0): {(0, 2): -1},(0, -1): {(0, 1): -1.0},(-1, 1): {(0, 2): -1},(1, -1): {(1, 1): -1.4142135623730951},(1, 1): {(1, 3): -1.4142135623730951},(-1, -1): {(0, 2): -1}},(0, 3): {(1, 0): {(1, 3): -1.0},(0, 1): {(0, 4): -1.0},(-1, 0): {(0, 3): -1},(0, -1): {(0, 2): -1.0},(-1, 1): {(0, 3): -1},(1, -1): {(1, 2): -1.4142135623730951},(1, 1): {(1, 4): -1.4142135623730951},(-1, -1): {(0, 3): -1}},(0, 4): {(1, 0): {(1, 4): -1.0},(0, 1): {(0, 5): -1.0},(-1, 0): {(0, 4): -1},(0, -1): {(0, 3): -1.0},(-1, 1): {(0, 4): -1},(1, -1): {(1, 3): -1.4142135623730951},(1, 1): {(1, 5): -1.4142135623730951},(-1, -1): {(0, 4): -1}},(0, 5): {(1, 0): {(1, 5): -1.0},(0, 1): {(0, 5): -1},(-1, 0): {(0, 5): -1},(0, -1): {(0, 4): -1.0},(-1, 1): {(0, 5): -1},(1, -1): {(1, 4): -1.4142135623730951},(1, 1): {(0, 5): -1},(-1, -1): {(0, 5): -1}},(1, 0): {(1, 0): {(2, 0): -1.0},(0, 1): {(1, 1): -1.0},(-1, 0): {(0, 0): -1.0},(0, -1): {(1, 0): -1},(-1, 1): {(0, 1): -1.4142135623730951},(1, -1): {(1, 0): -1},(1, 1): {(2, 1): -1.4142135623730951},(-1, -1): {(1, 0): -1}},(1, 1): {(1, 0): {(2, 1): -1.0},(0, 1): {(1, 2): -1.0},(-1, 0): {(0, 1): -1.0},(0, -1): {(1, 0): -1.0},(-1, 1): {(0, 2): -1.4142135623730951},(1, -1): {(2, 0): -1.4142135623730951},(1, 1): {(2, 2): -1.4142135623730951},(-1, -1): {(0, 0): -1.4142135623730951}},(1, 2): {(1, 0): {(2, 2): -1.0},(0, 1): {(1, 3): -1.0},(-1, 0): {(0, 2): -1.0},(0, -1): {(1, 1): -1.0},(-1, 1): {(0, 3): -1.4142135623730951},(1, -1): {(2, 1): -1.4142135623730951},(1, 1): {(2, 3): -1.4142135623730951},(-1, -1): {(0, 1): -1.4142135623730951}},(1, 3): {(1, 0): {(2, 3): -1.0},(0, 1): {(1, 4): -1.0},(-1, 0): {(0, 3): -1.0},(0, -1): {(1, 2): -1.0},(-1, 1): {(0, 4): -1.4142135623730951},(1, -1): {(2, 2): -1.4142135623730951},(1, 1): {(2, 4): -1.4142135623730951},(-1, -1): {(0, 2): -1.4142135623730951}},(1, 4): {(1, 0): {(2, 4): -1.0},(0, 1): {(1, 5): -1.0},(-1, 0): {(0, 4): -1.0},(0, -1): {(1, 3): -1.0},(-1, 1): {(0, 5): -1.4142135623730951},(1, -1): {(2, 3): -1.4142135623730951},(1, 1): {(2, 5): -1.4142135623730951},(-1, -1): {(0, 3): -1.4142135623730951}},(1, 5): {(1, 0): {(2, 5): 10},(0, 1): {(1, 5): -1},(-1, 0): {(0, 5): 10},(0, -1): {(1, 4): 10},(-1, 1): {(1, 5): -1},(1, -1): {(2, 4): 10},(1, 1): {(1, 5): -1},(-1, -1): {(0, 4): 10}},(2, 0): {(1, 0): {(3, 0): -1.0},(0, 1): {(2, 1): -1.0},(-1, 0): {(1, 0): -1.0},(0, -1): {(2, 0): -1},(-1, 1): {(1, 1): -1.4142135623730951},(1, -1): {(2, 0): -1},(1, 1): {(3, 1): -1.4142135623730951},(-1, -1): {(2, 0): -1}},(2, 1): {(1, 0): {(3, 1): -1.0},(0, 1): {(2, 2): -1.0},(-1, 0): {(1, 1): -1.0},(0, -1): {(2, 0): -1.0},(-1, 1): {(1, 2): -1.4142135623730951},(1, -1): {(3, 0): -1.4142135623730951},(1, 1): {(3, 2): -1.4142135623730951},(-1, -1): {(1, 0): -1.4142135623730951}},(2, 2): {(1, 0): {(3, 2): -1.0},(0, 1): {(2, 3): -1.0},(-1, 0): {(1, 2): -1.0},(0, -1): {(2, 1): -1.0},(-1, 1): {(1, 3): -1.4142135623730951},(1, -1): {(3, 1): -1.4142135623730951},(1, 1): {(3, 3): -1.4142135623730951},(-1, -1): {(1, 1): -1.4142135623730951}},(2, 3): {(1, 0): {(3, 3): -1.0},(0, 1): {(2, 4): -1.0},(-1, 0): {(1, 3): -1.0},(0, -1): {(2, 2): -1.0},(-1, 1): {(1, 4): -1.4142135623730951},(1, -1): {(3, 2): -1.4142135623730951},(1, 1): {(3, 4): -1.4142135623730951},(-1, -1): {(1, 2): -1.4142135623730951}},(2, 4): {(1, 0): {(3, 4): -1.0},(0, 1): {(2, 5): -1.0},(-1, 0): {(1, 4): -1.0},(0, -1): {(2, 3): -1.0},(-1, 1): {(1, 5): -1.4142135623730951},(1, -1): {(3, 3): -1.4142135623730951},(1, 1): {(3, 5): -1.4142135623730951},(-1, -1): {(1, 3): -1.4142135623730951}},(2, 5): {(1, 0): {(3, 5): -1.0},(0, 1): {(2, 5): -1},(-1, 0): {(1, 5): -1.0},(0, -1): {(2, 4): -1.0},(-1, 1): {(2, 5): -1},(1, -1): {(3, 4): -1.4142135623730951},(1, 1): {(2, 5): -1},(-1, -1): {(1, 4): -1.4142135623730951}},(3, 0): {(1, 0): {(4, 0): -100},(0, 1): {(3, 1): -100},(-1, 0): {(2, 0): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 1): -100},(1, -1): {(3, 0): -100},(1, 1): {(4, 1): -100},(-1, -1): {(3, 0): -100}},(3, 1): {(1, 0): {(4, 1): -100},(0, 1): {(3, 2): -100},(-1, 0): {(2, 1): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 2): -100},(1, -1): {(4, 0): -100},(1, 1): {(4, 2): -100},(-1, -1): {(2, 0): -100}},(3, 2): {(1, 0): {(4, 2): -100},(0, 1): {(3, 3): -100},(-1, 0): {(2, 2): -100},(0, -1): {(3, 1): -100},(-1, 1): {(2, 3): -100},(1, -1): {(4, 1): -100},(1, 1): {(4, 3): -100},(-1, -1): {(2, 1): -100}},(3, 3): {(1, 0): {(4, 3): -100},(0, 1): {(3, 4): -100},(-1, 0): {(2, 3): -100},(0, -1): {(3, 2): -100},(-1, 1): {(2, 4): -100},(1, -1): {(4, 2): -100},(1, 1): {(4, 4): -100},(-1, -1): {(2, 2): -100}},(3, 4): {(1, 0): {(4, 4): -1.0},(0, 1): {(3, 5): -1.0},(-1, 0): {(2, 4): -1.0},(0, -1): {(3, 3): -1.0},(-1, 1): {(2, 5): -1.4142135623730951},(1, -1): {(4, 3): -1.4142135623730951},(1, 1): {(4, 5): -1.4142135623730951},(-1, -1): {(2, 3): -1.4142135623730951}},(3, 5): {(1, 0): {(4, 5): -1.0},(0, 1): {(3, 5): -1},(-1, 0): {(2, 5): -1.0},(0, -1): {(3, 4): -1.0},(-1, 1): {(3, 5): -1},(1, -1): {(4, 4): -1.4142135623730951},(1, 1): {(3, 5): -1},(-1, -1): {(2, 4): -1.4142135623730951}},(4, 0): {(1, 0): {(5, 0): -1.0},(0, 1): {(4, 1): -1.0},(-1, 0): {(3, 0): -1.0},(0, -1): {(4, 0): -1},(-1, 1): {(3, 1): -1.4142135623730951},(1, -1): {(4, 0): -1},(1, 1): {(5, 1): -1.4142135623730951},(-1, -1): {(4, 0): -1}},(4, 1): {(1, 0): {(5, 1): -1.0},(0, 1): {(4, 2): -1.0},(-1, 0): {(3, 1): -1.0},(0, -1): {(4, 0): -1.0},(-1, 1): {(3, 2): -1.4142135623730951},(1, -1): {(5, 0): -1.4142135623730951},(1, 1): {(5, 2): -1.4142135623730951},(-1, -1): {(3, 0): -1.4142135623730951}},(4, 2): {(1, 0): {(5, 2): -1.0},(0, 1): {(4, 3): -1.0},(-1, 0): {(3, 2): -1.0},(0, -1): {(4, 1): -1.0},(-1, 1): {(3, 3): -1.4142135623730951},(1, -1): {(5, 1): -1.4142135623730951},(1, 1): {(5, 3): -1.4142135623730951},(-1, -1): {(3, 1): -1.4142135623730951}},(4, 3): {(1, 0): {(5, 3): -1.0},(0, 1): {(4, 4): -1.0},(-1, 0): {(3, 3): -1.0},(0, -1): {(4, 2): -1.0},(-1, 1): {(3, 4): -1.4142135623730951},(1, -1): {(5, 2): -1.4142135623730951},(1, 1): {(5, 4): -1.4142135623730951},(-1, -1): {(3, 2): -1.4142135623730951}},(4, 4): {(1, 0): {(5, 4): -1.0},(0, 1): {(4, 5): -1.0},(-1, 0): {(3, 4): -1.0},(0, -1): {(4, 3): -1.0},(-1, 1): {(3, 5): -1.4142135623730951},(1, -1): {(5, 3): -1.4142135623730951},(1, 1): {(5, 5): -1.4142135623730951},(-1, -1): {(3, 3): -1.4142135623730951}},(4, 5): {(1, 0): {(5, 5): -1.0},(0, 1): {(4, 5): -1},(-1, 0): {(3, 5): -1.0},(0, -1): {(4, 4): -1.0},(-1, 1): {(4, 5): -1},(1, -1): {(5, 4): -1.4142135623730951},(1, 1): {(4, 5): -1},(-1, -1): {(3, 4): -1.4142135623730951}},(5, 0): {(1, 0): {(6, 0): -1.0},(0, 1): {(5, 1): -1.0},(-1, 0): {(4, 0): -1.0},(0, -1): {(5, 0): -1},(-1, 1): {(4, 1): -1.4142135623730951},(1, -1): {(5, 0): -1},(1, 1): {(6, 1): -1.4142135623730951},(-1, -1): {(5, 0): -1}},(5, 1): {(1, 0): {(6, 1): -1.0},(0, 1): {(5, 2): -1.0},(-1, 0): {(4, 1): -1.0},(0, -1): {(5, 0): -1.0},(-1, 1): {(4, 2): -1.4142135623730951},(1, -1): {(6, 0): -1.4142135623730951},(1, 1): {(6, 2): -1.4142135623730951},(-1, -1): {(4, 0): -1.4142135623730951}},(5, 2): {(1, 0): {(6, 2): -1.0},(0, 1): {(5, 3): -1.0},(-1, 0): {(4, 2): -1.0},(0, -1): {(5, 1): -1.0},(-1, 1): {(4, 3): -1.4142135623730951},(1, -1): {(6, 1): -1.4142135623730951},(1, 1): {(6, 3): -1.4142135623730951},(-1, -1): {(4, 1): -1.4142135623730951}},(5, 3): {(1, 0): {(6, 3): -1.0},(0, 1): {(5, 4): -1.0},(-1, 0): {(4, 3): -1.0},(0, -1): {(5, 2): -1.0},(-1, 1): {(4, 4): -1.4142135623730951},(1, -1): {(6, 2): -1.4142135623730951},(1, 1): {(6, 4): -1.4142135623730951},(-1, -1): {(4, 2): -1.4142135623730951}},(5, 4): {(1, 0): {(6, 4): -1.0},(0, 1): {(5, 5): -1.0},(-1, 0): {(4, 4): -1.0},(0, -1): {(5, 3): -1.0},(-1, 1): {(4, 5): -1.4142135623730951},(1, -1): {(6, 3): -1.4142135623730951},(1, 1): {(6, 5): -1.4142135623730951},(-1, -1): {(4, 3): -1.4142135623730951}},(5, 5): {(1, 0): {(6, 5): -1.0},(0, 1): {(5, 5): -1},(-1, 0): {(4, 5): -1.0},(0, -1): {(5, 4): -1.0},(-1, 1): {(5, 5): -1},(1, -1): {(6, 4): -1.4142135623730951},(1, 1): {(5, 5): -1},(-1, -1): {(4, 4): -1.4142135623730951}},(6, 0): {(1, 0): {(6, 0): -1},(0, 1): {(6, 1): -1.0},(-1, 0): {(5, 0): -1.0},(0, -1): {(6, 0): -1},(-1, 1): {(5, 1): -1.4142135623730951},(1, -1): {(6, 0): -1},(1, 1): {(6, 0): -1},(-1, -1): {(6, 0): -1}},(6, 1): {(1, 0): {(6, 1): -1},(0, 1): {(6, 2): -1.0},(-1, 0): {(5, 1): -1.0},(0, -1): {(6, 0): -1.0},(-1, 1): {(5, 2): -1.4142135623730951},(1, -1): {(6, 1): -1},(1, 1): {(6, 1): -1},(-1, -1): {(5, 0): -1.4142135623730951}},(6, 2): {(1, 0): {(6, 2): -1},(0, 1): {(6, 3): -1.0},(-1, 0): {(5, 2): -1.0},(0, -1): {(6, 1): -1.0},(-1, 1): {(5, 3): -1.4142135623730951},(1, -1): {(6, 2): -1},(1, 1): {(6, 2): -1},(-1, -1): {(5, 1): -1.4142135623730951}},(6, 3): {(1, 0): {(6, 3): -1},(0, 1): {(6, 4): -1.0},(-1, 0): {(5, 3): -1.0},(0, -1): {(6, 2): -1.0},(-1, 1): {(5, 4): -1.4142135623730951},(1, -1): {(6, 3): -1},(1, 1): {(6, 3): -1},(-1, -1): {(5, 2): -1.4142135623730951}},(6, 4): {(1, 0): {(6, 4): -1},(0, 1): {(6, 5): -1.0},(-1, 0): {(5, 4): -1.0},(0, -1): {(6, 3): -1.0},(-1, 1): {(5, 5): -1.4142135623730951},(1, -1): {(6, 4): -1},(1, 1): {(6, 4): -1},(-1, -1): {(5, 3): -1.4142135623730951}},(6, 5): {(1, 0): {(6, 5): -1},(0, 1): {(6, 5): -1},(-1, 0): {(5, 5): -1.0},(0, -1): {(6, 4): -1.0},(-1, 1): {(6, 5): -1},(1, -1): {(6, 5): -1},(1, 1): {(6, 5): -1},(-1, -1): {(5, 4): -1.4142135623730951}}}
    
    #Environment 2: Barrier with a Gap
    rewardAGap = {(0, 0): {(1, 0): {(1, 0): -1.0},(0, 1): {(0, 1): -1.0},(-1, 0): {(0, 0): -1},(0, -1): {(0, 0): -1},(-1, 1): {(0, 0): -1},(1, -1): {(0, 0): -1},(1, 1): {(1, 1): -1.4142135623730951},(-1, -1): {(0, 0): -1}},(0, 1): {(1, 0): {(1, 1): -1.0},(0, 1): {(0, 2): -1.0},(-1, 0): {(0, 1): -1},(0, -1): {(0, 0): -1.0},(-1, 1): {(0, 1): -1},(1, -1): {(1, 0): -1.4142135623730951},(1, 1): {(1, 2): -1.4142135623730951},(-1, -1): {(0, 1): -1}},(0, 2): {(1, 0): {(1, 2): -1.0},(0, 1): {(0, 3): -1.0},(-1, 0): {(0, 2): -1},(0, -1): {(0, 1): -1.0},(-1, 1): {(0, 2): -1},(1, -1): {(1, 1): -1.4142135623730951},(1, 1): {(1, 3): -1.4142135623730951},(-1, -1): {(0, 2): -1}},(0, 3): {(1, 0): {(1, 3): -1.0},(0, 1): {(0, 4): -1.0},(-1, 0): {(0, 3): -1},(0, -1): {(0, 2): -1.0},(-1, 1): {(0, 3): -1},(1, -1): {(1, 2): -1.4142135623730951},(1, 1): {(1, 4): -1.4142135623730951},(-1, -1): {(0, 3): -1}},(0, 4): {(1, 0): {(1, 4): -1.0},(0, 1): {(0, 5): -1.0},(-1, 0): {(0, 4): -1},(0, -1): {(0, 3): -1.0},(-1, 1): {(0, 4): -1},(1, -1): {(1, 3): -1.4142135623730951},(1, 1): {(1, 5): -1.4142135623730951},(-1, -1): {(0, 4): -1}},(0, 5): {(1, 0): {(1, 5): -1.0},(0, 1): {(0, 5): -1},(-1, 0): {(0, 5): -1},(0, -1): {(0, 4): -1.0},(-1, 1): {(0, 5): -1},(1, -1): {(1, 4): -1.4142135623730951},(1, 1): {(0, 5): -1},(-1, -1): {(0, 5): -1}},(1, 0): {(1, 0): {(2, 0): -1.0},(0, 1): {(1, 1): -1.0},(-1, 0): {(0, 0): -1.0},(0, -1): {(1, 0): -1},(-1, 1): {(0, 1): -1.4142135623730951},(1, -1): {(1, 0): -1},(1, 1): {(2, 1): -1.4142135623730951},(-1, -1): {(1, 0): -1}},(1, 1): {(1, 0): {(2, 1): -1.0},(0, 1): {(1, 2): -1.0},(-1, 0): {(0, 1): -1.0},(0, -1): {(1, 0): -1.0},(-1, 1): {(0, 2): -1.4142135623730951},(1, -1): {(2, 0): -1.4142135623730951},(1, 1): {(2, 2): -1.4142135623730951},(-1, -1): {(0, 0): -1.4142135623730951}},(1, 2): {(1, 0): {(2, 2): -1.0},(0, 1): {(1, 3): -1.0},(-1, 0): {(0, 2): -1.0},(0, -1): {(1, 1): -1.0},(-1, 1): {(0, 3): -1.4142135623730951},(1, -1): {(2, 1): -1.4142135623730951},(1, 1): {(2, 3): -1.4142135623730951},(-1, -1): {(0, 1): -1.4142135623730951}},(1, 3): {(1, 0): {(2, 3): -1.0},(0, 1): {(1, 4): -1.0},(-1, 0): {(0, 3): -1.0},(0, -1): {(1, 2): -1.0},(-1, 1): {(0, 4): -1.4142135623730951},(1, -1): {(2, 2): -1.4142135623730951},(1, 1): {(2, 4): -1.4142135623730951},(-1, -1): {(0, 2): -1.4142135623730951}},(1, 4): {(1, 0): {(2, 4): -1.0},(0, 1): {(1, 5): -1.0},(-1, 0): {(0, 4): -1.0},(0, -1): {(1, 3): -1.0},(-1, 1): {(0, 5): -1.4142135623730951},(1, -1): {(2, 3): -1.4142135623730951},(1, 1): {(2, 5): -1.4142135623730951},(-1, -1): {(0, 3): -1.4142135623730951}},(1, 5): {(1, 0): {(2, 5): -1.0},(0, 1): {(1, 5): -1},(-1, 0): {(0, 5): -1.0},(0, -1): {(1, 4): -1.0},(-1, 1): {(1, 5): -1},(1, -1): {(2, 4): -1.4142135623730951},(1, 1): {(1, 5): -1},(-1, -1): {(0, 4): -1.4142135623730951}},(2, 0): {(1, 0): {(3, 0): -1.0},(0, 1): {(2, 1): -1.0},(-1, 0): {(1, 0): -1.0},(0, -1): {(2, 0): -1},(-1, 1): {(1, 1): -1.4142135623730951},(1, -1): {(2, 0): -1},(1, 1): {(3, 1): -1.4142135623730951},(-1, -1): {(2, 0): -1}},(2, 1): {(1, 0): {(3, 1): -1.0},(0, 1): {(2, 2): -1.0},(-1, 0): {(1, 1): -1.0},(0, -1): {(2, 0): -1.0},(-1, 1): {(1, 2): -1.4142135623730951},(1, -1): {(3, 0): -1.4142135623730951},(1, 1): {(3, 2): -1.4142135623730951},(-1, -1): {(1, 0): -1.4142135623730951}},(2, 2): {(1, 0): {(3, 2): -1.0},(0, 1): {(2, 3): -1.0},(-1, 0): {(1, 2): -1.0},(0, -1): {(2, 1): -1.0},(-1, 1): {(1, 3): -1.4142135623730951},(1, -1): {(3, 1): -1.4142135623730951},(1, 1): {(3, 3): -1.4142135623730951},(-1, -1): {(1, 1): -1.4142135623730951}},(2, 3): {(1, 0): {(3, 3): -1.0},(0, 1): {(2, 4): -1.0},(-1, 0): {(1, 3): -1.0},(0, -1): {(2, 2): -1.0},(-1, 1): {(1, 4): -1.4142135623730951},(1, -1): {(3, 2): -1.4142135623730951},(1, 1): {(3, 4): -1.4142135623730951},(-1, -1): {(1, 2): -1.4142135623730951}},(2, 4): {(1, 0): {(3, 4): -1.0},(0, 1): {(2, 5): -1.0},(-1, 0): {(1, 4): -1.0},(0, -1): {(2, 3): -1.0},(-1, 1): {(1, 5): -1.4142135623730951},(1, -1): {(3, 3): -1.4142135623730951},(1, 1): {(3, 5): -1.4142135623730951},(-1, -1): {(1, 3): -1.4142135623730951}},(2, 5): {(1, 0): {(3, 5): -1.0},(0, 1): {(2, 5): -1},(-1, 0): {(1, 5): -1.0},(0, -1): {(2, 4): -1.0},(-1, 1): {(2, 5): -1},(1, -1): {(3, 4): -1.4142135623730951},(1, 1): {(2, 5): -1},(-1, -1): {(1, 4): -1.4142135623730951}},(3, 0): {(1, 0): {(4, 0): -100},(0, 1): {(3, 1): -100},(-1, 0): {(2, 0): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 1): -100},(1, -1): {(3, 0): -100},(1, 1): {(4, 1): -100},(-1, -1): {(3, 0): -100}},(3, 1): {(1, 0): {(4, 1): -1.0},(0, 1): {(3, 2): -1.0},(-1, 0): {(2, 1): -1.0},(0, -1): {(3, 0): -1.0},(-1, 1): {(2, 2): -1.4142135623730951},(1, -1): {(4, 0): -1.4142135623730951},(1, 1): {(4, 2): -1.4142135623730951},(-1, -1): {(2, 0): -1.4142135623730951}},(3, 2): {(1, 0): {(4, 2): -100},(0, 1): {(3, 3): -100},(-1, 0): {(2, 2): -100},(0, -1): {(3, 1): -100},(-1, 1): {(2, 3): -100},(1, -1): {(4, 1): -100},(1, 1): {(4, 3): -100},(-1, -1): {(2, 1): -100}},(3, 3): {(1, 0): {(4, 3): -100},(0, 1): {(3, 4): -100},(-1, 0): {(2, 3): -100},(0, -1): {(3, 2): -100},(-1, 1): {(2, 4): -100},(1, -1): {(4, 2): -100},(1, 1): {(4, 4): -100},(-1, -1): {(2, 2): -100}},(3, 4): {(1, 0): {(4, 4): -1.0},(0, 1): {(3, 5): -1.0},(-1, 0): {(2, 4): -1.0},(0, -1): {(3, 3): -1.0},(-1, 1): {(2, 5): -1.4142135623730951},(1, -1): {(4, 3): -1.4142135623730951},(1, 1): {(4, 5): -1.4142135623730951},(-1, -1): {(2, 3): -1.4142135623730951}},(3, 5): {(1, 0): {(4, 5): -1.0},(0, 1): {(3, 5): -1},(-1, 0): {(2, 5): -1.0},(0, -1): {(3, 4): -1.0},(-1, 1): {(3, 5): -1},(1, -1): {(4, 4): -1.4142135623730951},(1, 1): {(3, 5): -1},(-1, -1): {(2, 4): -1.4142135623730951}},(4, 0): {(1, 0): {(5, 0): -1.0},(0, 1): {(4, 1): -1.0},(-1, 0): {(3, 0): -1.0},(0, -1): {(4, 0): -1},(-1, 1): {(3, 1): -1.4142135623730951},(1, -1): {(4, 0): -1},(1, 1): {(5, 1): -1.4142135623730951},(-1, -1): {(4, 0): -1}},(4, 1): {(1, 0): {(5, 1): -1.0},(0, 1): {(4, 2): -1.0},(-1, 0): {(3, 1): -1.0},(0, -1): {(4, 0): -1.0},(-1, 1): {(3, 2): -1.4142135623730951},(1, -1): {(5, 0): -1.4142135623730951},(1, 1): {(5, 2): -1.4142135623730951},(-1, -1): {(3, 0): -1.4142135623730951}},(4, 2): {(1, 0): {(5, 2): -1.0},(0, 1): {(4, 3): -1.0},(-1, 0): {(3, 2): -1.0},(0, -1): {(4, 1): -1.0},(-1, 1): {(3, 3): -1.4142135623730951},(1, -1): {(5, 1): -1.4142135623730951},(1, 1): {(5, 3): -1.4142135623730951},(-1, -1): {(3, 1): -1.4142135623730951}},(4, 3): {(1, 0): {(5, 3): -1.0},(0, 1): {(4, 4): -1.0},(-1, 0): {(3, 3): -1.0},(0, -1): {(4, 2): -1.0},(-1, 1): {(3, 4): -1.4142135623730951},(1, -1): {(5, 2): -1.4142135623730951},(1, 1): {(5, 4): -1.4142135623730951},(-1, -1): {(3, 2): -1.4142135623730951}},(4, 4): {(1, 0): {(5, 4): -1.0},(0, 1): {(4, 5): -1.0},(-1, 0): {(3, 4): -1.0},(0, -1): {(4, 3): -1.0},(-1, 1): {(3, 5): -1.4142135623730951},(1, -1): {(5, 3): -1.4142135623730951},(1, 1): {(5, 5): -1.4142135623730951},(-1, -1): {(3, 3): -1.4142135623730951}},(4, 5): {(1, 0): {(5, 5): -1.0},(0, 1): {(4, 5): -1},(-1, 0): {(3, 5): -1.0},(0, -1): {(4, 4): -1.0},(-1, 1): {(4, 5): -1},(1, -1): {(5, 4): -1.4142135623730951},(1, 1): {(4, 5): -1},(-1, -1): {(3, 4): -1.4142135623730951}},(5, 0): {(1, 0): {(6, 0): -1.0},(0, 1): {(5, 1): -1.0},(-1, 0): {(4, 0): -1.0},(0, -1): {(5, 0): -1},(-1, 1): {(4, 1): -1.4142135623730951},(1, -1): {(5, 0): -1},(1, 1): {(6, 1): -1.4142135623730951},(-1, -1): {(5, 0): -1}},(5, 1): {(1, 0): {(6, 1): -1.0},(0, 1): {(5, 2): -1.0},(-1, 0): {(4, 1): -1.0},(0, -1): {(5, 0): -1.0},(-1, 1): {(4, 2): -1.4142135623730951},(1, -1): {(6, 0): -1.4142135623730951},(1, 1): {(6, 2): -1.4142135623730951},(-1, -1): {(4, 0): -1.4142135623730951}},(5, 2): {(1, 0): {(6, 2): -1.0},(0, 1): {(5, 3): -1.0},(-1, 0): {(4, 2): -1.0},(0, -1): {(5, 1): -1.0},(-1, 1): {(4, 3): -1.4142135623730951},(1, -1): {(6, 1): -1.4142135623730951},(1, 1): {(6, 3): -1.4142135623730951},(-1, -1): {(4, 1): -1.4142135623730951}},(5, 3): {(1, 0): {(6, 3): -1.0},(0, 1): {(5, 4): -1.0},(-1, 0): {(4, 3): -1.0},(0, -1): {(5, 2): -1.0},(-1, 1): {(4, 4): -1.4142135623730951},(1, -1): {(6, 2): -1.4142135623730951},(1, 1): {(6, 4): -1.4142135623730951},(-1, -1): {(4, 2): -1.4142135623730951}},(5, 4): {(1, 0): {(6, 4): -1.0},(0, 1): {(5, 5): -1.0},(-1, 0): {(4, 4): -1.0},(0, -1): {(5, 3): -1.0},(-1, 1): {(4, 5): -1.4142135623730951},(1, -1): {(6, 3): -1.4142135623730951},(1, 1): {(6, 5): -1.4142135623730951},(-1, -1): {(4, 3): -1.4142135623730951}},(5, 5): {(1, 0): {(6, 5): -1.0},(0, 1): {(5, 5): -1},(-1, 0): {(4, 5): -1.0},(0, -1): {(5, 4): -1.0},(-1, 1): {(5, 5): -1},(1, -1): {(6, 4): -1.4142135623730951},(1, 1): {(5, 5): -1},(-1, -1): {(4, 4): -1.4142135623730951}},(6, 0): {(1, 0): {(6, 0): -1},(0, 1): {(6, 1): -1.0},(-1, 0): {(5, 0): -1.0},(0, -1): {(6, 0): -1},(-1, 1): {(5, 1): -1.4142135623730951},(1, -1): {(6, 0): -1},(1, 1): {(6, 0): -1},(-1, -1): {(6, 0): -1}},(6, 1): {(1, 0): {(6, 1): -1},(0, 1): {(6, 2): -1.0},(-1, 0): {(5, 1): -1.0},(0, -1): {(6, 0): -1.0},(-1, 1): {(5, 2): -1.4142135623730951},(1, -1): {(6, 1): -1},(1, 1): {(6, 1): -1},(-1, -1): {(5, 0): -1.4142135623730951}},(6, 2): {(1, 0): {(6, 2): -1},(0, 1): {(6, 3): -1.0},(-1, 0): {(5, 2): -1.0},(0, -1): {(6, 1): -1.0},(-1, 1): {(5, 3): -1.4142135623730951},(1, -1): {(6, 2): -1},(1, 1): {(6, 2): -1},(-1, -1): {(5, 1): -1.4142135623730951}},(6, 3): {(1, 0): {(6, 3): -1},(0, 1): {(6, 4): -1.0},(-1, 0): {(5, 3): -1.0},(0, -1): {(6, 2): -1.0},(-1, 1): {(5, 4): -1.4142135623730951},(1, -1): {(6, 3): -1},(1, 1): {(6, 3): -1},(-1, -1): {(5, 2): -1.4142135623730951}},(6, 4): {(1, 0): {(6, 4): -1},(0, 1): {(6, 5): 10},(-1, 0): {(5, 4): 10},(0, -1): {(6, 3): 10},(-1, 1): {(5, 5): 10},(1, -1): {(6, 4): -1},(1, 1): {(6, 4): -1},(-1, -1): {(5, 3): 10}},(6, 5): {(1, 0): {(6, 5): -1},(0, 1): {(6, 5): -1},(-1, 0): {(5, 5): -1.0},(0, -1): {(6, 4): -1.0},(-1, 1): {(6, 5): -1},(1, -1): {(6, 5): -1},(1, 1): {(6, 5): -1},(-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardBGap = {(0, 0): {(1, 0): {(1, 0): -1.0},(0, 1): {(0, 1): -1.0},(-1, 0): {(0, 0): -1},(0, -1): {(0, 0): -1},(-1, 1): {(0, 0): -1},(1, -1): {(0, 0): -1},(1, 1): {(1, 1): -1.4142135623730951},(-1, -1): {(0, 0): -1}},(0, 1): {(1, 0): {(1, 1): -1.0},(0, 1): {(0, 2): -1.0},(-1, 0): {(0, 1): -1},(0, -1): {(0, 0): -1.0},(-1, 1): {(0, 1): -1},(1, -1): {(1, 0): -1.4142135623730951},(1, 1): {(1, 2): -1.4142135623730951},(-1, -1): {(0, 1): -1}},(0, 2): {(1, 0): {(1, 2): -1.0},(0, 1): {(0, 3): -1.0},(-1, 0): {(0, 2): -1},(0, -1): {(0, 1): -1.0},(-1, 1): {(0, 2): -1},(1, -1): {(1, 1): -1.4142135623730951},(1, 1): {(1, 3): -1.4142135623730951},(-1, -1): {(0, 2): -1}},(0, 3): {(1, 0): {(1, 3): -1.0},(0, 1): {(0, 4): -1.0},(-1, 0): {(0, 3): -1},(0, -1): {(0, 2): -1.0},(-1, 1): {(0, 3): -1},(1, -1): {(1, 2): -1.4142135623730951},(1, 1): {(1, 4): -1.4142135623730951},(-1, -1): {(0, 3): -1}},(0, 4): {(1, 0): {(1, 4): -1.0},(0, 1): {(0, 5): -1.0},(-1, 0): {(0, 4): -1},(0, -1): {(0, 3): -1.0},(-1, 1): {(0, 4): -1},(1, -1): {(1, 3): -1.4142135623730951},(1, 1): {(1, 5): -1.4142135623730951},(-1, -1): {(0, 4): -1}},(0, 5): {(1, 0): {(1, 5): -1.0},(0, 1): {(0, 5): -1},(-1, 0): {(0, 5): -1},(0, -1): {(0, 4): -1.0},(-1, 1): {(0, 5): -1},(1, -1): {(1, 4): -1.4142135623730951},(1, 1): {(0, 5): -1},(-1, -1): {(0, 5): -1}},(1, 0): {(1, 0): {(2, 0): -1.0},(0, 1): {(1, 1): -1.0},(-1, 0): {(0, 0): -1.0},(0, -1): {(1, 0): -1},(-1, 1): {(0, 1): -1.4142135623730951},(1, -1): {(1, 0): -1},(1, 1): {(2, 1): -1.4142135623730951},(-1, -1): {(1, 0): -1}},(1, 1): {(1, 0): {(2, 1): -1.0},(0, 1): {(1, 2): -1.0},(-1, 0): {(0, 1): -1.0},(0, -1): {(1, 0): -1.0},(-1, 1): {(0, 2): -1.4142135623730951},(1, -1): {(2, 0): -1.4142135623730951},(1, 1): {(2, 2): -1.4142135623730951},(-1, -1): {(0, 0): -1.4142135623730951}},(1, 2): {(1, 0): {(2, 2): -1.0},(0, 1): {(1, 3): -1.0},(-1, 0): {(0, 2): -1.0},(0, -1): {(1, 1): -1.0},(-1, 1): {(0, 3): -1.4142135623730951},(1, -1): {(2, 1): -1.4142135623730951},(1, 1): {(2, 3): -1.4142135623730951},(-1, -1): {(0, 1): -1.4142135623730951}},(1, 3): {(1, 0): {(2, 3): -1.0},(0, 1): {(1, 4): -1.0},(-1, 0): {(0, 3): -1.0},(0, -1): {(1, 2): -1.0},(-1, 1): {(0, 4): -1.4142135623730951},(1, -1): {(2, 2): -1.4142135623730951},(1, 1): {(2, 4): -1.4142135623730951},(-1, -1): {(0, 2): -1.4142135623730951}},(1, 4): {(1, 0): {(2, 4): -1.0},(0, 1): {(1, 5): -1.0},(-1, 0): {(0, 4): -1.0},(0, -1): {(1, 3): -1.0},(-1, 1): {(0, 5): -1.4142135623730951},(1, -1): {(2, 3): -1.4142135623730951},(1, 1): {(2, 5): -1.4142135623730951},(-1, -1): {(0, 3): -1.4142135623730951}},(1, 5): {(1, 0): {(2, 5): -1.0},(0, 1): {(1, 5): -1},(-1, 0): {(0, 5): -1.0},(0, -1): {(1, 4): -1.0},(-1, 1): {(1, 5): -1},(1, -1): {(2, 4): -1.4142135623730951},(1, 1): {(1, 5): -1},(-1, -1): {(0, 4): -1.4142135623730951}},(2, 0): {(1, 0): {(3, 0): -1.0},(0, 1): {(2, 1): -1.0},(-1, 0): {(1, 0): -1.0},(0, -1): {(2, 0): -1},(-1, 1): {(1, 1): -1.4142135623730951},(1, -1): {(2, 0): -1},(1, 1): {(3, 1): -1.4142135623730951},(-1, -1): {(2, 0): -1}},(2, 1): {(1, 0): {(3, 1): -1.0},(0, 1): {(2, 2): -1.0},(-1, 0): {(1, 1): -1.0},(0, -1): {(2, 0): -1.0},(-1, 1): {(1, 2): -1.4142135623730951},(1, -1): {(3, 0): -1.4142135623730951},(1, 1): {(3, 2): -1.4142135623730951},(-1, -1): {(1, 0): -1.4142135623730951}},(2, 2): {(1, 0): {(3, 2): -1.0},(0, 1): {(2, 3): -1.0},(-1, 0): {(1, 2): -1.0},(0, -1): {(2, 1): -1.0},(-1, 1): {(1, 3): -1.4142135623730951},(1, -1): {(3, 1): -1.4142135623730951},(1, 1): {(3, 3): -1.4142135623730951},(-1, -1): {(1, 1): -1.4142135623730951}},(2, 3): {(1, 0): {(3, 3): -1.0},(0, 1): {(2, 4): -1.0},(-1, 0): {(1, 3): -1.0},(0, -1): {(2, 2): -1.0},(-1, 1): {(1, 4): -1.4142135623730951},(1, -1): {(3, 2): -1.4142135623730951},(1, 1): {(3, 4): -1.4142135623730951},(-1, -1): {(1, 2): -1.4142135623730951}},(2, 4): {(1, 0): {(3, 4): -1.0},(0, 1): {(2, 5): -1.0},(-1, 0): {(1, 4): -1.0},(0, -1): {(2, 3): -1.0},(-1, 1): {(1, 5): -1.4142135623730951},(1, -1): {(3, 3): -1.4142135623730951},(1, 1): {(3, 5): -1.4142135623730951},(-1, -1): {(1, 3): -1.4142135623730951}},(2, 5): {(1, 0): {(3, 5): -1.0},(0, 1): {(2, 5): -1},(-1, 0): {(1, 5): -1.0},(0, -1): {(2, 4): -1.0},(-1, 1): {(2, 5): -1},(1, -1): {(3, 4): -1.4142135623730951},(1, 1): {(2, 5): -1},(-1, -1): {(1, 4): -1.4142135623730951}},(3, 0): {(1, 0): {(4, 0): -100},(0, 1): {(3, 1): -100},(-1, 0): {(2, 0): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 1): -100},(1, -1): {(3, 0): -100},(1, 1): {(4, 1): -100},(-1, -1): {(3, 0): -100}},(3, 1): {(1, 0): {(4, 1): -1.0},(0, 1): {(3, 2): -1.0},(-1, 0): {(2, 1): -1.0},(0, -1): {(3, 0): -1.0},(-1, 1): {(2, 2): -1.4142135623730951},(1, -1): {(4, 0): -1.4142135623730951},(1, 1): {(4, 2): -1.4142135623730951},(-1, -1): {(2, 0): -1.4142135623730951}},(3, 2): {(1, 0): {(4, 2): -100},(0, 1): {(3, 3): -100},(-1, 0): {(2, 2): -100},(0, -1): {(3, 1): -100},(-1, 1): {(2, 3): -100},(1, -1): {(4, 1): -100},(1, 1): {(4, 3): -100},(-1, -1): {(2, 1): -100}},(3, 3): {(1, 0): {(4, 3): -100},(0, 1): {(3, 4): -100},(-1, 0): {(2, 3): -100},(0, -1): {(3, 2): -100},(-1, 1): {(2, 4): -100},(1, -1): {(4, 2): -100},(1, 1): {(4, 4): -100},(-1, -1): {(2, 2): -100}},(3, 4): {(1, 0): {(4, 4): -1.0},(0, 1): {(3, 5): -1.0},(-1, 0): {(2, 4): -1.0},(0, -1): {(3, 3): -1.0},(-1, 1): {(2, 5): -1.4142135623730951},(1, -1): {(4, 3): -1.4142135623730951},(1, 1): {(4, 5): -1.4142135623730951},(-1, -1): {(2, 3): -1.4142135623730951}},(3, 5): {(1, 0): {(4, 5): -1.0},(0, 1): {(3, 5): -1},(-1, 0): {(2, 5): -1.0},(0, -1): {(3, 4): -1.0},(-1, 1): {(3, 5): -1},(1, -1): {(4, 4): -1.4142135623730951},(1, 1): {(3, 5): -1},(-1, -1): {(2, 4): -1.4142135623730951}},(4, 0): {(1, 0): {(5, 0): -1.0},(0, 1): {(4, 1): -1.0},(-1, 0): {(3, 0): -1.0},(0, -1): {(4, 0): -1},(-1, 1): {(3, 1): -1.4142135623730951},(1, -1): {(4, 0): -1},(1, 1): {(5, 1): -1.4142135623730951},(-1, -1): {(4, 0): -1}},(4, 1): {(1, 0): {(5, 1): -1.0},(0, 1): {(4, 2): -1.0},(-1, 0): {(3, 1): -1.0},(0, -1): {(4, 0): -1.0},(-1, 1): {(3, 2): -1.4142135623730951},(1, -1): {(5, 0): -1.4142135623730951},(1, 1): {(5, 2): -1.4142135623730951},(-1, -1): {(3, 0): -1.4142135623730951}},(4, 2): {(1, 0): {(5, 2): -1.0},(0, 1): {(4, 3): -1.0},(-1, 0): {(3, 2): -1.0},(0, -1): {(4, 1): -1.0},(-1, 1): {(3, 3): -1.4142135623730951},(1, -1): {(5, 1): -1.4142135623730951},(1, 1): {(5, 3): -1.4142135623730951},(-1, -1): {(3, 1): -1.4142135623730951}},(4, 3): {(1, 0): {(5, 3): -1.0},(0, 1): {(4, 4): -1.0},(-1, 0): {(3, 3): -1.0},(0, -1): {(4, 2): -1.0},(-1, 1): {(3, 4): -1.4142135623730951},(1, -1): {(5, 2): -1.4142135623730951},(1, 1): {(5, 4): -1.4142135623730951},(-1, -1): {(3, 2): -1.4142135623730951}},(4, 4): {(1, 0): {(5, 4): -1.0},(0, 1): {(4, 5): -1.0},(-1, 0): {(3, 4): -1.0},(0, -1): {(4, 3): -1.0},(-1, 1): {(3, 5): -1.4142135623730951},(1, -1): {(5, 3): -1.4142135623730951},(1, 1): {(5, 5): -1.4142135623730951},(-1, -1): {(3, 3): -1.4142135623730951}},(4, 5): {(1, 0): {(5, 5): -1.0},(0, 1): {(4, 5): -1},(-1, 0): {(3, 5): -1.0},(0, -1): {(4, 4): -1.0},(-1, 1): {(4, 5): -1},(1, -1): {(5, 4): -1.4142135623730951},(1, 1): {(4, 5): -1},(-1, -1): {(3, 4): -1.4142135623730951}},(5, 0): {(1, 0): {(6, 0): -1.0},(0, 1): {(5, 1): -1.0},(-1, 0): {(4, 0): -1.0},(0, -1): {(5, 0): -1},(-1, 1): {(4, 1): -1.4142135623730951},(1, -1): {(5, 0): -1},(1, 1): {(6, 1): -1.4142135623730951},(-1, -1): {(5, 0): -1}},(5, 1): {(1, 0): {(6, 1): -1.0},(0, 1): {(5, 2): -1.0},(-1, 0): {(4, 1): -1.0},(0, -1): {(5, 0): -1.0},(-1, 1): {(4, 2): -1.4142135623730951},(1, -1): {(6, 0): -1.4142135623730951},(1, 1): {(6, 2): -1.4142135623730951},(-1, -1): {(4, 0): -1.4142135623730951}},(5, 2): {(1, 0): {(6, 2): -1.0},(0, 1): {(5, 3): -1.0},(-1, 0): {(4, 2): -1.0},(0, -1): {(5, 1): -1.0},(-1, 1): {(4, 3): -1.4142135623730951},(1, -1): {(6, 1): -1.4142135623730951},(1, 1): {(6, 3): -1.4142135623730951},(-1, -1): {(4, 1): -1.4142135623730951}},(5, 3): {(1, 0): {(6, 3): -1.0},(0, 1): {(5, 4): -1.0},(-1, 0): {(4, 3): -1.0},(0, -1): {(5, 2): -1.0},(-1, 1): {(4, 4): -1.4142135623730951},(1, -1): {(6, 2): -1.4142135623730951},(1, 1): {(6, 4): -1.4142135623730951},(-1, -1): {(4, 2): -1.4142135623730951}},(5, 4): {(1, 0): {(6, 4): -1.0},(0, 1): {(5, 5): -1.0},(-1, 0): {(4, 4): -1.0},(0, -1): {(5, 3): -1.0},(-1, 1): {(4, 5): -1.4142135623730951},(1, -1): {(6, 3): -1.4142135623730951},(1, 1): {(6, 5): -1.4142135623730951},(-1, -1): {(4, 3): -1.4142135623730951}},(5, 5): {(1, 0): {(6, 5): -1.0},(0, 1): {(5, 5): -1},(-1, 0): {(4, 5): -1.0},(0, -1): {(5, 4): -1.0},(-1, 1): {(5, 5): -1},(1, -1): {(6, 4): -1.4142135623730951},(1, 1): {(5, 5): -1},(-1, -1): {(4, 4): -1.4142135623730951}},(6, 0): {(1, 0): {(6, 0): -1},(0, 1): {(6, 1): -1.0},(-1, 0): {(5, 0): -1.0},(0, -1): {(6, 0): -1},(-1, 1): {(5, 1): -1.4142135623730951},(1, -1): {(6, 0): -1},(1, 1): {(6, 0): -1},(-1, -1): {(6, 0): -1}},(6, 1): {(1, 0): {(6, 1): -1},(0, 1): {(6, 2): 10},(-1, 0): {(5, 1): 10},(0, -1): {(6, 0): 10},(-1, 1): {(5, 2): 10},(1, -1): {(6, 1): -1},(1, 1): {(6, 1): -1},(-1, -1): {(5, 0): 10}},(6, 2): {(1, 0): {(6, 2): -1},(0, 1): {(6, 3): -1.0},(-1, 0): {(5, 2): -1.0},(0, -1): {(6, 1): -1.0},(-1, 1): {(5, 3): -1.4142135623730951},(1, -1): {(6, 2): -1},(1, 1): {(6, 2): -1},(-1, -1): {(5, 1): -1.4142135623730951}},(6, 3): {(1, 0): {(6, 3): -1},(0, 1): {(6, 4): -1.0},(-1, 0): {(5, 3): -1.0},(0, -1): {(6, 2): -1.0},(-1, 1): {(5, 4): -1.4142135623730951},(1, -1): {(6, 3): -1},(1, 1): {(6, 3): -1},(-1, -1): {(5, 2): -1.4142135623730951}},(6, 4): {(1, 0): {(6, 4): -1},(0, 1): {(6, 5): -1.0},(-1, 0): {(5, 4): -1.0},(0, -1): {(6, 3): -1.0},(-1, 1): {(5, 5): -1.4142135623730951},(1, -1): {(6, 4): -1},(1, 1): {(6, 4): -1},(-1, -1): {(5, 3): -1.4142135623730951}},(6, 5): {(1, 0): {(6, 5): -1},(0, 1): {(6, 5): -1},(-1, 0): {(5, 5): -1.0},(0, -1): {(6, 4): -1.0},(-1, 1): {(6, 5): -1},(1, -1): {(6, 5): -1},(1, 1): {(6, 5): -1},(-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardCGap = {(0, 0): {(1, 0): {(1, 0): -1.0},(0, 1): {(0, 1): -1.0},(-1, 0): {(0, 0): -1},(0, -1): {(0, 0): -1},(-1, 1): {(0, 0): -1},(1, -1): {(0, 0): -1},(1, 1): {(1, 1): -1.4142135623730951},(-1, -1): {(0, 0): -1}},(0, 1): {(1, 0): {(1, 1): -1.0},(0, 1): {(0, 2): -1.0},(-1, 0): {(0, 1): -1},(0, -1): {(0, 0): -1.0},(-1, 1): {(0, 1): -1},(1, -1): {(1, 0): -1.4142135623730951},(1, 1): {(1, 2): -1.4142135623730951},(-1, -1): {(0, 1): -1}},(0, 2): {(1, 0): {(1, 2): -1.0},(0, 1): {(0, 3): -1.0},(-1, 0): {(0, 2): -1},(0, -1): {(0, 1): -1.0},(-1, 1): {(0, 2): -1},(1, -1): {(1, 1): -1.4142135623730951},(1, 1): {(1, 3): -1.4142135623730951},(-1, -1): {(0, 2): -1}},(0, 3): {(1, 0): {(1, 3): -1.0},(0, 1): {(0, 4): -1.0},(-1, 0): {(0, 3): -1},(0, -1): {(0, 2): -1.0},(-1, 1): {(0, 3): -1},(1, -1): {(1, 2): -1.4142135623730951},(1, 1): {(1, 4): -1.4142135623730951},(-1, -1): {(0, 3): -1}},(0, 4): {(1, 0): {(1, 4): -1.0},(0, 1): {(0, 5): -1.0},(-1, 0): {(0, 4): -1},(0, -1): {(0, 3): -1.0},(-1, 1): {(0, 4): -1},(1, -1): {(1, 3): -1.4142135623730951},(1, 1): {(1, 5): -1.4142135623730951},(-1, -1): {(0, 4): -1}},(0, 5): {(1, 0): {(1, 5): -1.0},(0, 1): {(0, 5): -1},(-1, 0): {(0, 5): -1},(0, -1): {(0, 4): -1.0},(-1, 1): {(0, 5): -1},(1, -1): {(1, 4): -1.4142135623730951},(1, 1): {(0, 5): -1},(-1, -1): {(0, 5): -1}},(1, 0): {(1, 0): {(2, 0): -1.0},(0, 1): {(1, 1): -1.0},(-1, 0): {(0, 0): -1.0},(0, -1): {(1, 0): -1},(-1, 1): {(0, 1): -1.4142135623730951},(1, -1): {(1, 0): -1},(1, 1): {(2, 1): -1.4142135623730951},(-1, -1): {(1, 0): -1}},(1, 1): {(1, 0): {(2, 1): -1.0},(0, 1): {(1, 2): -1.0},(-1, 0): {(0, 1): -1.0},(0, -1): {(1, 0): -1.0},(-1, 1): {(0, 2): -1.4142135623730951},(1, -1): {(2, 0): -1.4142135623730951},(1, 1): {(2, 2): -1.4142135623730951},(-1, -1): {(0, 0): -1.4142135623730951}},(1, 2): {(1, 0): {(2, 2): -1.0},(0, 1): {(1, 3): -1.0},(-1, 0): {(0, 2): -1.0},(0, -1): {(1, 1): -1.0},(-1, 1): {(0, 3): -1.4142135623730951},(1, -1): {(2, 1): -1.4142135623730951},(1, 1): {(2, 3): -1.4142135623730951},(-1, -1): {(0, 1): -1.4142135623730951}},(1, 3): {(1, 0): {(2, 3): -1.0},(0, 1): {(1, 4): -1.0},(-1, 0): {(0, 3): -1.0},(0, -1): {(1, 2): -1.0},(-1, 1): {(0, 4): -1.4142135623730951},(1, -1): {(2, 2): -1.4142135623730951},(1, 1): {(2, 4): -1.4142135623730951},(-1, -1): {(0, 2): -1.4142135623730951}},(1, 4): {(1, 0): {(2, 4): -1.0},(0, 1): {(1, 5): -1.0},(-1, 0): {(0, 4): -1.0},(0, -1): {(1, 3): -1.0},(-1, 1): {(0, 5): -1.4142135623730951},(1, -1): {(2, 3): -1.4142135623730951},(1, 1): {(2, 5): -1.4142135623730951},(-1, -1): {(0, 3): -1.4142135623730951}},(1, 5): {(1, 0): {(2, 5): 10},(0, 1): {(1, 5): -1},(-1, 0): {(0, 5): 10},(0, -1): {(1, 4): 10},(-1, 1): {(1, 5): -1},(1, -1): {(2, 4): 10},(1, 1): {(1, 5): -1},(-1, -1): {(0, 4): 10}},(2, 0): {(1, 0): {(3, 0): -1.0},(0, 1): {(2, 1): -1.0},(-1, 0): {(1, 0): -1.0},(0, -1): {(2, 0): -1},(-1, 1): {(1, 1): -1.4142135623730951},(1, -1): {(2, 0): -1},(1, 1): {(3, 1): -1.4142135623730951},(-1, -1): {(2, 0): -1}},(2, 1): {(1, 0): {(3, 1): -1.0},(0, 1): {(2, 2): -1.0},(-1, 0): {(1, 1): -1.0},(0, -1): {(2, 0): -1.0},(-1, 1): {(1, 2): -1.4142135623730951},(1, -1): {(3, 0): -1.4142135623730951},(1, 1): {(3, 2): -1.4142135623730951},(-1, -1): {(1, 0): -1.4142135623730951}},(2, 2): {(1, 0): {(3, 2): -1.0},(0, 1): {(2, 3): -1.0},(-1, 0): {(1, 2): -1.0},(0, -1): {(2, 1): -1.0},(-1, 1): {(1, 3): -1.4142135623730951},(1, -1): {(3, 1): -1.4142135623730951},(1, 1): {(3, 3): -1.4142135623730951},(-1, -1): {(1, 1): -1.4142135623730951}},(2, 3): {(1, 0): {(3, 3): -1.0},(0, 1): {(2, 4): -1.0},(-1, 0): {(1, 3): -1.0},(0, -1): {(2, 2): -1.0},(-1, 1): {(1, 4): -1.4142135623730951},(1, -1): {(3, 2): -1.4142135623730951},(1, 1): {(3, 4): -1.4142135623730951},(-1, -1): {(1, 2): -1.4142135623730951}},(2, 4): {(1, 0): {(3, 4): -1.0},(0, 1): {(2, 5): -1.0},(-1, 0): {(1, 4): -1.0},(0, -1): {(2, 3): -1.0},(-1, 1): {(1, 5): -1.4142135623730951},(1, -1): {(3, 3): -1.4142135623730951},(1, 1): {(3, 5): -1.4142135623730951},(-1, -1): {(1, 3): -1.4142135623730951}},(2, 5): {(1, 0): {(3, 5): -1.0},(0, 1): {(2, 5): -1},(-1, 0): {(1, 5): -1.0},(0, -1): {(2, 4): -1.0},(-1, 1): {(2, 5): -1},(1, -1): {(3, 4): -1.4142135623730951},(1, 1): {(2, 5): -1},(-1, -1): {(1, 4): -1.4142135623730951}},(3, 0): {(1, 0): {(4, 0): -100},(0, 1): {(3, 1): -100},(-1, 0): {(2, 0): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 1): -100},(1, -1): {(3, 0): -100},(1, 1): {(4, 1): -100},(-1, -1): {(3, 0): -100}},(3, 1): {(1, 0): {(4, 1): -1.0},(0, 1): {(3, 2): -1.0},(-1, 0): {(2, 1): -1.0},(0, -1): {(3, 0): -1.0},(-1, 1): {(2, 2): -1.4142135623730951},(1, -1): {(4, 0): -1.4142135623730951},(1, 1): {(4, 2): -1.4142135623730951},(-1, -1): {(2, 0): -1.4142135623730951}},(3, 2): {(1, 0): {(4, 2): -100},(0, 1): {(3, 3): -100},(-1, 0): {(2, 2): -100},(0, -1): {(3, 1): -100},(-1, 1): {(2, 3): -100},(1, -1): {(4, 1): -100},(1, 1): {(4, 3): -100},(-1, -1): {(2, 1): -100}},(3, 3): {(1, 0): {(4, 3): -100},(0, 1): {(3, 4): -100},(-1, 0): {(2, 3): -100},(0, -1): {(3, 2): -100},(-1, 1): {(2, 4): -100},(1, -1): {(4, 2): -100},(1, 1): {(4, 4): -100},(-1, -1): {(2, 2): -100}},(3, 4): {(1, 0): {(4, 4): -1.0},(0, 1): {(3, 5): -1.0},(-1, 0): {(2, 4): -1.0},(0, -1): {(3, 3): -1.0},(-1, 1): {(2, 5): -1.4142135623730951},(1, -1): {(4, 3): -1.4142135623730951},(1, 1): {(4, 5): -1.4142135623730951},(-1, -1): {(2, 3): -1.4142135623730951}},(3, 5): {(1, 0): {(4, 5): -1.0},(0, 1): {(3, 5): -1},(-1, 0): {(2, 5): -1.0},(0, -1): {(3, 4): -1.0},(-1, 1): {(3, 5): -1},(1, -1): {(4, 4): -1.4142135623730951},(1, 1): {(3, 5): -1},(-1, -1): {(2, 4): -1.4142135623730951}},(4, 0): {(1, 0): {(5, 0): -1.0},(0, 1): {(4, 1): -1.0},(-1, 0): {(3, 0): -1.0},(0, -1): {(4, 0): -1},(-1, 1): {(3, 1): -1.4142135623730951},(1, -1): {(4, 0): -1},(1, 1): {(5, 1): -1.4142135623730951},(-1, -1): {(4, 0): -1}},(4, 1): {(1, 0): {(5, 1): -1.0},(0, 1): {(4, 2): -1.0},(-1, 0): {(3, 1): -1.0},(0, -1): {(4, 0): -1.0},(-1, 1): {(3, 2): -1.4142135623730951},(1, -1): {(5, 0): -1.4142135623730951},(1, 1): {(5, 2): -1.4142135623730951},(-1, -1): {(3, 0): -1.4142135623730951}},(4, 2): {(1, 0): {(5, 2): -1.0},(0, 1): {(4, 3): -1.0},(-1, 0): {(3, 2): -1.0},(0, -1): {(4, 1): -1.0},(-1, 1): {(3, 3): -1.4142135623730951},(1, -1): {(5, 1): -1.4142135623730951},(1, 1): {(5, 3): -1.4142135623730951},(-1, -1): {(3, 1): -1.4142135623730951}},(4, 3): {(1, 0): {(5, 3): -1.0},(0, 1): {(4, 4): -1.0},(-1, 0): {(3, 3): -1.0},(0, -1): {(4, 2): -1.0},(-1, 1): {(3, 4): -1.4142135623730951},(1, -1): {(5, 2): -1.4142135623730951},(1, 1): {(5, 4): -1.4142135623730951},(-1, -1): {(3, 2): -1.4142135623730951}},(4, 4): {(1, 0): {(5, 4): -1.0},(0, 1): {(4, 5): -1.0},(-1, 0): {(3, 4): -1.0},(0, -1): {(4, 3): -1.0},(-1, 1): {(3, 5): -1.4142135623730951},(1, -1): {(5, 3): -1.4142135623730951},(1, 1): {(5, 5): -1.4142135623730951},(-1, -1): {(3, 3): -1.4142135623730951}},(4, 5): {(1, 0): {(5, 5): -1.0},(0, 1): {(4, 5): -1},(-1, 0): {(3, 5): -1.0},(0, -1): {(4, 4): -1.0},(-1, 1): {(4, 5): -1},(1, -1): {(5, 4): -1.4142135623730951},(1, 1): {(4, 5): -1},(-1, -1): {(3, 4): -1.4142135623730951}},(5, 0): {(1, 0): {(6, 0): -1.0},(0, 1): {(5, 1): -1.0},(-1, 0): {(4, 0): -1.0},(0, -1): {(5, 0): -1},(-1, 1): {(4, 1): -1.4142135623730951},(1, -1): {(5, 0): -1},(1, 1): {(6, 1): -1.4142135623730951},(-1, -1): {(5, 0): -1}},(5, 1): {(1, 0): {(6, 1): -1.0},(0, 1): {(5, 2): -1.0},(-1, 0): {(4, 1): -1.0},(0, -1): {(5, 0): -1.0},(-1, 1): {(4, 2): -1.4142135623730951},(1, -1): {(6, 0): -1.4142135623730951},(1, 1): {(6, 2): -1.4142135623730951},(-1, -1): {(4, 0): -1.4142135623730951}},(5, 2): {(1, 0): {(6, 2): -1.0},(0, 1): {(5, 3): -1.0},(-1, 0): {(4, 2): -1.0},(0, -1): {(5, 1): -1.0},(-1, 1): {(4, 3): -1.4142135623730951},(1, -1): {(6, 1): -1.4142135623730951},(1, 1): {(6, 3): -1.4142135623730951},(-1, -1): {(4, 1): -1.4142135623730951}},(5, 3): {(1, 0): {(6, 3): -1.0},(0, 1): {(5, 4): -1.0},(-1, 0): {(4, 3): -1.0},(0, -1): {(5, 2): -1.0},(-1, 1): {(4, 4): -1.4142135623730951},(1, -1): {(6, 2): -1.4142135623730951},(1, 1): {(6, 4): -1.4142135623730951},(-1, -1): {(4, 2): -1.4142135623730951}},(5, 4): {(1, 0): {(6, 4): -1.0},(0, 1): {(5, 5): -1.0},(-1, 0): {(4, 4): -1.0},(0, -1): {(5, 3): -1.0},(-1, 1): {(4, 5): -1.4142135623730951},(1, -1): {(6, 3): -1.4142135623730951},(1, 1): {(6, 5): -1.4142135623730951},(-1, -1): {(4, 3): -1.4142135623730951}},(5, 5): {(1, 0): {(6, 5): -1.0},(0, 1): {(5, 5): -1},(-1, 0): {(4, 5): -1.0},(0, -1): {(5, 4): -1.0},(-1, 1): {(5, 5): -1},(1, -1): {(6, 4): -1.4142135623730951},(1, 1): {(5, 5): -1},(-1, -1): {(4, 4): -1.4142135623730951}},(6, 0): {(1, 0): {(6, 0): -1},(0, 1): {(6, 1): -1.0},(-1, 0): {(5, 0): -1.0},(0, -1): {(6, 0): -1},(-1, 1): {(5, 1): -1.4142135623730951},(1, -1): {(6, 0): -1},(1, 1): {(6, 0): -1},(-1, -1): {(6, 0): -1}},(6, 1): {(1, 0): {(6, 1): -1},(0, 1): {(6, 2): -1.0},(-1, 0): {(5, 1): -1.0},(0, -1): {(6, 0): -1.0},(-1, 1): {(5, 2): -1.4142135623730951},(1, -1): {(6, 1): -1},(1, 1): {(6, 1): -1},(-1, -1): {(5, 0): -1.4142135623730951}},(6, 2): {(1, 0): {(6, 2): -1},(0, 1): {(6, 3): -1.0},(-1, 0): {(5, 2): -1.0},(0, -1): {(6, 1): -1.0},(-1, 1): {(5, 3): -1.4142135623730951},(1, -1): {(6, 2): -1},(1, 1): {(6, 2): -1},(-1, -1): {(5, 1): -1.4142135623730951}},(6, 3): {(1, 0): {(6, 3): -1},(0, 1): {(6, 4): -1.0},(-1, 0): {(5, 3): -1.0},(0, -1): {(6, 2): -1.0},(-1, 1): {(5, 4): -1.4142135623730951},(1, -1): {(6, 3): -1},(1, 1): {(6, 3): -1},(-1, -1): {(5, 2): -1.4142135623730951}},(6, 4): {(1, 0): {(6, 4): -1},(0, 1): {(6, 5): -1.0},(-1, 0): {(5, 4): -1.0},(0, -1): {(6, 3): -1.0},(-1, 1): {(5, 5): -1.4142135623730951},(1, -1): {(6, 4): -1},(1, 1): {(6, 4): -1},(-1, -1): {(5, 3): -1.4142135623730951}},(6, 5): {(1, 0): {(6, 5): -1},(0, 1): {(6, 5): -1},(-1, 0): {(5, 5): -1.0},(0, -1): {(6, 4): -1.0},(-1, 1): {(6, 5): -1},(1, -1): {(6, 5): -1},(1, 1): {(6, 5): -1},(-1, -1): {(5, 4): -1.4142135623730951}}}
    
    #reward A part
    performValueIteration = ValueIteration(transition, rewardA, valueTable, convergenceTolerance, gamma)
    optimalValuesA, policyTableA = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState = (6,4) , trapStates = [(3,0), (3,1),(3,2), (3,3)],valueTable=optimalValuesA)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState = (6,4) , trapStates = [(3,0), (3,1),(3,2), (3,3)], policy=policyTableA)
    
    print(p_traj(trajectoryToGoalA,beta,gamma,transition,rewardA,optimalValuesA))
    plt.plot([2,3,4,5,6,7,8],p_traj(trajectoryToGoalA,beta,gamma,transition,rewardA,optimalValuesA))
    plt.ylabel('Probabilty of goal A (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol A without gap')
    plt.show()
    
    #reward A Gap part
    performValueIteration = ValueIteration(transition, rewardAGap, valueTable, convergenceTolerance, gamma)
    optimalValuesAG, policyTableAG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState = (6,4) , trapStates = [(3,0), (3,2), (3,3)],valueTable=optimalValuesAG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState = (6,4) , trapStates = [(3,0), (3,2), (3,3)], policy=policyTableAG)
    
    print(p_traj(trajectoryToGoalA,beta,gamma,transition,rewardAGap,optimalValuesAG))
    plt.plot([2,3,4,5,6,7,8],p_traj(trajectoryToGoalA,beta,gamma,transition,rewardAGap,optimalValuesAG))
    plt.ylabel('Probabilty of goal A Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol A with gap')
    plt.show()
    
    
    #reward B part
    performValueIteration = ValueIteration(transition, rewardB, valueTable, convergenceTolerance, gamma)
    optimalValuesB, policyTableB = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState = (6,1) , trapStates = [(3,0), (3,1),(3,2), (3,3)],valueTable=optimalValuesB)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState = (6,1) , trapStates = [(3,0), (3,1),(3,2), (3,3)], policy=policyTableB)
    
    print(p_traj(trajectoryToGoalB,beta,gamma,transition,rewardB,optimalValuesB))
    plt.plot([2,3,4,5,6,7,8],p_traj(trajectoryToGoalB,beta,gamma,transition,rewardB,optimalValuesB))
    plt.ylabel('Probabilty of goal B (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol B without gap')
    plt.show()
    
    
    #reward B Gap part
    performValueIteration = ValueIteration(transition, rewardBGap, valueTable, convergenceTolerance, gamma)
    optimalValuesBG, policyTableBG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState = (6,1) , trapStates = [(3,0), (3,2), (3,3)],valueTable=optimalValuesBG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState = (6,1) , trapStates = [(3,0), (3,2), (3,3)], policy=policyTableBG)
    
    print(p_traj(trajectoryToGoalB,beta,gamma,transition,rewardBGap,optimalValuesBG))
    plt.plot([2,3,4,5,6,7,8],p_traj(trajectoryToGoalB,beta,gamma,transition,rewardBGap,optimalValuesBG))
    plt.ylabel('Probabilty of goal B Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol B with gap')
    plt.show()
    
    #reward C part
    performValueIteration = ValueIteration(transition, rewardC, valueTable, convergenceTolerance, gamma)
    optimalValuesC, policyTableC = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState = (1,5) , trapStates = [(3,0), (3,1),(3,2), (3,3)],valueTable=optimalValuesC)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState = (1,5) , trapStates = [(3,0), (3,1),(3,2), (3,3)], policy=policyTableC)
    
    print(p_traj(trajectoryToGoalC,beta,gamma,transition,rewardC,optimalValuesC))
    plt.plot([2,3,4,5,6],p_traj(trajectoryToGoalC,beta,gamma,transition,rewardC,optimalValuesC))
    plt.ylabel('Probabilty of goal C (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol C without gap')
    plt.show()
    
    #reward C Gap part
    performValueIteration = ValueIteration(transition, rewardCGap, valueTable, convergenceTolerance, gamma)
    optimalValuesCG, policyTableCG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState = (1,5) , trapStates = [(3,0), (3,2), (3,3)],valueTable=optimalValuesCG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState = (1,5) , trapStates = [(3,0), (3,2), (3,3)], policy=policyTableCG)
    
    print(p_traj(trajectoryToGoalC,beta,gamma,transition,rewardCGap,optimalValuesCG))
    plt.plot([2,3,4,5,6],p_traj(trajectoryToGoalC,beta,gamma,transition,rewardCGap,optimalValuesCG))
    plt.ylabel('Probabilty of goal C Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol C with gap')
    plt.show()

if __name__ == '__main__':
    main()
66d96c42c8b814fcf38f8fd18215e6e29efbc810
<mask token>


class ValueIteration(object):

    def __init__(self, transitionTable, rewardTable, valueTable,
        convergenceTolerance, gamma):
        self.transitionTable = transitionTable
        self.rewardTable = rewardTable
        self.valueTable = valueTable
        self.convergenceTolerance = convergenceTolerance
        self.gamma = gamma

    def __call__(self):
        ValueTable = self.valueTable
        tempValueTable = copy.copy(ValueTable)
        delta = 1
        while delta >= self.convergenceTolerance:
            delta = 0
            for s in ValueTable:
                v = ValueTable[s]
                lib_s = self.transitionTable[s]
                max_a = 0
                for a in lib_s:
                    sum_sr = 0
                    lib_a = lib_s[a]
                    for ns in lib_a:
                        sum_sr = sum_sr + lib_a[ns] * (self.rewardTable[s][
                            a][ns] + self.gamma * tempValueTable[ns])
                    max_a = max(max_a, sum_sr)
                ValueTable[s] = max_a
                delta = max(delta, abs(v - ValueTable[s]))
            tempValueTable = copy.copy(ValueTable)
        policyTable = {}
        for s in ValueTable:
            lib_s = self.transitionTable[s]
            pi_s = 0, 0
            vs = 0
            prob_ns = 0
            for a in lib_s:
                sum_sr = 0
                lib_a = lib_s[a]
                for ns in lib_a:
                    sum_sr = sum_sr + lib_a[ns] * (self.rewardTable[s][a][
                        ns] + self.gamma * ValueTable[ns])
                if sum_sr > vs:
                    pi_s = a
                    vs = sum_sr
                    pi_ns = 0, 0
                    v_ns = 0
                    for ns in lib_a:
                        if ValueTable[ns] > v_ns:
                            pi_ns = ns
                            v_ns = ValueTable[ns]
                            prob_ns = lib_a[ns]
            policyTable[s] = {pi_s: prob_ns}
        return [ValueTable, policyTable]


def visualizeValueTable(gridWidth, gridHeight, goalState, trapStates,
    valueTable):
    gridAdjust = 0.5
    gridScale = 1.5
    xs = np.linspace(-gridAdjust, gridWidth - gridAdjust, gridWidth + 1)
    ys = np.linspace(-gridAdjust, gridHeight - gridAdjust, gridHeight + 1)
    plt.rcParams['figure.figsize'] = [gridWidth * gridScale, gridHeight *
        gridScale]
    ax = plt.gca(frameon=False, xticks=range(gridWidth), yticks=range(
        gridHeight))
    ax.add_patch(Rectangle((goalState[0] - gridAdjust, goalState[1] -
        gridAdjust), 1, 1, fill=True, color='green', alpha=0.1))
    for trapx, trapy in trapStates:
        ax.add_patch(Rectangle((trapx - gridAdjust, trapy - gridAdjust), 1,
            1, fill=True, color='black', alpha=0.1))
    for x in xs:
        plt.plot([x, x], [ys[0], ys[-1]], color='black')
    for y in ys:
        plt.plot([xs[0], xs[-1]], [y, y], color='black')
    for (statex, statey), val in valueTable.items():
        plt.text(statex - 0.2, statey, str(round(val, 3)))
    plt.show()


def visualizePolicy(gridWidth, gridHeight, goalState, trapStates, policy):
    gridAdjust = 0.5
    gridScale = 1.5
    arrowScale = 0.5
    xs = np.linspace(-gridAdjust, gridWidth - gridAdjust, gridWidth + 1)
    ys = np.linspace(-gridAdjust, gridHeight - gridAdjust, gridHeight + 1)
    plt.rcParams['figure.figsize'] = [gridWidth * gridScale, gridHeight *
        gridScale]
    ax = plt.gca(frameon=False, xticks=range(gridWidth), yticks=range(
        gridHeight))
    ax.add_patch(Rectangle((goalState[0] - gridAdjust, goalState[1] -
        gridAdjust), 1, 1, fill=True, color='green', alpha=0.1))
    for trapx, trapy in trapStates:
        ax.add_patch(Rectangle((trapx - gridAdjust, trapy - gridAdjust), 1,
            1, fill=True, color='black', alpha=0.1))
    for x in xs:
        plt.plot([x, x], [ys[0], ys[-1]], color='black')
    for y in ys:
        plt.plot([xs[0], xs[-1]], [y, y], color='black')
    for (statex, statey), actionDict in policy.items():
        for (optimalActionX, optimalActionY), actionProb in actionDict.items():
            plt.arrow(statex, statey, optimalActionX * actionProb *
                arrowScale, optimalActionY * actionProb * arrowScale,
                head_width=0.05 * actionProb, head_length=0.1 * actionProb)
    plt.show()


def viewDictionaryStructure(d, levels, indent=0):
    for key, value in d.items():
        print('\t' * indent + str(levels[indent]) + ': ' + str(key))
        if isinstance(value, dict):
            viewDictionaryStructure(value, levels, indent + 1)
        else:
            print('\t' * (indent + 1) + str(levels[indent + 1]) + ': ' +
                str(value))


<mask token>


def p_stn_st(st, stn, beta, gamma, transitTable, rewardTable, valueTable):
    lib_s = transitTable[st]
    p = 0
    for at in lib_s:
        if stn in lib_s[at]:
            p = p + lib_s[at][stn] * pias(st, at, beta, gamma, transitTable,
                rewardTable, valueTable)
    return p


def pias(st, at, beta, gamma, transitTable, rewardTable, valueTable):
    return math.log(beta * q(st, at, gamma, transitTable, rewardTable,
        valueTable))


<mask token>


def main():
    gamma = 0.95
    beta = 0.4
    convergenceTolerance = 1e-06
    transition = {(0, 0): {(1, 0): {(1, 0): 1}, (0, 1): {(0, 1): 1}, (-1, 0
        ): {(0, 0): 1}, (0, -1): {(0, 0): 1}, (-1, 1): {(0, 0): 1}, (1, -1):
        {(0, 0): 1}, (1, 1): {(1, 1): 1}, (-1, -1): {(0, 0): 1}}, (0, 1): {
        (1, 0): {(1, 1): 1}, (0, 1): {(0, 2): 1}, (-1, 0): {(0, 1): 1}, (0,
        -1): {(0, 0): 1}, (-1, 1): {(0, 1): 1}, (1, -1): {(1, 0): 1}, (1, 1
        ): {(1, 2): 1}, (-1, -1): {(0, 1): 1}}, (0, 2): {(1, 0): {(1, 2): 1
        }, (0, 1): {(0, 3): 1}, (-1, 0): {(0, 2): 1}, (0, -1): {(0, 1): 1},
        (-1, 1): {(0, 2): 1}, (1, -1): {(1, 1): 1}, (1, 1): {(1, 3): 1}, (-
        1, -1): {(0, 2): 1}}, (0, 3): {(1, 0): {(1, 3): 1}, (0, 1): {(0, 4):
        1}, (-1, 0): {(0, 3): 1}, (0, -1): {(0, 2): 1}, (-1, 1): {(0, 3): 1
        }, (1, -1): {(1, 2): 1}, (1, 1): {(1, 4): 1}, (-1, -1): {(0, 3): 1}
        }, (0, 4): {(1, 0): {(1, 4): 1}, (0, 1): {(0, 5): 1}, (-1, 0): {(0,
        4): 1}, (0, -1): {(0, 3): 1}, (-1, 1): {(0, 4): 1}, (1, -1): {(1, 3
        ): 1}, (1, 1): {(1, 5): 1}, (-1, -1): {(0, 4): 1}}, (0, 5): {(1, 0):
        {(1, 5): 1}, (0, 1): {(0, 5): 1}, (-1, 0): {(0, 5): 1}, (0, -1): {(
        0, 4): 1}, (-1, 1): {(0, 5): 1}, (1, -1): {(1, 4): 1}, (1, 1): {(0,
        5): 1}, (-1, -1): {(0, 5): 1}}, (1, 0): {(1, 0): {(2, 0): 1}, (0, 1
        ): {(1, 1): 1}, (-1, 0): {(0, 0): 1}, (0, -1): {(1, 0): 1}, (-1, 1):
        {(0, 1): 1}, (1, -1): {(1, 0): 1}, (1, 1): {(2, 1): 1}, (-1, -1): {
        (1, 0): 1}}, (1, 1): {(1, 0): {(2, 1): 1}, (0, 1): {(1, 2): 1}, (-1,
        0): {(0, 1): 1}, (0, -1): {(1, 0): 1}, (-1, 1): {(0, 2): 1}, (1, -1
        ): {(2, 0): 1}, (1, 1): {(2, 2): 1}, (-1, -1): {(0, 0): 1}}, (1, 2):
        {(1, 0): {(2, 2): 1}, (0, 1): {(1, 3): 1}, (-1, 0): {(0, 2): 1}, (0,
        -1): {(1, 1): 1}, (-1, 1): {(0, 3): 1}, (1, -1): {(2, 1): 1}, (1, 1
        ): {(2, 3): 1}, (-1, -1): {(0, 1): 1}}, (1, 3): {(1, 0): {(2, 3): 1
        }, (0, 1): {(1, 4): 1}, (-1, 0): {(0, 3): 1}, (0, -1): {(1, 2): 1},
        (-1, 1): {(0, 4): 1}, (1, -1): {(2, 2): 1}, (1, 1): {(2, 4): 1}, (-
        1, -1): {(0, 2): 1}}, (1, 4): {(1, 0): {(2, 4): 1}, (0, 1): {(1, 5):
        1}, (-1, 0): {(0, 4): 1}, (0, -1): {(1, 3): 1}, (-1, 1): {(0, 5): 1
        }, (1, -1): {(2, 3): 1}, (1, 1): {(2, 5): 1}, (-1, -1): {(0, 3): 1}
        }, (1, 5): {(1, 0): {(2, 5): 1}, (0, 1): {(1, 5): 1}, (-1, 0): {(0,
        5): 1}, (0, -1): {(1, 4): 1}, (-1, 1): {(1, 5): 1}, (1, -1): {(2, 4
        ): 1}, (1, 1): {(1, 5): 1}, (-1, -1): {(0, 4): 1}}, (2, 0): {(1, 0):
        {(3, 0): 1}, (0, 1): {(2, 1): 1}, (-1, 0): {(1, 0): 1}, (0, -1): {(
        2, 0): 1}, (-1, 1): {(1, 1): 1}, (1, -1): {(2, 0): 1}, (1, 1): {(3,
        1): 1}, (-1, -1): {(2, 0): 1}}, (2, 1): {(1, 0): {(3, 1): 1}, (0, 1
        ): {(2, 2): 1}, (-1, 0): {(1, 1): 1}, (0, -1): {(2, 0): 1}, (-1, 1):
        {(1, 2): 1}, (1, -1): {(3, 0): 1}, (1, 1): {(3, 2): 1}, (-1, -1): {
        (1, 0): 1}}, (2, 2): {(1, 0): {(3, 2): 1}, (0, 1): {(2, 3): 1}, (-1,
        0): {(1, 2): 1}, (0, -1): {(2, 1): 1}, (-1, 1): {(1, 3): 1}, (1, -1
        ): {(3, 1): 1}, (1, 1): {(3, 3): 1}, (-1, -1): {(1, 1): 1}}, (2, 3):
        {(1, 0): {(3, 3): 1}, (0, 1): {(2, 4): 1}, (-1, 0): {(1, 3): 1}, (0,
        -1): {(2, 2): 1}, (-1, 1): {(1, 4): 1}, (1, -1): {(3, 2): 1}, (1, 1
        ): {(3, 4): 1}, (-1, -1): {(1, 2): 1}}, (2, 4): {(1, 0): {(3, 4): 1
        }, (0, 1): {(2, 5): 1}, (-1, 0): {(1, 4): 1}, (0, -1): {(2, 3): 1},
        (-1, 1): {(1, 5): 1}, (1, -1): {(3, 3): 1}, (1, 1): {(3, 5): 1}, (-
        1, -1): {(1, 3): 1}}, (2, 5): {(1, 0): {(3, 5): 1}, (0, 1): {(2, 5):
        1}, (-1, 0): {(1, 5): 1}, (0, -1): {(2, 4): 1}, (-1, 1): {(2, 5): 1
        }, (1, -1): {(3, 4): 1}, (1, 1): {(2, 5): 1}, (-1, -1): {(1, 4): 1}
        }, (3, 0): {(1, 0): {(4, 0): 1}, (0, 1): {(3, 1): 1}, (-1, 0): {(2,
        0): 1}, (0, -1): {(3, 0): 1}, (-1, 1): {(2, 1): 1}, (1, -1): {(3, 0
        ): 1}, (1, 1): {(4, 1): 1}, (-1, -1): {(3, 0): 1}}, (3, 1): {(1, 0):
        {(4, 1): 1}, (0, 1): {(3, 2): 1}, (-1, 0): {(2, 1): 1}, (0, -1): {(
        3, 0): 1}, (-1, 1): {(2, 2): 1}, (1, -1): {(4, 0): 1}, (1, 1): {(4,
        2): 1}, (-1, -1): {(2, 0): 1}}, (3, 2): {(1, 0): {(4, 2): 1}, (0, 1
        ): {(3, 3): 1}, (-1, 0): {(2, 2): 1}, (0, -1): {(3, 1): 1}, (-1, 1):
        {(2, 3): 1}, (1, -1): {(4, 1): 1}, (1, 1): {(4, 3): 1}, (-1, -1): {
        (2, 1): 1}}, (3, 3): {(1, 0): {(4, 3): 1}, (0, 1): {(3, 4): 1}, (-1,
        0): {(2, 3): 1}, (0, -1): {(3, 2): 1}, (-1, 1): {(2, 4): 1}, (1, -1
        ): {(4, 2): 1}, (1, 1): {(4, 4): 1}, (-1, -1): {(2, 2): 1}}, (3, 4):
        {(1, 0): {(4, 4): 1}, (0, 1): {(3, 5): 1}, (-1, 0): {(2, 4): 1}, (0,
        -1): {(3, 3): 1}, (-1, 1): {(2, 5): 1}, (1, -1): {(4, 3): 1}, (1, 1
        ): {(4, 5): 1}, (-1, -1): {(2, 3): 1}}, (3, 5): {(1, 0): {(4, 5): 1
        }, (0, 1): {(3, 5): 1}, (-1, 0): {(2, 5): 1}, (0, -1): {(3, 4): 1},
        (-1, 1): {(3, 5): 1}, (1, -1): {(4, 4): 1}, (1, 1): {(3, 5): 1}, (-
        1, -1): {(2, 4): 1}}, (4, 0): {(1, 0): {(5, 0): 1}, (0, 1): {(4, 1):
        1}, (-1, 0): {(3, 0): 1}, (0, -1): {(4, 0): 1}, (-1, 1): {(3, 1): 1
        }, (1, -1): {(4, 0): 1}, (1, 1): {(5, 1): 1}, (-1, -1): {(4, 0): 1}
        }, (4, 1): {(1, 0): {(5, 1): 1}, (0, 1): {(4, 2): 1}, (-1, 0): {(3,
        1): 1}, (0, -1): {(4, 0): 1}, (-1, 1): {(3, 2): 1}, (1, -1): {(5, 0
        ): 1}, (1, 1): {(5, 2): 1}, (-1, -1): {(3, 0): 1}}, (4, 2): {(1, 0):
        {(5, 2): 1}, (0, 1): {(4, 3): 1}, (-1, 0): {(3, 2): 1}, (0, -1): {(
        4, 1): 1}, (-1, 1): {(3, 3): 1}, (1, -1): {(5, 1): 1}, (1, 1): {(5,
        3): 1}, (-1, -1): {(3, 1): 1}}, (4, 3): {(1, 0): {(5, 3): 1}, (0, 1
        ): {(4, 4): 1}, (-1, 0): {(3, 3): 1}, (0, -1): {(4, 2): 1}, (-1, 1):
        {(3, 4): 1}, (1, -1): {(5, 2): 1}, (1, 1): {(5, 4): 1}, (-1, -1): {
        (3, 2): 1}}, (4, 4): {(1, 0): {(5, 4): 1}, (0, 1): {(4, 5): 1}, (-1,
        0): {(3, 4): 1}, (0, -1): {(4, 3): 1}, (-1, 1): {(3, 5): 1}, (1, -1
        ): {(5, 3): 1}, (1, 1): {(5, 5): 1}, (-1, -1): {(3, 3): 1}}, (4, 5):
        {(1, 0): {(5, 5): 1}, (0, 1): {(4, 5): 1}, (-1, 0): {(3, 5): 1}, (0,
        -1): {(4, 4): 1}, (-1, 1): {(4, 5): 1}, (1, -1): {(5, 4): 1}, (1, 1
        ): {(4, 5): 1}, (-1, -1): {(3, 4): 1}}, (5, 0): {(1, 0): {(6, 0): 1
        }, (0, 1): {(5, 1): 1}, (-1, 0): {(4, 0): 1}, (0, -1): {(5, 0): 1},
        (-1, 1): {(4, 1): 1}, (1, -1): {(5, 0): 1}, (1, 1): {(6, 1): 1}, (-
        1, -1): {(5, 0): 1}}, (5, 1): {(1, 0): {(6, 1): 1}, (0, 1): {(5, 2):
        1}, (-1, 0): {(4, 1): 1}, (0, -1): {(5, 0): 1}, (-1, 1): {(4, 2): 1
        }, (1, -1): {(6, 0): 1}, (1, 1): {(6, 2): 1}, (-1, -1): {(4, 0): 1}
        }, (5, 2): {(1, 0): {(6, 2): 1}, (0, 1): {(5, 3): 1}, (-1, 0): {(4,
        2): 1}, (0, -1): {(5, 1): 1}, (-1, 1): {(4, 3): 1}, (1, -1): {(6, 1
        ): 1}, (1, 1): {(6, 3): 1}, (-1, -1): {(4, 1): 1}}, (5, 3): {(1, 0):
        {(6, 3): 1}, (0, 1): {(5, 4): 1}, (-1, 0): {(4, 3): 1}, (0, -1): {(
        5, 2): 1}, (-1, 1): {(4, 4): 1}, (1, -1): {(6, 2): 1}, (1, 1): {(6,
        4): 1}, (-1, -1): {(4, 2): 1}}, (5, 4): {(1, 0): {(6, 4): 1}, (0, 1
        ): {(5, 5): 1}, (-1, 0): {(4, 4): 1}, (0, -1): {(5, 3): 1}, (-1, 1):
        {(4, 5): 1}, (1, -1): {(6, 3): 1}, (1, 1): {(6, 5): 1}, (-1, -1): {
        (4, 3): 1}}, (5, 5): {(1, 0): {(6, 5): 1}, (0, 1): {(5, 5): 1}, (-1,
        0): {(4, 5): 1}, (0, -1): {(5, 4): 1}, (-1, 1): {(5, 5): 1}, (1, -1
        ): {(6, 4): 1}, (1, 1): {(5, 5): 1}, (-1, -1): {(4, 4): 1}}, (6, 0):
        {(1, 0): {(6, 0): 1}, (0, 1): {(6, 1): 1}, (-1, 0): {(5, 0): 1}, (0,
        -1): {(6, 0): 1}, (-1, 1): {(5, 1): 1}, (1, -1): {(6, 0): 1}, (1, 1
        ): {(6, 0): 1}, (-1, -1): {(6, 0): 1}}, (6, 1): {(1, 0): {(6, 1): 1
        }, (0, 1): {(6, 2): 1}, (-1, 0): {(5, 1): 1}, (0, -1): {(6, 0): 1},
        (-1, 1): {(5, 2): 1}, (1, -1): {(6, 1): 1}, (1, 1): {(6, 1): 1}, (-
        1, -1): {(5, 0): 1}}, (6, 2): {(1, 0): {(6, 2): 1}, (0, 1): {(6, 3):
        1}, (-1, 0): {(5, 2): 1}, (0, -1): {(6, 1): 1}, (-1, 1): {(5, 3): 1
        }, (1, -1): {(6, 2): 1}, (1, 1): {(6, 2): 1}, (-1, -1): {(5, 1): 1}
        }, (6, 3): {(1, 0): {(6, 3): 1}, (0, 1): {(6, 4): 1}, (-1, 0): {(5,
        3): 1}, (0, -1): {(6, 2): 1}, (-1, 1): {(5, 4): 1}, (1, -1): {(6, 3
        ): 1}, (1, 1): {(6, 3): 1}, (-1, -1): {(5, 2): 1}}, (6, 4): {(1, 0):
        {(6, 4): 1}, (0, 1): {(6, 5): 1}, (-1, 0): {(5, 4): 1}, (0, -1): {(
        6, 3): 1}, (-1, 1): {(5, 5): 1}, (1, -1): {(6, 4): 1}, (1, 1): {(6,
        4): 1}, (-1, -1): {(5, 3): 1}}, (6, 5): {(1, 0): {(6, 5): 1}, (0, 1
        ): {(6, 5): 1}, (-1, 0): {(5, 5): 1}, (0, -1): {(6, 4): 1}, (-1, 1):
        {(6, 5): 1}, (1, -1): {(6, 5): 1}, (1, 1): {(6, 5): 1}, (-1, -1): {
        (5, 4): 1}}}
    valueTable = {(0, 0): 0, (0, 1): 0, (0, 2): 0, (0, 3): 0, (0, 4): 0, (0,
        5): 0, (1, 0): 0, (1, 1): 0, (1, 2): 0, (1, 3): 0, (1, 4): 0, (1, 5
        ): 0, (2, 0): 0, (2, 1): 0, (2, 2): 0, (2, 3): 0, (2, 4): 0, (2, 5):
        0, (3, 0): 0, (3, 1): 0, (3, 2): 0, (3, 3): 0, (3, 4): 0, (3, 5): 0,
        (4, 0): 0, (4, 1): 0, (4, 2): 0, (4, 3): 0, (4, 4): 0, (4, 5): 0, (
        5, 0): 0, (5, 1): 0, (5, 2): 0, (5, 3): 0, (5, 4): 0, (5, 5): 0, (6,
        0): 0, (6, 1): 0, (6, 2): 0, (6, 3): 0, (6, 4): 0, (6, 5): 0}
    trajectoryToGoalA = [(0, 0), (1, 1), (1, 2), (2, 3), (3, 4), (4, 4), (5,
        4), (6, 4)]
    trajectoryToGoalB = [(0, 0), (1, 1), (2, 2), (2, 3), (3, 4), (4, 3), (5,
        2), (6, 1)]
    trajectoryToGoalC = [(0, 0), (0, 1), (1, 2), (1, 3), (1, 4), (1, 5)]
    rewardA = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0}, (-1,
        0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1}, (1,
        -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, -1):
        {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2): -
        1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1): {(0,
        1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 2): -
        1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0): {(1,
        2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, -1):
        {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -100}, (0, 1): {(3, 2): -100}, (-1, 0):
        {(2, 1): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 2): -100}, (
        1, -1): {(4, 0): -100}, (1, 1): {(4, 2): -100}, (-1, -1): {(2, 0): 
        -100}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3, 3): -100}, (-
        1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1): {(2, 3): -
        100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100}, (-1, -1): {(
        2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1): {(3, 4): -
        100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (-1, 1): {(
        2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -100}, (-1,
        -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (0, 1): {(3,
        5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -1.0}, (-1, 1
        ): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): 10}, (-1, 0): {(5, 4): 10}, (0, -1): {(6, 3):
        10}, (-1, 1): {(5, 5): 10}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4):
        -1}, (-1, -1): {(5, 3): 10}}, (6, 5): {(1, 0): {(6, 5): -1}, (0, 1):
        {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1,
        1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1,
        -1): {(5, 4): -1.4142135623730951}}}
    rewardB = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0}, (-1,
        0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1}, (1,
        -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, -1):
        {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2): -
        1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1): {(0,
        1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 2): -
        1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0): {(1,
        2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, -1):
        {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -100}, (0, 1): {(3, 2): -100}, (-1, 0):
        {(2, 1): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 2): -100}, (
        1, -1): {(4, 0): -100}, (1, 1): {(4, 2): -100}, (-1, -1): {(2, 0): 
        -100}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3, 3): -100}, (-
        1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1): {(2, 3): -
        100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100}, (-1, -1): {(
        2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1): {(3, 4): -
        100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (-1, 1): {(
        2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -100}, (-1,
        -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (0, 1): {(3,
        5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -1.0}, (-1, 1
        ): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): 10}, (-1, 0):
        {(5, 1): 10}, (0, -1): {(6, 0): 10}, (-1, 1): {(5, 2): 10}, (1, -1):
        {(6, 1): -1}, (1, 1): {(6, 1): -1}, (-1, -1): {(5, 0): 10}}, (6, 2):
        {(1, 0): {(6, 2): -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -
        1.0}, (0, -1): {(6, 1): -1.0}, (-1, 1): {(5, 3): -
        1.4142135623730951}, (1, -1): {(6, 2): -1}, (1, 1): {(6, 2): -1}, (
        -1, -1): {(5, 1): -1.4142135623730951}}, (6, 3): {(1, 0): {(6, 3): 
        -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5, 3): -1.0}, (0, -1): {(6,
        2): -1.0}, (-1, 1): {(5, 4): -1.4142135623730951}, (1, -1): {(6, 3):
        -1}, (1, 1): {(6, 3): -1}, (-1, -1): {(5, 2): -1.4142135623730951}},
        (6, 4): {(1, 0): {(6, 4): -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5,
        4): -1.0}, (0, -1): {(6, 3): -1.0}, (-1, 1): {(5, 5): -
        1.4142135623730951}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4): -1}, (
        -1, -1): {(5, 3): -1.4142135623730951}}, (6, 5): {(1, 0): {(6, 5): 
        -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4
        ): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6,
        5): -1}, (-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardC = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0}, (-1,
        0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1}, (1,
        -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, -1):
        {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2): -
        1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1): {(0,
        1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 2): -
        1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0): {(1,
        2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, -1):
        {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): 10}, (
        0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): 10}, (0, -1): {(1, 4): 10},
        (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): 10}, (1, 1): {(1, 5): -1},
        (-1, -1): {(0, 4): 10}}, (2, 0): {(1, 0): {(3, 0): -1.0}, (0, 1): {
        (2, 1): -1.0}, (-1, 0): {(1, 0): -1.0}, (0, -1): {(2, 0): -1}, (-1,
        1): {(1, 1): -1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {
        (3, 1): -1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1,
        0): {(3, 1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0},
        (0, -1): {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1,
        -1): {(3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -
        1.4142135623730951}, (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 
        2): {(1, 0): {(3, 2): -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 
        2): -1.0}, (0, -1): {(2, 1): -1.0}, (-1, 1): {(1, 3): -
        1.4142135623730951}, (1, -1): {(3, 1): -1.4142135623730951}, (1, 1):
        {(3, 3): -1.4142135623730951}, (-1, -1): {(1, 1): -
        1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -1.0}, (0, 1): {(2,
        4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2, 2): -1.0}, (-1, 1
        ): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2): -
        1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -1
        ): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -100}, (0, 1): {(3, 2): -100}, (-1, 0):
        {(2, 1): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 2): -100}, (
        1, -1): {(4, 0): -100}, (1, 1): {(4, 2): -100}, (-1, -1): {(2, 0): 
        -100}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3, 3): -100}, (-
        1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1): {(2, 3): -
        100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100}, (-1, -1): {(
        2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1): {(3, 4): -
        100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (-1, 1): {(
        2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -100}, (-1,
        -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (0, 1): {(3,
        5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -1.0}, (-1, 1
        ): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5, 4): -1.0}, (0, -1): {(6,
        3): -1.0}, (-1, 1): {(5, 5): -1.4142135623730951}, (1, -1): {(6, 4):
        -1}, (1, 1): {(6, 4): -1}, (-1, -1): {(5, 3): -1.4142135623730951}},
        (6, 5): {(1, 0): {(6, 5): -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 
        5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1):
        {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1, -1): {(5, 4): -
        1.4142135623730951}}}
    rewardAGap = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0},
        (-1, 0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1},
        (1, -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, 
        -1): {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2
        ): -1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1):
        {(0, 1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 
        2): -1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0):
        {(1, 2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, 
        -1): {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -1.0}, (0, 1): {(3, 2): -1.0}, (-1, 0):
        {(2, 1): -1.0}, (0, -1): {(3, 0): -1.0}, (-1, 1): {(2, 2): -
        1.4142135623730951}, (1, -1): {(4, 0): -1.4142135623730951}, (1, 1):
        {(4, 2): -1.4142135623730951}, (-1, -1): {(2, 0): -
        1.4142135623730951}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3,
        3): -100}, (-1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1
        ): {(2, 3): -100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100},
        (-1, -1): {(2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1):
        {(3, 4): -100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (
        -1, 1): {(2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -
        100}, (-1, -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (
        0, 1): {(3, 5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -
        1.0}, (-1, 1): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): 10}, (-1, 0): {(5, 4): 10}, (0, -1): {(6, 3):
        10}, (-1, 1): {(5, 5): 10}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4):
        -1}, (-1, -1): {(5, 3): 10}}, (6, 5): {(1, 0): {(6, 5): -1}, (0, 1):
        {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1,
        1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1,
        -1): {(5, 4): -1.4142135623730951}}}
    rewardBGap = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0},
        (-1, 0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1},
        (1, -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, 
        -1): {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2
        ): -1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1):
        {(0, 1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 
        2): -1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0):
        {(1, 2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, 
        -1): {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -1.0}, (0, 1): {(3, 2): -1.0}, (-1, 0):
        {(2, 1): -1.0}, (0, -1): {(3, 0): -1.0}, (-1, 1): {(2, 2): -
        1.4142135623730951}, (1, -1): {(4, 0): -1.4142135623730951}, (1, 1):
        {(4, 2): -1.4142135623730951}, (-1, -1): {(2, 0): -
        1.4142135623730951}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3,
        3): -100}, (-1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1
        ): {(2, 3): -100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100},
        (-1, -1): {(2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1):
        {(3, 4): -100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (
        -1, 1): {(2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -
        100}, (-1, -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (
        0, 1): {(3, 5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -
        1.0}, (-1, 1): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): 10}, (-1, 0):
        {(5, 1): 10}, (0, -1): {(6, 0): 10}, (-1, 1): {(5, 2): 10}, (1, -1):
        {(6, 1): -1}, (1, 1): {(6, 1): -1}, (-1, -1): {(5, 0): 10}}, (6, 2):
        {(1, 0): {(6, 2): -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -
        1.0}, (0, -1): {(6, 1): -1.0}, (-1, 1): {(5, 3): -
        1.4142135623730951}, (1, -1): {(6, 2): -1}, (1, 1): {(6, 2): -1}, (
        -1, -1): {(5, 1): -1.4142135623730951}}, (6, 3): {(1, 0): {(6, 3): 
        -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5, 3): -1.0}, (0, -1): {(6,
        2): -1.0}, (-1, 1): {(5, 4): -1.4142135623730951}, (1, -1): {(6, 3):
        -1}, (1, 1): {(6, 3): -1}, (-1, -1): {(5, 2): -1.4142135623730951}},
        (6, 4): {(1, 0): {(6, 4): -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5,
        4): -1.0}, (0, -1): {(6, 3): -1.0}, (-1, 1): {(5, 5): -
        1.4142135623730951}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4): -1}, (
        -1, -1): {(5, 3): -1.4142135623730951}}, (6, 5): {(1, 0): {(6, 5): 
        -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4
        ): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6,
        5): -1}, (-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardCGap = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0},
        (-1, 0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1},
        (1, -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, 
        -1): {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2
        ): -1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1):
        {(0, 1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 
        2): -1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0):
        {(1, 2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, 
        -1): {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): 10}, (
        0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): 10}, (0, -1): {(1, 4): 10},
        (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): 10}, (1, 1): {(1, 5): -1},
        (-1, -1): {(0, 4): 10}}, (2, 0): {(1, 0): {(3, 0): -1.0}, (0, 1): {
        (2, 1): -1.0}, (-1, 0): {(1, 0): -1.0}, (0, -1): {(2, 0): -1}, (-1,
        1): {(1, 1): -1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {
        (3, 1): -1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1,
        0): {(3, 1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0},
        (0, -1): {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1,
        -1): {(3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -
        1.4142135623730951}, (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 
        2): {(1, 0): {(3, 2): -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 
        2): -1.0}, (0, -1): {(2, 1): -1.0}, (-1, 1): {(1, 3): -
        1.4142135623730951}, (1, -1): {(3, 1): -1.4142135623730951}, (1, 1):
        {(3, 3): -1.4142135623730951}, (-1, -1): {(1, 1): -
        1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -1.0}, (0, 1): {(2,
        4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2, 2): -1.0}, (-1, 1
        ): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2): -
        1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -1
        ): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -1.0}, (0, 1): {(3, 2): -1.0}, (-1, 0):
        {(2, 1): -1.0}, (0, -1): {(3, 0): -1.0}, (-1, 1): {(2, 2): -
        1.4142135623730951}, (1, -1): {(4, 0): -1.4142135623730951}, (1, 1):
        {(4, 2): -1.4142135623730951}, (-1, -1): {(2, 0): -
        1.4142135623730951}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3,
        3): -100}, (-1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1
        ): {(2, 3): -100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100},
        (-1, -1): {(2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1):
        {(3, 4): -100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (
        -1, 1): {(2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -
        100}, (-1, -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (
        0, 1): {(3, 5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -
        1.0}, (-1, 1): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5, 4): -1.0}, (0, -1): {(6,
        3): -1.0}, (-1, 1): {(5, 5): -1.4142135623730951}, (1, -1): {(6, 4):
        -1}, (1, 1): {(6, 4): -1}, (-1, -1): {(5, 3): -1.4142135623730951}},
        (6, 5): {(1, 0): {(6, 5): -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 
        5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1):
        {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1, -1): {(5, 4): -
        1.4142135623730951}}}
    performValueIteration = ValueIteration(transition, rewardA, valueTable,
        convergenceTolerance, gamma)
    optimalValuesA, policyTableA = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 4),
        trapStates=[(3, 0), (3, 1), (3, 2), (3, 3)], valueTable=optimalValuesA)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 4), trapStates
        =[(3, 0), (3, 1), (3, 2), (3, 3)], policy=policyTableA)
    print(p_traj(trajectoryToGoalA, beta, gamma, transition, rewardA,
        optimalValuesA))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalA, beta, gamma,
        transition, rewardA, optimalValuesA))
    plt.ylabel('Probabilty of goal A (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol A without gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardAGap,
        valueTable, convergenceTolerance, gamma)
    optimalValuesAG, policyTableAG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 4),
        trapStates=[(3, 0), (3, 2), (3, 3)], valueTable=optimalValuesAG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 4), trapStates
        =[(3, 0), (3, 2), (3, 3)], policy=policyTableAG)
    print(p_traj(trajectoryToGoalA, beta, gamma, transition, rewardAGap,
        optimalValuesAG))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalA, beta, gamma,
        transition, rewardAGap, optimalValuesAG))
    plt.ylabel('Probabilty of goal A Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol A with gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardB, valueTable,
        convergenceTolerance, gamma)
    optimalValuesB, policyTableB = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 1),
        trapStates=[(3, 0), (3, 1), (3, 2), (3, 3)], valueTable=optimalValuesB)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 1), trapStates
        =[(3, 0), (3, 1), (3, 2), (3, 3)], policy=policyTableB)
    print(p_traj(trajectoryToGoalB, beta, gamma, transition, rewardB,
        optimalValuesB))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalB, beta, gamma,
        transition, rewardB, optimalValuesB))
    plt.ylabel('Probabilty of goal B (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol B without gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardBGap,
        valueTable, convergenceTolerance, gamma)
    optimalValuesBG, policyTableBG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 1),
        trapStates=[(3, 0), (3, 2), (3, 3)], valueTable=optimalValuesBG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 1), trapStates
        =[(3, 0), (3, 2), (3, 3)], policy=policyTableBG)
    print(p_traj(trajectoryToGoalB, beta, gamma, transition, rewardBGap,
        optimalValuesBG))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalB, beta, gamma,
        transition, rewardBGap, optimalValuesBG))
    plt.ylabel('Probabilty of goal B Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol B with gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardC, valueTable,
        convergenceTolerance, gamma)
    optimalValuesC, policyTableC = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(1, 5),
        trapStates=[(3, 0), (3, 1), (3, 2), (3, 3)], valueTable=optimalValuesC)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(1, 5), trapStates
        =[(3, 0), (3, 1), (3, 2), (3, 3)], policy=policyTableC)
    print(p_traj(trajectoryToGoalC, beta, gamma, transition, rewardC,
        optimalValuesC))
    plt.plot([2, 3, 4, 5, 6], p_traj(trajectoryToGoalC, beta, gamma,
        transition, rewardC, optimalValuesC))
    plt.ylabel('Probabilty of goal C (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol C without gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardCGap,
        valueTable, convergenceTolerance, gamma)
    optimalValuesCG, policyTableCG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(1, 5),
        trapStates=[(3, 0), (3, 2), (3, 3)], valueTable=optimalValuesCG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(1, 5), trapStates
        =[(3, 0), (3, 2), (3, 3)], policy=policyTableCG)
    print(p_traj(trajectoryToGoalC, beta, gamma, transition, rewardCGap,
        optimalValuesCG))
    plt.plot([2, 3, 4, 5, 6], p_traj(trajectoryToGoalC, beta, gamma,
        transition, rewardCGap, optimalValuesCG))
    plt.ylabel('Probabilty of goal C Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol C with gap')
    plt.show()


<mask token>

<mask token>


class ValueIteration(object):

    def __init__(self, transitionTable, rewardTable, valueTable,
        convergenceTolerance, gamma):
        self.transitionTable = transitionTable
        self.rewardTable = rewardTable
        self.valueTable = valueTable
        self.convergenceTolerance = convergenceTolerance
        self.gamma = gamma

    def __call__(self):
        ValueTable = self.valueTable
        tempValueTable = copy.copy(ValueTable)
        delta = 1
        while delta >= self.convergenceTolerance:
            delta = 0
            for s in ValueTable:
                v = ValueTable[s]
                lib_s = self.transitionTable[s]
                max_a = 0
                for a in lib_s:
                    sum_sr = 0
                    lib_a = lib_s[a]
                    for ns in lib_a:
                        sum_sr = sum_sr + lib_a[ns] * (self.rewardTable[s][
                            a][ns] + self.gamma * tempValueTable[ns])
                    max_a = max(max_a, sum_sr)
                ValueTable[s] = max_a
                delta = max(delta, abs(v - ValueTable[s]))
            tempValueTable = copy.copy(ValueTable)
        policyTable = {}
        for s in ValueTable:
            lib_s = self.transitionTable[s]
            pi_s = 0, 0
            vs = 0
            prob_ns = 0
            for a in lib_s:
                sum_sr = 0
                lib_a = lib_s[a]
                for ns in lib_a:
                    sum_sr = sum_sr + lib_a[ns] * (self.rewardTable[s][a][
                        ns] + self.gamma * ValueTable[ns])
                if sum_sr > vs:
                    pi_s = a
                    vs = sum_sr
                    pi_ns = 0, 0
                    v_ns = 0
                    for ns in lib_a:
                        if ValueTable[ns] > v_ns:
                            pi_ns = ns
                            v_ns = ValueTable[ns]
                            prob_ns = lib_a[ns]
            policyTable[s] = {pi_s: prob_ns}
        return [ValueTable, policyTable]


def visualizeValueTable(gridWidth, gridHeight, goalState, trapStates,
    valueTable):
    gridAdjust = 0.5
    gridScale = 1.5
    xs = np.linspace(-gridAdjust, gridWidth - gridAdjust, gridWidth + 1)
    ys = np.linspace(-gridAdjust, gridHeight - gridAdjust, gridHeight + 1)
    plt.rcParams['figure.figsize'] = [gridWidth * gridScale, gridHeight *
        gridScale]
    ax = plt.gca(frameon=False, xticks=range(gridWidth), yticks=range(
        gridHeight))
    ax.add_patch(Rectangle((goalState[0] - gridAdjust, goalState[1] -
        gridAdjust), 1, 1, fill=True, color='green', alpha=0.1))
    for trapx, trapy in trapStates:
        ax.add_patch(Rectangle((trapx - gridAdjust, trapy - gridAdjust), 1,
            1, fill=True, color='black', alpha=0.1))
    for x in xs:
        plt.plot([x, x], [ys[0], ys[-1]], color='black')
    for y in ys:
        plt.plot([xs[0], xs[-1]], [y, y], color='black')
    for (statex, statey), val in valueTable.items():
        plt.text(statex - 0.2, statey, str(round(val, 3)))
    plt.show()


def visualizePolicy(gridWidth, gridHeight, goalState, trapStates, policy):
    gridAdjust = 0.5
    gridScale = 1.5
    arrowScale = 0.5
    xs = np.linspace(-gridAdjust, gridWidth - gridAdjust, gridWidth + 1)
    ys = np.linspace(-gridAdjust, gridHeight - gridAdjust, gridHeight + 1)
    plt.rcParams['figure.figsize'] = [gridWidth * gridScale, gridHeight *
        gridScale]
    ax = plt.gca(frameon=False, xticks=range(gridWidth), yticks=range(
        gridHeight))
    ax.add_patch(Rectangle((goalState[0] - gridAdjust, goalState[1] -
        gridAdjust), 1, 1, fill=True, color='green', alpha=0.1))
    for trapx, trapy in trapStates:
        ax.add_patch(Rectangle((trapx - gridAdjust, trapy - gridAdjust), 1,
            1, fill=True, color='black', alpha=0.1))
    for x in xs:
        plt.plot([x, x], [ys[0], ys[-1]], color='black')
    for y in ys:
        plt.plot([xs[0], xs[-1]], [y, y], color='black')
    for (statex, statey), actionDict in policy.items():
        for (optimalActionX, optimalActionY), actionProb in actionDict.items():
            plt.arrow(statex, statey, optimalActionX * actionProb *
                arrowScale, optimalActionY * actionProb * arrowScale,
                head_width=0.05 * actionProb, head_length=0.1 * actionProb)
    plt.show()


def viewDictionaryStructure(d, levels, indent=0):
    for key, value in d.items():
        print('\t' * indent + str(levels[indent]) + ': ' + str(key))
        if isinstance(value, dict):
            viewDictionaryStructure(value, levels, indent + 1)
        else:
            print('\t' * (indent + 1) + str(levels[indent + 1]) + ': ' +
                str(value))


def p_traj(traj, beta, gamma, transitTable, rewardTable, valueTable):
    p = 1
    ret = []
    for i in range(len(traj) - 1):
        p = p * p_stn_st(traj[i], traj[i + 1], beta, gamma, transitTable,
            rewardTable, valueTable)
        ret = ret + [p]
    return ret


def p_stn_st(st, stn, beta, gamma, transitTable, rewardTable, valueTable):
    lib_s = transitTable[st]
    p = 0
    for at in lib_s:
        if stn in lib_s[at]:
            p = p + lib_s[at][stn] * pias(st, at, beta, gamma, transitTable,
                rewardTable, valueTable)
    return p


def pias(st, at, beta, gamma, transitTable, rewardTable, valueTable):
    return math.log(beta * q(st, at, gamma, transitTable, rewardTable,
        valueTable))


<mask token>


def main():
    gamma = 0.95
    beta = 0.4
    convergenceTolerance = 1e-06
    transition = {(0, 0): {(1, 0): {(1, 0): 1}, (0, 1): {(0, 1): 1}, (-1, 0
        ): {(0, 0): 1}, (0, -1): {(0, 0): 1}, (-1, 1): {(0, 0): 1}, (1, -1):
        {(0, 0): 1}, (1, 1): {(1, 1): 1}, (-1, -1): {(0, 0): 1}}, (0, 1): {
        (1, 0): {(1, 1): 1}, (0, 1): {(0, 2): 1}, (-1, 0): {(0, 1): 1}, (0,
        -1): {(0, 0): 1}, (-1, 1): {(0, 1): 1}, (1, -1): {(1, 0): 1}, (1, 1
        ): {(1, 2): 1}, (-1, -1): {(0, 1): 1}}, (0, 2): {(1, 0): {(1, 2): 1
        }, (0, 1): {(0, 3): 1}, (-1, 0): {(0, 2): 1}, (0, -1): {(0, 1): 1},
        (-1, 1): {(0, 2): 1}, (1, -1): {(1, 1): 1}, (1, 1): {(1, 3): 1}, (-
        1, -1): {(0, 2): 1}}, (0, 3): {(1, 0): {(1, 3): 1}, (0, 1): {(0, 4):
        1}, (-1, 0): {(0, 3): 1}, (0, -1): {(0, 2): 1}, (-1, 1): {(0, 3): 1
        }, (1, -1): {(1, 2): 1}, (1, 1): {(1, 4): 1}, (-1, -1): {(0, 3): 1}
        }, (0, 4): {(1, 0): {(1, 4): 1}, (0, 1): {(0, 5): 1}, (-1, 0): {(0,
        4): 1}, (0, -1): {(0, 3): 1}, (-1, 1): {(0, 4): 1}, (1, -1): {(1, 3
        ): 1}, (1, 1): {(1, 5): 1}, (-1, -1): {(0, 4): 1}}, (0, 5): {(1, 0):
        {(1, 5): 1}, (0, 1): {(0, 5): 1}, (-1, 0): {(0, 5): 1}, (0, -1): {(
        0, 4): 1}, (-1, 1): {(0, 5): 1}, (1, -1): {(1, 4): 1}, (1, 1): {(0,
        5): 1}, (-1, -1): {(0, 5): 1}}, (1, 0): {(1, 0): {(2, 0): 1}, (0, 1
        ): {(1, 1): 1}, (-1, 0): {(0, 0): 1}, (0, -1): {(1, 0): 1}, (-1, 1):
        {(0, 1): 1}, (1, -1): {(1, 0): 1}, (1, 1): {(2, 1): 1}, (-1, -1): {
        (1, 0): 1}}, (1, 1): {(1, 0): {(2, 1): 1}, (0, 1): {(1, 2): 1}, (-1,
        0): {(0, 1): 1}, (0, -1): {(1, 0): 1}, (-1, 1): {(0, 2): 1}, (1, -1
        ): {(2, 0): 1}, (1, 1): {(2, 2): 1}, (-1, -1): {(0, 0): 1}}, (1, 2):
        {(1, 0): {(2, 2): 1}, (0, 1): {(1, 3): 1}, (-1, 0): {(0, 2): 1}, (0,
        -1): {(1, 1): 1}, (-1, 1): {(0, 3): 1}, (1, -1): {(2, 1): 1}, (1, 1
        ): {(2, 3): 1}, (-1, -1): {(0, 1): 1}}, (1, 3): {(1, 0): {(2, 3): 1
        }, (0, 1): {(1, 4): 1}, (-1, 0): {(0, 3): 1}, (0, -1): {(1, 2): 1},
        (-1, 1): {(0, 4): 1}, (1, -1): {(2, 2): 1}, (1, 1): {(2, 4): 1}, (-
        1, -1): {(0, 2): 1}}, (1, 4): {(1, 0): {(2, 4): 1}, (0, 1): {(1, 5):
        1}, (-1, 0): {(0, 4): 1}, (0, -1): {(1, 3): 1}, (-1, 1): {(0, 5): 1
        }, (1, -1): {(2, 3): 1}, (1, 1): {(2, 5): 1}, (-1, -1): {(0, 3): 1}
        }, (1, 5): {(1, 0): {(2, 5): 1}, (0, 1): {(1, 5): 1}, (-1, 0): {(0,
        5): 1}, (0, -1): {(1, 4): 1}, (-1, 1): {(1, 5): 1}, (1, -1): {(2, 4
        ): 1}, (1, 1): {(1, 5): 1}, (-1, -1): {(0, 4): 1}}, (2, 0): {(1, 0):
        {(3, 0): 1}, (0, 1): {(2, 1): 1}, (-1, 0): {(1, 0): 1}, (0, -1): {(
        2, 0): 1}, (-1, 1): {(1, 1): 1}, (1, -1): {(2, 0): 1}, (1, 1): {(3,
        1): 1}, (-1, -1): {(2, 0): 1}}, (2, 1): {(1, 0): {(3, 1): 1}, (0, 1
        ): {(2, 2): 1}, (-1, 0): {(1, 1): 1}, (0, -1): {(2, 0): 1}, (-1, 1):
        {(1, 2): 1}, (1, -1): {(3, 0): 1}, (1, 1): {(3, 2): 1}, (-1, -1): {
        (1, 0): 1}}, (2, 2): {(1, 0): {(3, 2): 1}, (0, 1): {(2, 3): 1}, (-1,
        0): {(1, 2): 1}, (0, -1): {(2, 1): 1}, (-1, 1): {(1, 3): 1}, (1, -1
        ): {(3, 1): 1}, (1, 1): {(3, 3): 1}, (-1, -1): {(1, 1): 1}}, (2, 3):
        {(1, 0): {(3, 3): 1}, (0, 1): {(2, 4): 1}, (-1, 0): {(1, 3): 1}, (0,
        -1): {(2, 2): 1}, (-1, 1): {(1, 4): 1}, (1, -1): {(3, 2): 1}, (1, 1
        ): {(3, 4): 1}, (-1, -1): {(1, 2): 1}}, (2, 4): {(1, 0): {(3, 4): 1
        }, (0, 1): {(2, 5): 1}, (-1, 0): {(1, 4): 1}, (0, -1): {(2, 3): 1},
        (-1, 1): {(1, 5): 1}, (1, -1): {(3, 3): 1}, (1, 1): {(3, 5): 1}, (-
        1, -1): {(1, 3): 1}}, (2, 5): {(1, 0): {(3, 5): 1}, (0, 1): {(2, 5):
        1}, (-1, 0): {(1, 5): 1}, (0, -1): {(2, 4): 1}, (-1, 1): {(2, 5): 1
        }, (1, -1): {(3, 4): 1}, (1, 1): {(2, 5): 1}, (-1, -1): {(1, 4): 1}
        }, (3, 0): {(1, 0): {(4, 0): 1}, (0, 1): {(3, 1): 1}, (-1, 0): {(2,
        0): 1}, (0, -1): {(3, 0): 1}, (-1, 1): {(2, 1): 1}, (1, -1): {(3, 0
        ): 1}, (1, 1): {(4, 1): 1}, (-1, -1): {(3, 0): 1}}, (3, 1): {(1, 0):
        {(4, 1): 1}, (0, 1): {(3, 2): 1}, (-1, 0): {(2, 1): 1}, (0, -1): {(
        3, 0): 1}, (-1, 1): {(2, 2): 1}, (1, -1): {(4, 0): 1}, (1, 1): {(4,
        2): 1}, (-1, -1): {(2, 0): 1}}, (3, 2): {(1, 0): {(4, 2): 1}, (0, 1
        ): {(3, 3): 1}, (-1, 0): {(2, 2): 1}, (0, -1): {(3, 1): 1}, (-1, 1):
        {(2, 3): 1}, (1, -1): {(4, 1): 1}, (1, 1): {(4, 3): 1}, (-1, -1): {
        (2, 1): 1}}, (3, 3): {(1, 0): {(4, 3): 1}, (0, 1): {(3, 4): 1}, (-1,
        0): {(2, 3): 1}, (0, -1): {(3, 2): 1}, (-1, 1): {(2, 4): 1}, (1, -1
        ): {(4, 2): 1}, (1, 1): {(4, 4): 1}, (-1, -1): {(2, 2): 1}}, (3, 4):
        {(1, 0): {(4, 4): 1}, (0, 1): {(3, 5): 1}, (-1, 0): {(2, 4): 1}, (0,
        -1): {(3, 3): 1}, (-1, 1): {(2, 5): 1}, (1, -1): {(4, 3): 1}, (1, 1
        ): {(4, 5): 1}, (-1, -1): {(2, 3): 1}}, (3, 5): {(1, 0): {(4, 5): 1
        }, (0, 1): {(3, 5): 1}, (-1, 0): {(2, 5): 1}, (0, -1): {(3, 4): 1},
        (-1, 1): {(3, 5): 1}, (1, -1): {(4, 4): 1}, (1, 1): {(3, 5): 1}, (-
        1, -1): {(2, 4): 1}}, (4, 0): {(1, 0): {(5, 0): 1}, (0, 1): {(4, 1):
        1}, (-1, 0): {(3, 0): 1}, (0, -1): {(4, 0): 1}, (-1, 1): {(3, 1): 1
        }, (1, -1): {(4, 0): 1}, (1, 1): {(5, 1): 1}, (-1, -1): {(4, 0): 1}
        }, (4, 1): {(1, 0): {(5, 1): 1}, (0, 1): {(4, 2): 1}, (-1, 0): {(3,
        1): 1}, (0, -1): {(4, 0): 1}, (-1, 1): {(3, 2): 1}, (1, -1): {(5, 0
        ): 1}, (1, 1): {(5, 2): 1}, (-1, -1): {(3, 0): 1}}, (4, 2): {(1, 0):
        {(5, 2): 1}, (0, 1): {(4, 3): 1}, (-1, 0): {(3, 2): 1}, (0, -1): {(
        4, 1): 1}, (-1, 1): {(3, 3): 1}, (1, -1): {(5, 1): 1}, (1, 1): {(5,
        3): 1}, (-1, -1): {(3, 1): 1}}, (4, 3): {(1, 0): {(5, 3): 1}, (0, 1
        ): {(4, 4): 1}, (-1, 0): {(3, 3): 1}, (0, -1): {(4, 2): 1}, (-1, 1):
        {(3, 4): 1}, (1, -1): {(5, 2): 1}, (1, 1): {(5, 4): 1}, (-1, -1): {
        (3, 2): 1}}, (4, 4): {(1, 0): {(5, 4): 1}, (0, 1): {(4, 5): 1}, (-1,
        0): {(3, 4): 1}, (0, -1): {(4, 3): 1}, (-1, 1): {(3, 5): 1}, (1, -1
        ): {(5, 3): 1}, (1, 1): {(5, 5): 1}, (-1, -1): {(3, 3): 1}}, (4, 5):
        {(1, 0): {(5, 5): 1}, (0, 1): {(4, 5): 1}, (-1, 0): {(3, 5): 1}, (0,
        -1): {(4, 4): 1}, (-1, 1): {(4, 5): 1}, (1, -1): {(5, 4): 1}, (1, 1
        ): {(4, 5): 1}, (-1, -1): {(3, 4): 1}}, (5, 0): {(1, 0): {(6, 0): 1
        }, (0, 1): {(5, 1): 1}, (-1, 0): {(4, 0): 1}, (0, -1): {(5, 0): 1},
        (-1, 1): {(4, 1): 1}, (1, -1): {(5, 0): 1}, (1, 1): {(6, 1): 1}, (-
        1, -1): {(5, 0): 1}}, (5, 1): {(1, 0): {(6, 1): 1}, (0, 1): {(5, 2):
        1}, (-1, 0): {(4, 1): 1}, (0, -1): {(5, 0): 1}, (-1, 1): {(4, 2): 1
        }, (1, -1): {(6, 0): 1}, (1, 1): {(6, 2): 1}, (-1, -1): {(4, 0): 1}
        }, (5, 2): {(1, 0): {(6, 2): 1}, (0, 1): {(5, 3): 1}, (-1, 0): {(4,
        2): 1}, (0, -1): {(5, 1): 1}, (-1, 1): {(4, 3): 1}, (1, -1): {(6, 1
        ): 1}, (1, 1): {(6, 3): 1}, (-1, -1): {(4, 1): 1}}, (5, 3): {(1, 0):
        {(6, 3): 1}, (0, 1): {(5, 4): 1}, (-1, 0): {(4, 3): 1}, (0, -1): {(
        5, 2): 1}, (-1, 1): {(4, 4): 1}, (1, -1): {(6, 2): 1}, (1, 1): {(6,
        4): 1}, (-1, -1): {(4, 2): 1}}, (5, 4): {(1, 0): {(6, 4): 1}, (0, 1
        ): {(5, 5): 1}, (-1, 0): {(4, 4): 1}, (0, -1): {(5, 3): 1}, (-1, 1):
        {(4, 5): 1}, (1, -1): {(6, 3): 1}, (1, 1): {(6, 5): 1}, (-1, -1): {
        (4, 3): 1}}, (5, 5): {(1, 0): {(6, 5): 1}, (0, 1): {(5, 5): 1}, (-1,
        0): {(4, 5): 1}, (0, -1): {(5, 4): 1}, (-1, 1): {(5, 5): 1}, (1, -1
        ): {(6, 4): 1}, (1, 1): {(5, 5): 1}, (-1, -1): {(4, 4): 1}}, (6, 0):
        {(1, 0): {(6, 0): 1}, (0, 1): {(6, 1): 1}, (-1, 0): {(5, 0): 1}, (0,
        -1): {(6, 0): 1}, (-1, 1): {(5, 1): 1}, (1, -1): {(6, 0): 1}, (1, 1
        ): {(6, 0): 1}, (-1, -1): {(6, 0): 1}}, (6, 1): {(1, 0): {(6, 1): 1
        }, (0, 1): {(6, 2): 1}, (-1, 0): {(5, 1): 1}, (0, -1): {(6, 0): 1},
        (-1, 1): {(5, 2): 1}, (1, -1): {(6, 1): 1}, (1, 1): {(6, 1): 1}, (-
        1, -1): {(5, 0): 1}}, (6, 2): {(1, 0): {(6, 2): 1}, (0, 1): {(6, 3):
        1}, (-1, 0): {(5, 2): 1}, (0, -1): {(6, 1): 1}, (-1, 1): {(5, 3): 1
        }, (1, -1): {(6, 2): 1}, (1, 1): {(6, 2): 1}, (-1, -1): {(5, 1): 1}
        }, (6, 3): {(1, 0): {(6, 3): 1}, (0, 1): {(6, 4): 1}, (-1, 0): {(5,
        3): 1}, (0, -1): {(6, 2): 1}, (-1, 1): {(5, 4): 1}, (1, -1): {(6, 3
        ): 1}, (1, 1): {(6, 3): 1}, (-1, -1): {(5, 2): 1}}, (6, 4): {(1, 0):
        {(6, 4): 1}, (0, 1): {(6, 5): 1}, (-1, 0): {(5, 4): 1}, (0, -1): {(
        6, 3): 1}, (-1, 1): {(5, 5): 1}, (1, -1): {(6, 4): 1}, (1, 1): {(6,
        4): 1}, (-1, -1): {(5, 3): 1}}, (6, 5): {(1, 0): {(6, 5): 1}, (0, 1
        ): {(6, 5): 1}, (-1, 0): {(5, 5): 1}, (0, -1): {(6, 4): 1}, (-1, 1):
        {(6, 5): 1}, (1, -1): {(6, 5): 1}, (1, 1): {(6, 5): 1}, (-1, -1): {
        (5, 4): 1}}}
    valueTable = {(0, 0): 0, (0, 1): 0, (0, 2): 0, (0, 3): 0, (0, 4): 0, (0,
        5): 0, (1, 0): 0, (1, 1): 0, (1, 2): 0, (1, 3): 0, (1, 4): 0, (1, 5
        ): 0, (2, 0): 0, (2, 1): 0, (2, 2): 0, (2, 3): 0, (2, 4): 0, (2, 5):
        0, (3, 0): 0, (3, 1): 0, (3, 2): 0, (3, 3): 0, (3, 4): 0, (3, 5): 0,
        (4, 0): 0, (4, 1): 0, (4, 2): 0, (4, 3): 0, (4, 4): 0, (4, 5): 0, (
        5, 0): 0, (5, 1): 0, (5, 2): 0, (5, 3): 0, (5, 4): 0, (5, 5): 0, (6,
        0): 0, (6, 1): 0, (6, 2): 0, (6, 3): 0, (6, 4): 0, (6, 5): 0}
    trajectoryToGoalA = [(0, 0), (1, 1), (1, 2), (2, 3), (3, 4), (4, 4), (5,
        4), (6, 4)]
    trajectoryToGoalB = [(0, 0), (1, 1), (2, 2), (2, 3), (3, 4), (4, 3), (5,
        2), (6, 1)]
    trajectoryToGoalC = [(0, 0), (0, 1), (1, 2), (1, 3), (1, 4), (1, 5)]
    rewardA = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0}, (-1,
        0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1}, (1,
        -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, -1):
        {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2): -
        1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1): {(0,
        1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 2): -
        1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0): {(1,
        2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, -1):
        {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -100}, (0, 1): {(3, 2): -100}, (-1, 0):
        {(2, 1): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 2): -100}, (
        1, -1): {(4, 0): -100}, (1, 1): {(4, 2): -100}, (-1, -1): {(2, 0): 
        -100}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3, 3): -100}, (-
        1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1): {(2, 3): -
        100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100}, (-1, -1): {(
        2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1): {(3, 4): -
        100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (-1, 1): {(
        2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -100}, (-1,
        -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (0, 1): {(3,
        5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -1.0}, (-1, 1
        ): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): 10}, (-1, 0): {(5, 4): 10}, (0, -1): {(6, 3):
        10}, (-1, 1): {(5, 5): 10}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4):
        -1}, (-1, -1): {(5, 3): 10}}, (6, 5): {(1, 0): {(6, 5): -1}, (0, 1):
        {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1,
        1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1,
        -1): {(5, 4): -1.4142135623730951}}}
    rewardB = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0}, (-1,
        0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1}, (1,
        -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, -1):
        {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2): -
        1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1): {(0,
        1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 2): -
        1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0): {(1,
        2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, -1):
        {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -100}, (0, 1): {(3, 2): -100}, (-1, 0):
        {(2, 1): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 2): -100}, (
        1, -1): {(4, 0): -100}, (1, 1): {(4, 2): -100}, (-1, -1): {(2, 0): 
        -100}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3, 3): -100}, (-
        1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1): {(2, 3): -
        100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100}, (-1, -1): {(
        2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1): {(3, 4): -
        100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (-1, 1): {(
        2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -100}, (-1,
        -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (0, 1): {(3,
        5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -1.0}, (-1, 1
        ): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): 10}, (-1, 0):
        {(5, 1): 10}, (0, -1): {(6, 0): 10}, (-1, 1): {(5, 2): 10}, (1, -1):
        {(6, 1): -1}, (1, 1): {(6, 1): -1}, (-1, -1): {(5, 0): 10}}, (6, 2):
        {(1, 0): {(6, 2): -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -
        1.0}, (0, -1): {(6, 1): -1.0}, (-1, 1): {(5, 3): -
        1.4142135623730951}, (1, -1): {(6, 2): -1}, (1, 1): {(6, 2): -1}, (
        -1, -1): {(5, 1): -1.4142135623730951}}, (6, 3): {(1, 0): {(6, 3): 
        -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5, 3): -1.0}, (0, -1): {(6,
        2): -1.0}, (-1, 1): {(5, 4): -1.4142135623730951}, (1, -1): {(6, 3):
        -1}, (1, 1): {(6, 3): -1}, (-1, -1): {(5, 2): -1.4142135623730951}},
        (6, 4): {(1, 0): {(6, 4): -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5,
        4): -1.0}, (0, -1): {(6, 3): -1.0}, (-1, 1): {(5, 5): -
        1.4142135623730951}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4): -1}, (
        -1, -1): {(5, 3): -1.4142135623730951}}, (6, 5): {(1, 0): {(6, 5): 
        -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4
        ): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6,
        5): -1}, (-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardC = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0}, (-1,
        0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1}, (1,
        -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, -1):
        {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2): -
        1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1): {(0,
        1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 2): -
        1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0): {(1,
        2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, -1):
        {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): 10}, (
        0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): 10}, (0, -1): {(1, 4): 10},
        (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): 10}, (1, 1): {(1, 5): -1},
        (-1, -1): {(0, 4): 10}}, (2, 0): {(1, 0): {(3, 0): -1.0}, (0, 1): {
        (2, 1): -1.0}, (-1, 0): {(1, 0): -1.0}, (0, -1): {(2, 0): -1}, (-1,
        1): {(1, 1): -1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {
        (3, 1): -1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1,
        0): {(3, 1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0},
        (0, -1): {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1,
        -1): {(3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -
        1.4142135623730951}, (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 
        2): {(1, 0): {(3, 2): -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 
        2): -1.0}, (0, -1): {(2, 1): -1.0}, (-1, 1): {(1, 3): -
        1.4142135623730951}, (1, -1): {(3, 1): -1.4142135623730951}, (1, 1):
        {(3, 3): -1.4142135623730951}, (-1, -1): {(1, 1): -
        1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -1.0}, (0, 1): {(2,
        4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2, 2): -1.0}, (-1, 1
        ): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2): -
        1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -1
        ): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -100}, (0, 1): {(3, 2): -100}, (-1, 0):
        {(2, 1): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 2): -100}, (
        1, -1): {(4, 0): -100}, (1, 1): {(4, 2): -100}, (-1, -1): {(2, 0): 
        -100}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3, 3): -100}, (-
        1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1): {(2, 3): -
        100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100}, (-1, -1): {(
        2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1): {(3, 4): -
        100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (-1, 1): {(
        2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -100}, (-1,
        -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (0, 1): {(3,
        5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -1.0}, (-1, 1
        ): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5, 4): -1.0}, (0, -1): {(6,
        3): -1.0}, (-1, 1): {(5, 5): -1.4142135623730951}, (1, -1): {(6, 4):
        -1}, (1, 1): {(6, 4): -1}, (-1, -1): {(5, 3): -1.4142135623730951}},
        (6, 5): {(1, 0): {(6, 5): -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 
        5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1):
        {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1, -1): {(5, 4): -
        1.4142135623730951}}}
    rewardAGap = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0},
        (-1, 0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1},
        (1, -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, 
        -1): {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2
        ): -1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1):
        {(0, 1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 
        2): -1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0):
        {(1, 2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, 
        -1): {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -1.0}, (0, 1): {(3, 2): -1.0}, (-1, 0):
        {(2, 1): -1.0}, (0, -1): {(3, 0): -1.0}, (-1, 1): {(2, 2): -
        1.4142135623730951}, (1, -1): {(4, 0): -1.4142135623730951}, (1, 1):
        {(4, 2): -1.4142135623730951}, (-1, -1): {(2, 0): -
        1.4142135623730951}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3,
        3): -100}, (-1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1
        ): {(2, 3): -100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100},
        (-1, -1): {(2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1):
        {(3, 4): -100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (
        -1, 1): {(2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -
        100}, (-1, -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (
        0, 1): {(3, 5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -
        1.0}, (-1, 1): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): 10}, (-1, 0): {(5, 4): 10}, (0, -1): {(6, 3):
        10}, (-1, 1): {(5, 5): 10}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4):
        -1}, (-1, -1): {(5, 3): 10}}, (6, 5): {(1, 0): {(6, 5): -1}, (0, 1):
        {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1,
        1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1,
        -1): {(5, 4): -1.4142135623730951}}}
    rewardBGap = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0},
        (-1, 0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1},
        (1, -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, 
        -1): {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2
        ): -1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1):
        {(0, 1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 
        2): -1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0):
        {(1, 2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, 
        -1): {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -1.0}, (0, 1): {(3, 2): -1.0}, (-1, 0):
        {(2, 1): -1.0}, (0, -1): {(3, 0): -1.0}, (-1, 1): {(2, 2): -
        1.4142135623730951}, (1, -1): {(4, 0): -1.4142135623730951}, (1, 1):
        {(4, 2): -1.4142135623730951}, (-1, -1): {(2, 0): -
        1.4142135623730951}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3,
        3): -100}, (-1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1
        ): {(2, 3): -100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100},
        (-1, -1): {(2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1):
        {(3, 4): -100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (
        -1, 1): {(2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -
        100}, (-1, -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (
        0, 1): {(3, 5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -
        1.0}, (-1, 1): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): 10}, (-1, 0):
        {(5, 1): 10}, (0, -1): {(6, 0): 10}, (-1, 1): {(5, 2): 10}, (1, -1):
        {(6, 1): -1}, (1, 1): {(6, 1): -1}, (-1, -1): {(5, 0): 10}}, (6, 2):
        {(1, 0): {(6, 2): -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -
        1.0}, (0, -1): {(6, 1): -1.0}, (-1, 1): {(5, 3): -
        1.4142135623730951}, (1, -1): {(6, 2): -1}, (1, 1): {(6, 2): -1}, (
        -1, -1): {(5, 1): -1.4142135623730951}}, (6, 3): {(1, 0): {(6, 3): 
        -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5, 3): -1.0}, (0, -1): {(6,
        2): -1.0}, (-1, 1): {(5, 4): -1.4142135623730951}, (1, -1): {(6, 3):
        -1}, (1, 1): {(6, 3): -1}, (-1, -1): {(5, 2): -1.4142135623730951}},
        (6, 4): {(1, 0): {(6, 4): -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5,
        4): -1.0}, (0, -1): {(6, 3): -1.0}, (-1, 1): {(5, 5): -
        1.4142135623730951}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4): -1}, (
        -1, -1): {(5, 3): -1.4142135623730951}}, (6, 5): {(1, 0): {(6, 5): 
        -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4
        ): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6,
        5): -1}, (-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardCGap = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0},
        (-1, 0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1},
        (1, -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, 
        -1): {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2
        ): -1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1):
        {(0, 1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 
        2): -1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0):
        {(1, 2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, 
        -1): {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): 10}, (
        0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): 10}, (0, -1): {(1, 4): 10},
        (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): 10}, (1, 1): {(1, 5): -1},
        (-1, -1): {(0, 4): 10}}, (2, 0): {(1, 0): {(3, 0): -1.0}, (0, 1): {
        (2, 1): -1.0}, (-1, 0): {(1, 0): -1.0}, (0, -1): {(2, 0): -1}, (-1,
        1): {(1, 1): -1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {
        (3, 1): -1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1,
        0): {(3, 1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0},
        (0, -1): {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1,
        -1): {(3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -
        1.4142135623730951}, (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 
        2): {(1, 0): {(3, 2): -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 
        2): -1.0}, (0, -1): {(2, 1): -1.0}, (-1, 1): {(1, 3): -
        1.4142135623730951}, (1, -1): {(3, 1): -1.4142135623730951}, (1, 1):
        {(3, 3): -1.4142135623730951}, (-1, -1): {(1, 1): -
        1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -1.0}, (0, 1): {(2,
        4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2, 2): -1.0}, (-1, 1
        ): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2): -
        1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -1
        ): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -1.0}, (0, 1): {(3, 2): -1.0}, (-1, 0):
        {(2, 1): -1.0}, (0, -1): {(3, 0): -1.0}, (-1, 1): {(2, 2): -
        1.4142135623730951}, (1, -1): {(4, 0): -1.4142135623730951}, (1, 1):
        {(4, 2): -1.4142135623730951}, (-1, -1): {(2, 0): -
        1.4142135623730951}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3,
        3): -100}, (-1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1
        ): {(2, 3): -100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100},
        (-1, -1): {(2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1):
        {(3, 4): -100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (
        -1, 1): {(2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -
        100}, (-1, -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (
        0, 1): {(3, 5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -
        1.0}, (-1, 1): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5, 4): -1.0}, (0, -1): {(6,
        3): -1.0}, (-1, 1): {(5, 5): -1.4142135623730951}, (1, -1): {(6, 4):
        -1}, (1, 1): {(6, 4): -1}, (-1, -1): {(5, 3): -1.4142135623730951}},
        (6, 5): {(1, 0): {(6, 5): -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 
        5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1):
        {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1, -1): {(5, 4): -
        1.4142135623730951}}}
    performValueIteration = ValueIteration(transition, rewardA, valueTable,
        convergenceTolerance, gamma)
    optimalValuesA, policyTableA = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 4),
        trapStates=[(3, 0), (3, 1), (3, 2), (3, 3)], valueTable=optimalValuesA)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 4), trapStates
        =[(3, 0), (3, 1), (3, 2), (3, 3)], policy=policyTableA)
    print(p_traj(trajectoryToGoalA, beta, gamma, transition, rewardA,
        optimalValuesA))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalA, beta, gamma,
        transition, rewardA, optimalValuesA))
    plt.ylabel('Probabilty of goal A (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol A without gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardAGap,
        valueTable, convergenceTolerance, gamma)
    optimalValuesAG, policyTableAG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 4),
        trapStates=[(3, 0), (3, 2), (3, 3)], valueTable=optimalValuesAG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 4), trapStates
        =[(3, 0), (3, 2), (3, 3)], policy=policyTableAG)
    print(p_traj(trajectoryToGoalA, beta, gamma, transition, rewardAGap,
        optimalValuesAG))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalA, beta, gamma,
        transition, rewardAGap, optimalValuesAG))
    plt.ylabel('Probabilty of goal A Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol A with gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardB, valueTable,
        convergenceTolerance, gamma)
    optimalValuesB, policyTableB = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 1),
        trapStates=[(3, 0), (3, 1), (3, 2), (3, 3)], valueTable=optimalValuesB)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 1), trapStates
        =[(3, 0), (3, 1), (3, 2), (3, 3)], policy=policyTableB)
    print(p_traj(trajectoryToGoalB, beta, gamma, transition, rewardB,
        optimalValuesB))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalB, beta, gamma,
        transition, rewardB, optimalValuesB))
    plt.ylabel('Probabilty of goal B (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol B without gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardBGap,
        valueTable, convergenceTolerance, gamma)
    optimalValuesBG, policyTableBG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 1),
        trapStates=[(3, 0), (3, 2), (3, 3)], valueTable=optimalValuesBG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 1), trapStates
        =[(3, 0), (3, 2), (3, 3)], policy=policyTableBG)
    print(p_traj(trajectoryToGoalB, beta, gamma, transition, rewardBGap,
        optimalValuesBG))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalB, beta, gamma,
        transition, rewardBGap, optimalValuesBG))
    plt.ylabel('Probabilty of goal B Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol B with gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardC, valueTable,
        convergenceTolerance, gamma)
    optimalValuesC, policyTableC = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(1, 5),
        trapStates=[(3, 0), (3, 1), (3, 2), (3, 3)], valueTable=optimalValuesC)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(1, 5), trapStates
        =[(3, 0), (3, 1), (3, 2), (3, 3)], policy=policyTableC)
    print(p_traj(trajectoryToGoalC, beta, gamma, transition, rewardC,
        optimalValuesC))
    plt.plot([2, 3, 4, 5, 6], p_traj(trajectoryToGoalC, beta, gamma,
        transition, rewardC, optimalValuesC))
    plt.ylabel('Probabilty of goal C (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol C without gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardCGap,
        valueTable, convergenceTolerance, gamma)
    optimalValuesCG, policyTableCG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(1, 5),
        trapStates=[(3, 0), (3, 2), (3, 3)], valueTable=optimalValuesCG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(1, 5), trapStates
        =[(3, 0), (3, 2), (3, 3)], policy=policyTableCG)
    print(p_traj(trajectoryToGoalC, beta, gamma, transition, rewardCGap,
        optimalValuesCG))
    plt.plot([2, 3, 4, 5, 6], p_traj(trajectoryToGoalC, beta, gamma,
        transition, rewardCGap, optimalValuesCG))
    plt.ylabel('Probabilty of goal C Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol C with gap')
    plt.show()


<mask token>

<mask token>


class ValueIteration(object):

    def __init__(self, transitionTable, rewardTable, valueTable,
        convergenceTolerance, gamma):
        self.transitionTable = transitionTable
        self.rewardTable = rewardTable
        self.valueTable = valueTable
        self.convergenceTolerance = convergenceTolerance
        self.gamma = gamma

    def __call__(self):
        ValueTable = self.valueTable
        tempValueTable = copy.copy(ValueTable)
        delta = 1
        while delta >= self.convergenceTolerance:
            delta = 0
            for s in ValueTable:
                v = ValueTable[s]
                lib_s = self.transitionTable[s]
                max_a = 0
                for a in lib_s:
                    sum_sr = 0
                    lib_a = lib_s[a]
                    for ns in lib_a:
                        sum_sr = sum_sr + lib_a[ns] * (self.rewardTable[s][
                            a][ns] + self.gamma * tempValueTable[ns])
                    max_a = max(max_a, sum_sr)
                ValueTable[s] = max_a
                delta = max(delta, abs(v - ValueTable[s]))
            tempValueTable = copy.copy(ValueTable)
        policyTable = {}
        for s in ValueTable:
            lib_s = self.transitionTable[s]
            pi_s = 0, 0
            vs = 0
            prob_ns = 0
            for a in lib_s:
                sum_sr = 0
                lib_a = lib_s[a]
                for ns in lib_a:
                    sum_sr = sum_sr + lib_a[ns] * (self.rewardTable[s][a][
                        ns] + self.gamma * ValueTable[ns])
                if sum_sr > vs:
                    pi_s = a
                    vs = sum_sr
                    pi_ns = 0, 0
                    v_ns = 0
                    for ns in lib_a:
                        if ValueTable[ns] > v_ns:
                            pi_ns = ns
                            v_ns = ValueTable[ns]
                            prob_ns = lib_a[ns]
            policyTable[s] = {pi_s: prob_ns}
        return [ValueTable, policyTable]


def visualizeValueTable(gridWidth, gridHeight, goalState, trapStates,
    valueTable):
    gridAdjust = 0.5
    gridScale = 1.5
    xs = np.linspace(-gridAdjust, gridWidth - gridAdjust, gridWidth + 1)
    ys = np.linspace(-gridAdjust, gridHeight - gridAdjust, gridHeight + 1)
    plt.rcParams['figure.figsize'] = [gridWidth * gridScale, gridHeight *
        gridScale]
    ax = plt.gca(frameon=False, xticks=range(gridWidth), yticks=range(
        gridHeight))
    ax.add_patch(Rectangle((goalState[0] - gridAdjust, goalState[1] -
        gridAdjust), 1, 1, fill=True, color='green', alpha=0.1))
    for trapx, trapy in trapStates:
        ax.add_patch(Rectangle((trapx - gridAdjust, trapy - gridAdjust), 1,
            1, fill=True, color='black', alpha=0.1))
    for x in xs:
        plt.plot([x, x], [ys[0], ys[-1]], color='black')
    for y in ys:
        plt.plot([xs[0], xs[-1]], [y, y], color='black')
    for (statex, statey), val in valueTable.items():
        plt.text(statex - 0.2, statey, str(round(val, 3)))
    plt.show()


def visualizePolicy(gridWidth, gridHeight, goalState, trapStates, policy):
    gridAdjust = 0.5
    gridScale = 1.5
    arrowScale = 0.5
    xs = np.linspace(-gridAdjust, gridWidth - gridAdjust, gridWidth + 1)
    ys = np.linspace(-gridAdjust, gridHeight - gridAdjust, gridHeight + 1)
    plt.rcParams['figure.figsize'] = [gridWidth * gridScale, gridHeight *
        gridScale]
    ax = plt.gca(frameon=False, xticks=range(gridWidth), yticks=range(
        gridHeight))
    ax.add_patch(Rectangle((goalState[0] - gridAdjust, goalState[1] -
        gridAdjust), 1, 1, fill=True, color='green', alpha=0.1))
    for trapx, trapy in trapStates:
        ax.add_patch(Rectangle((trapx - gridAdjust, trapy - gridAdjust), 1,
            1, fill=True, color='black', alpha=0.1))
    for x in xs:
        plt.plot([x, x], [ys[0], ys[-1]], color='black')
    for y in ys:
        plt.plot([xs[0], xs[-1]], [y, y], color='black')
    for (statex, statey), actionDict in policy.items():
        for (optimalActionX, optimalActionY), actionProb in actionDict.items():
            plt.arrow(statex, statey, optimalActionX * actionProb *
                arrowScale, optimalActionY * actionProb * arrowScale,
                head_width=0.05 * actionProb, head_length=0.1 * actionProb)
    plt.show()


def viewDictionaryStructure(d, levels, indent=0):
    for key, value in d.items():
        print('\t' * indent + str(levels[indent]) + ': ' + str(key))
        if isinstance(value, dict):
            viewDictionaryStructure(value, levels, indent + 1)
        else:
            print('\t' * (indent + 1) + str(levels[indent + 1]) + ': ' +
                str(value))


def p_traj(traj, beta, gamma, transitTable, rewardTable, valueTable):
    p = 1
    ret = []
    for i in range(len(traj) - 1):
        p = p * p_stn_st(traj[i], traj[i + 1], beta, gamma, transitTable,
            rewardTable, valueTable)
        ret = ret + [p]
    return ret


def p_stn_st(st, stn, beta, gamma, transitTable, rewardTable, valueTable):
    lib_s = transitTable[st]
    p = 0
    for at in lib_s:
        if stn in lib_s[at]:
            p = p + lib_s[at][stn] * pias(st, at, beta, gamma, transitTable,
                rewardTable, valueTable)
    return p


def pias(st, at, beta, gamma, transitTable, rewardTable, valueTable):
    return math.log(beta * q(st, at, gamma, transitTable, rewardTable,
        valueTable))


def q(st, at, gamma, transitTable, rewardTable, valueTable):
    lib_sa = transitTable[st][at]
    q = 0
    for ns in lib_sa:
        q = q + lib_sa[ns] * (rewardTable[st][at][ns] + gamma * valueTable[ns])
    return q


def main():
    gamma = 0.95
    beta = 0.4
    convergenceTolerance = 1e-06
    transition = {(0, 0): {(1, 0): {(1, 0): 1}, (0, 1): {(0, 1): 1}, (-1, 0
        ): {(0, 0): 1}, (0, -1): {(0, 0): 1}, (-1, 1): {(0, 0): 1}, (1, -1):
        {(0, 0): 1}, (1, 1): {(1, 1): 1}, (-1, -1): {(0, 0): 1}}, (0, 1): {
        (1, 0): {(1, 1): 1}, (0, 1): {(0, 2): 1}, (-1, 0): {(0, 1): 1}, (0,
        -1): {(0, 0): 1}, (-1, 1): {(0, 1): 1}, (1, -1): {(1, 0): 1}, (1, 1
        ): {(1, 2): 1}, (-1, -1): {(0, 1): 1}}, (0, 2): {(1, 0): {(1, 2): 1
        }, (0, 1): {(0, 3): 1}, (-1, 0): {(0, 2): 1}, (0, -1): {(0, 1): 1},
        (-1, 1): {(0, 2): 1}, (1, -1): {(1, 1): 1}, (1, 1): {(1, 3): 1}, (-
        1, -1): {(0, 2): 1}}, (0, 3): {(1, 0): {(1, 3): 1}, (0, 1): {(0, 4):
        1}, (-1, 0): {(0, 3): 1}, (0, -1): {(0, 2): 1}, (-1, 1): {(0, 3): 1
        }, (1, -1): {(1, 2): 1}, (1, 1): {(1, 4): 1}, (-1, -1): {(0, 3): 1}
        }, (0, 4): {(1, 0): {(1, 4): 1}, (0, 1): {(0, 5): 1}, (-1, 0): {(0,
        4): 1}, (0, -1): {(0, 3): 1}, (-1, 1): {(0, 4): 1}, (1, -1): {(1, 3
        ): 1}, (1, 1): {(1, 5): 1}, (-1, -1): {(0, 4): 1}}, (0, 5): {(1, 0):
        {(1, 5): 1}, (0, 1): {(0, 5): 1}, (-1, 0): {(0, 5): 1}, (0, -1): {(
        0, 4): 1}, (-1, 1): {(0, 5): 1}, (1, -1): {(1, 4): 1}, (1, 1): {(0,
        5): 1}, (-1, -1): {(0, 5): 1}}, (1, 0): {(1, 0): {(2, 0): 1}, (0, 1
        ): {(1, 1): 1}, (-1, 0): {(0, 0): 1}, (0, -1): {(1, 0): 1}, (-1, 1):
        {(0, 1): 1}, (1, -1): {(1, 0): 1}, (1, 1): {(2, 1): 1}, (-1, -1): {
        (1, 0): 1}}, (1, 1): {(1, 0): {(2, 1): 1}, (0, 1): {(1, 2): 1}, (-1,
        0): {(0, 1): 1}, (0, -1): {(1, 0): 1}, (-1, 1): {(0, 2): 1}, (1, -1
        ): {(2, 0): 1}, (1, 1): {(2, 2): 1}, (-1, -1): {(0, 0): 1}}, (1, 2):
        {(1, 0): {(2, 2): 1}, (0, 1): {(1, 3): 1}, (-1, 0): {(0, 2): 1}, (0,
        -1): {(1, 1): 1}, (-1, 1): {(0, 3): 1}, (1, -1): {(2, 1): 1}, (1, 1
        ): {(2, 3): 1}, (-1, -1): {(0, 1): 1}}, (1, 3): {(1, 0): {(2, 3): 1
        }, (0, 1): {(1, 4): 1}, (-1, 0): {(0, 3): 1}, (0, -1): {(1, 2): 1},
        (-1, 1): {(0, 4): 1}, (1, -1): {(2, 2): 1}, (1, 1): {(2, 4): 1}, (-
        1, -1): {(0, 2): 1}}, (1, 4): {(1, 0): {(2, 4): 1}, (0, 1): {(1, 5):
        1}, (-1, 0): {(0, 4): 1}, (0, -1): {(1, 3): 1}, (-1, 1): {(0, 5): 1
        }, (1, -1): {(2, 3): 1}, (1, 1): {(2, 5): 1}, (-1, -1): {(0, 3): 1}
        }, (1, 5): {(1, 0): {(2, 5): 1}, (0, 1): {(1, 5): 1}, (-1, 0): {(0,
        5): 1}, (0, -1): {(1, 4): 1}, (-1, 1): {(1, 5): 1}, (1, -1): {(2, 4
        ): 1}, (1, 1): {(1, 5): 1}, (-1, -1): {(0, 4): 1}}, (2, 0): {(1, 0):
        {(3, 0): 1}, (0, 1): {(2, 1): 1}, (-1, 0): {(1, 0): 1}, (0, -1): {(
        2, 0): 1}, (-1, 1): {(1, 1): 1}, (1, -1): {(2, 0): 1}, (1, 1): {(3,
        1): 1}, (-1, -1): {(2, 0): 1}}, (2, 1): {(1, 0): {(3, 1): 1}, (0, 1
        ): {(2, 2): 1}, (-1, 0): {(1, 1): 1}, (0, -1): {(2, 0): 1}, (-1, 1):
        {(1, 2): 1}, (1, -1): {(3, 0): 1}, (1, 1): {(3, 2): 1}, (-1, -1): {
        (1, 0): 1}}, (2, 2): {(1, 0): {(3, 2): 1}, (0, 1): {(2, 3): 1}, (-1,
        0): {(1, 2): 1}, (0, -1): {(2, 1): 1}, (-1, 1): {(1, 3): 1}, (1, -1
        ): {(3, 1): 1}, (1, 1): {(3, 3): 1}, (-1, -1): {(1, 1): 1}}, (2, 3):
        {(1, 0): {(3, 3): 1}, (0, 1): {(2, 4): 1}, (-1, 0): {(1, 3): 1}, (0,
        -1): {(2, 2): 1}, (-1, 1): {(1, 4): 1}, (1, -1): {(3, 2): 1}, (1, 1
        ): {(3, 4): 1}, (-1, -1): {(1, 2): 1}}, (2, 4): {(1, 0): {(3, 4): 1
        }, (0, 1): {(2, 5): 1}, (-1, 0): {(1, 4): 1}, (0, -1): {(2, 3): 1},
        (-1, 1): {(1, 5): 1}, (1, -1): {(3, 3): 1}, (1, 1): {(3, 5): 1}, (-
        1, -1): {(1, 3): 1}}, (2, 5): {(1, 0): {(3, 5): 1}, (0, 1): {(2, 5):
        1}, (-1, 0): {(1, 5): 1}, (0, -1): {(2, 4): 1}, (-1, 1): {(2, 5): 1
        }, (1, -1): {(3, 4): 1}, (1, 1): {(2, 5): 1}, (-1, -1): {(1, 4): 1}
        }, (3, 0): {(1, 0): {(4, 0): 1}, (0, 1): {(3, 1): 1}, (-1, 0): {(2,
        0): 1}, (0, -1): {(3, 0): 1}, (-1, 1): {(2, 1): 1}, (1, -1): {(3, 0
        ): 1}, (1, 1): {(4, 1): 1}, (-1, -1): {(3, 0): 1}}, (3, 1): {(1, 0):
        {(4, 1): 1}, (0, 1): {(3, 2): 1}, (-1, 0): {(2, 1): 1}, (0, -1): {(
        3, 0): 1}, (-1, 1): {(2, 2): 1}, (1, -1): {(4, 0): 1}, (1, 1): {(4,
        2): 1}, (-1, -1): {(2, 0): 1}}, (3, 2): {(1, 0): {(4, 2): 1}, (0, 1
        ): {(3, 3): 1}, (-1, 0): {(2, 2): 1}, (0, -1): {(3, 1): 1}, (-1, 1):
        {(2, 3): 1}, (1, -1): {(4, 1): 1}, (1, 1): {(4, 3): 1}, (-1, -1): {
        (2, 1): 1}}, (3, 3): {(1, 0): {(4, 3): 1}, (0, 1): {(3, 4): 1}, (-1,
        0): {(2, 3): 1}, (0, -1): {(3, 2): 1}, (-1, 1): {(2, 4): 1}, (1, -1
        ): {(4, 2): 1}, (1, 1): {(4, 4): 1}, (-1, -1): {(2, 2): 1}}, (3, 4):
        {(1, 0): {(4, 4): 1}, (0, 1): {(3, 5): 1}, (-1, 0): {(2, 4): 1}, (0,
        -1): {(3, 3): 1}, (-1, 1): {(2, 5): 1}, (1, -1): {(4, 3): 1}, (1, 1
        ): {(4, 5): 1}, (-1, -1): {(2, 3): 1}}, (3, 5): {(1, 0): {(4, 5): 1
        }, (0, 1): {(3, 5): 1}, (-1, 0): {(2, 5): 1}, (0, -1): {(3, 4): 1},
        (-1, 1): {(3, 5): 1}, (1, -1): {(4, 4): 1}, (1, 1): {(3, 5): 1}, (-
        1, -1): {(2, 4): 1}}, (4, 0): {(1, 0): {(5, 0): 1}, (0, 1): {(4, 1):
        1}, (-1, 0): {(3, 0): 1}, (0, -1): {(4, 0): 1}, (-1, 1): {(3, 1): 1
        }, (1, -1): {(4, 0): 1}, (1, 1): {(5, 1): 1}, (-1, -1): {(4, 0): 1}
        }, (4, 1): {(1, 0): {(5, 1): 1}, (0, 1): {(4, 2): 1}, (-1, 0): {(3,
        1): 1}, (0, -1): {(4, 0): 1}, (-1, 1): {(3, 2): 1}, (1, -1): {(5, 0
        ): 1}, (1, 1): {(5, 2): 1}, (-1, -1): {(3, 0): 1}}, (4, 2): {(1, 0):
        {(5, 2): 1}, (0, 1): {(4, 3): 1}, (-1, 0): {(3, 2): 1}, (0, -1): {(
        4, 1): 1}, (-1, 1): {(3, 3): 1}, (1, -1): {(5, 1): 1}, (1, 1): {(5,
        3): 1}, (-1, -1): {(3, 1): 1}}, (4, 3): {(1, 0): {(5, 3): 1}, (0, 1
        ): {(4, 4): 1}, (-1, 0): {(3, 3): 1}, (0, -1): {(4, 2): 1}, (-1, 1):
        {(3, 4): 1}, (1, -1): {(5, 2): 1}, (1, 1): {(5, 4): 1}, (-1, -1): {
        (3, 2): 1}}, (4, 4): {(1, 0): {(5, 4): 1}, (0, 1): {(4, 5): 1}, (-1,
        0): {(3, 4): 1}, (0, -1): {(4, 3): 1}, (-1, 1): {(3, 5): 1}, (1, -1
        ): {(5, 3): 1}, (1, 1): {(5, 5): 1}, (-1, -1): {(3, 3): 1}}, (4, 5):
        {(1, 0): {(5, 5): 1}, (0, 1): {(4, 5): 1}, (-1, 0): {(3, 5): 1}, (0,
        -1): {(4, 4): 1}, (-1, 1): {(4, 5): 1}, (1, -1): {(5, 4): 1}, (1, 1
        ): {(4, 5): 1}, (-1, -1): {(3, 4): 1}}, (5, 0): {(1, 0): {(6, 0): 1
        }, (0, 1): {(5, 1): 1}, (-1, 0): {(4, 0): 1}, (0, -1): {(5, 0): 1},
        (-1, 1): {(4, 1): 1}, (1, -1): {(5, 0): 1}, (1, 1): {(6, 1): 1}, (-
        1, -1): {(5, 0): 1}}, (5, 1): {(1, 0): {(6, 1): 1}, (0, 1): {(5, 2):
        1}, (-1, 0): {(4, 1): 1}, (0, -1): {(5, 0): 1}, (-1, 1): {(4, 2): 1
        }, (1, -1): {(6, 0): 1}, (1, 1): {(6, 2): 1}, (-1, -1): {(4, 0): 1}
        }, (5, 2): {(1, 0): {(6, 2): 1}, (0, 1): {(5, 3): 1}, (-1, 0): {(4,
        2): 1}, (0, -1): {(5, 1): 1}, (-1, 1): {(4, 3): 1}, (1, -1): {(6, 1
        ): 1}, (1, 1): {(6, 3): 1}, (-1, -1): {(4, 1): 1}}, (5, 3): {(1, 0):
        {(6, 3): 1}, (0, 1): {(5, 4): 1}, (-1, 0): {(4, 3): 1}, (0, -1): {(
        5, 2): 1}, (-1, 1): {(4, 4): 1}, (1, -1): {(6, 2): 1}, (1, 1): {(6,
        4): 1}, (-1, -1): {(4, 2): 1}}, (5, 4): {(1, 0): {(6, 4): 1}, (0, 1
        ): {(5, 5): 1}, (-1, 0): {(4, 4): 1}, (0, -1): {(5, 3): 1}, (-1, 1):
        {(4, 5): 1}, (1, -1): {(6, 3): 1}, (1, 1): {(6, 5): 1}, (-1, -1): {
        (4, 3): 1}}, (5, 5): {(1, 0): {(6, 5): 1}, (0, 1): {(5, 5): 1}, (-1,
        0): {(4, 5): 1}, (0, -1): {(5, 4): 1}, (-1, 1): {(5, 5): 1}, (1, -1
        ): {(6, 4): 1}, (1, 1): {(5, 5): 1}, (-1, -1): {(4, 4): 1}}, (6, 0):
        {(1, 0): {(6, 0): 1}, (0, 1): {(6, 1): 1}, (-1, 0): {(5, 0): 1}, (0,
        -1): {(6, 0): 1}, (-1, 1): {(5, 1): 1}, (1, -1): {(6, 0): 1}, (1, 1
        ): {(6, 0): 1}, (-1, -1): {(6, 0): 1}}, (6, 1): {(1, 0): {(6, 1): 1
        }, (0, 1): {(6, 2): 1}, (-1, 0): {(5, 1): 1}, (0, -1): {(6, 0): 1},
        (-1, 1): {(5, 2): 1}, (1, -1): {(6, 1): 1}, (1, 1): {(6, 1): 1}, (-
        1, -1): {(5, 0): 1}}, (6, 2): {(1, 0): {(6, 2): 1}, (0, 1): {(6, 3):
        1}, (-1, 0): {(5, 2): 1}, (0, -1): {(6, 1): 1}, (-1, 1): {(5, 3): 1
        }, (1, -1): {(6, 2): 1}, (1, 1): {(6, 2): 1}, (-1, -1): {(5, 1): 1}
        }, (6, 3): {(1, 0): {(6, 3): 1}, (0, 1): {(6, 4): 1}, (-1, 0): {(5,
        3): 1}, (0, -1): {(6, 2): 1}, (-1, 1): {(5, 4): 1}, (1, -1): {(6, 3
        ): 1}, (1, 1): {(6, 3): 1}, (-1, -1): {(5, 2): 1}}, (6, 4): {(1, 0):
        {(6, 4): 1}, (0, 1): {(6, 5): 1}, (-1, 0): {(5, 4): 1}, (0, -1): {(
        6, 3): 1}, (-1, 1): {(5, 5): 1}, (1, -1): {(6, 4): 1}, (1, 1): {(6,
        4): 1}, (-1, -1): {(5, 3): 1}}, (6, 5): {(1, 0): {(6, 5): 1}, (0, 1
        ): {(6, 5): 1}, (-1, 0): {(5, 5): 1}, (0, -1): {(6, 4): 1}, (-1, 1):
        {(6, 5): 1}, (1, -1): {(6, 5): 1}, (1, 1): {(6, 5): 1}, (-1, -1): {
        (5, 4): 1}}}
    valueTable = {(0, 0): 0, (0, 1): 0, (0, 2): 0, (0, 3): 0, (0, 4): 0, (0,
        5): 0, (1, 0): 0, (1, 1): 0, (1, 2): 0, (1, 3): 0, (1, 4): 0, (1, 5
        ): 0, (2, 0): 0, (2, 1): 0, (2, 2): 0, (2, 3): 0, (2, 4): 0, (2, 5):
        0, (3, 0): 0, (3, 1): 0, (3, 2): 0, (3, 3): 0, (3, 4): 0, (3, 5): 0,
        (4, 0): 0, (4, 1): 0, (4, 2): 0, (4, 3): 0, (4, 4): 0, (4, 5): 0, (
        5, 0): 0, (5, 1): 0, (5, 2): 0, (5, 3): 0, (5, 4): 0, (5, 5): 0, (6,
        0): 0, (6, 1): 0, (6, 2): 0, (6, 3): 0, (6, 4): 0, (6, 5): 0}
    trajectoryToGoalA = [(0, 0), (1, 1), (1, 2), (2, 3), (3, 4), (4, 4), (5,
        4), (6, 4)]
    trajectoryToGoalB = [(0, 0), (1, 1), (2, 2), (2, 3), (3, 4), (4, 3), (5,
        2), (6, 1)]
    trajectoryToGoalC = [(0, 0), (0, 1), (1, 2), (1, 3), (1, 4), (1, 5)]
    rewardA = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0}, (-1,
        0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1}, (1,
        -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, -1):
        {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2): -
        1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1): {(0,
        1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 2): -
        1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0): {(1,
        2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, -1):
        {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -100}, (0, 1): {(3, 2): -100}, (-1, 0):
        {(2, 1): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 2): -100}, (
        1, -1): {(4, 0): -100}, (1, 1): {(4, 2): -100}, (-1, -1): {(2, 0): 
        -100}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3, 3): -100}, (-
        1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1): {(2, 3): -
        100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100}, (-1, -1): {(
        2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1): {(3, 4): -
        100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (-1, 1): {(
        2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -100}, (-1,
        -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (0, 1): {(3,
        5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -1.0}, (-1, 1
        ): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): 10}, (-1, 0): {(5, 4): 10}, (0, -1): {(6, 3):
        10}, (-1, 1): {(5, 5): 10}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4):
        -1}, (-1, -1): {(5, 3): 10}}, (6, 5): {(1, 0): {(6, 5): -1}, (0, 1):
        {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1,
        1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1,
        -1): {(5, 4): -1.4142135623730951}}}
    rewardB = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0}, (-1,
        0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1}, (1,
        -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, -1):
        {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2): -
        1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1): {(0,
        1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 2): -
        1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0): {(1,
        2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, -1):
        {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -100}, (0, 1): {(3, 2): -100}, (-1, 0):
        {(2, 1): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 2): -100}, (
        1, -1): {(4, 0): -100}, (1, 1): {(4, 2): -100}, (-1, -1): {(2, 0): 
        -100}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3, 3): -100}, (-
        1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1): {(2, 3): -
        100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100}, (-1, -1): {(
        2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1): {(3, 4): -
        100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (-1, 1): {(
        2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -100}, (-1,
        -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (0, 1): {(3,
        5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -1.0}, (-1, 1
        ): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): 10}, (-1, 0):
        {(5, 1): 10}, (0, -1): {(6, 0): 10}, (-1, 1): {(5, 2): 10}, (1, -1):
        {(6, 1): -1}, (1, 1): {(6, 1): -1}, (-1, -1): {(5, 0): 10}}, (6, 2):
        {(1, 0): {(6, 2): -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -
        1.0}, (0, -1): {(6, 1): -1.0}, (-1, 1): {(5, 3): -
        1.4142135623730951}, (1, -1): {(6, 2): -1}, (1, 1): {(6, 2): -1}, (
        -1, -1): {(5, 1): -1.4142135623730951}}, (6, 3): {(1, 0): {(6, 3): 
        -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5, 3): -1.0}, (0, -1): {(6,
        2): -1.0}, (-1, 1): {(5, 4): -1.4142135623730951}, (1, -1): {(6, 3):
        -1}, (1, 1): {(6, 3): -1}, (-1, -1): {(5, 2): -1.4142135623730951}},
        (6, 4): {(1, 0): {(6, 4): -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5,
        4): -1.0}, (0, -1): {(6, 3): -1.0}, (-1, 1): {(5, 5): -
        1.4142135623730951}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4): -1}, (
        -1, -1): {(5, 3): -1.4142135623730951}}, (6, 5): {(1, 0): {(6, 5): 
        -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4
        ): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6,
        5): -1}, (-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardC = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0}, (-1,
        0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1}, (1,
        -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, -1):
        {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2): -
        1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1): {(0,
        1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 2): -
        1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0): {(1,
        2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, -1):
        {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): 10}, (
        0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): 10}, (0, -1): {(1, 4): 10},
        (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): 10}, (1, 1): {(1, 5): -1},
        (-1, -1): {(0, 4): 10}}, (2, 0): {(1, 0): {(3, 0): -1.0}, (0, 1): {
        (2, 1): -1.0}, (-1, 0): {(1, 0): -1.0}, (0, -1): {(2, 0): -1}, (-1,
        1): {(1, 1): -1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {
        (3, 1): -1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1,
        0): {(3, 1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0},
        (0, -1): {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1,
        -1): {(3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -
        1.4142135623730951}, (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 
        2): {(1, 0): {(3, 2): -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 
        2): -1.0}, (0, -1): {(2, 1): -1.0}, (-1, 1): {(1, 3): -
        1.4142135623730951}, (1, -1): {(3, 1): -1.4142135623730951}, (1, 1):
        {(3, 3): -1.4142135623730951}, (-1, -1): {(1, 1): -
        1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -1.0}, (0, 1): {(2,
        4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2, 2): -1.0}, (-1, 1
        ): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2): -
        1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -1
        ): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -100}, (0, 1): {(3, 2): -100}, (-1, 0):
        {(2, 1): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 2): -100}, (
        1, -1): {(4, 0): -100}, (1, 1): {(4, 2): -100}, (-1, -1): {(2, 0): 
        -100}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3, 3): -100}, (-
        1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1): {(2, 3): -
        100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100}, (-1, -1): {(
        2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1): {(3, 4): -
        100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (-1, 1): {(
        2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -100}, (-1,
        -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (0, 1): {(3,
        5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -1.0}, (-1, 1
        ): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5, 4): -1.0}, (0, -1): {(6,
        3): -1.0}, (-1, 1): {(5, 5): -1.4142135623730951}, (1, -1): {(6, 4):
        -1}, (1, 1): {(6, 4): -1}, (-1, -1): {(5, 3): -1.4142135623730951}},
        (6, 5): {(1, 0): {(6, 5): -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 
        5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1):
        {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1, -1): {(5, 4): -
        1.4142135623730951}}}
    rewardAGap = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0},
        (-1, 0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1},
        (1, -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, 
        -1): {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2
        ): -1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1):
        {(0, 1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 
        2): -1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0):
        {(1, 2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, 
        -1): {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -1.0}, (0, 1): {(3, 2): -1.0}, (-1, 0):
        {(2, 1): -1.0}, (0, -1): {(3, 0): -1.0}, (-1, 1): {(2, 2): -
        1.4142135623730951}, (1, -1): {(4, 0): -1.4142135623730951}, (1, 1):
        {(4, 2): -1.4142135623730951}, (-1, -1): {(2, 0): -
        1.4142135623730951}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3,
        3): -100}, (-1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1
        ): {(2, 3): -100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100},
        (-1, -1): {(2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1):
        {(3, 4): -100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (
        -1, 1): {(2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -
        100}, (-1, -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (
        0, 1): {(3, 5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -
        1.0}, (-1, 1): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): 10}, (-1, 0): {(5, 4): 10}, (0, -1): {(6, 3):
        10}, (-1, 1): {(5, 5): 10}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4):
        -1}, (-1, -1): {(5, 3): 10}}, (6, 5): {(1, 0): {(6, 5): -1}, (0, 1):
        {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1,
        1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1,
        -1): {(5, 4): -1.4142135623730951}}}
    rewardBGap = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0},
        (-1, 0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1},
        (1, -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, 
        -1): {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2
        ): -1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1):
        {(0, 1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 
        2): -1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0):
        {(1, 2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, 
        -1): {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -1.0}, (0, 1): {(3, 2): -1.0}, (-1, 0):
        {(2, 1): -1.0}, (0, -1): {(3, 0): -1.0}, (-1, 1): {(2, 2): -
        1.4142135623730951}, (1, -1): {(4, 0): -1.4142135623730951}, (1, 1):
        {(4, 2): -1.4142135623730951}, (-1, -1): {(2, 0): -
        1.4142135623730951}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3,
        3): -100}, (-1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1
        ): {(2, 3): -100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100},
        (-1, -1): {(2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1):
        {(3, 4): -100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (
        -1, 1): {(2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -
        100}, (-1, -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (
        0, 1): {(3, 5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -
        1.0}, (-1, 1): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): 10}, (-1, 0):
        {(5, 1): 10}, (0, -1): {(6, 0): 10}, (-1, 1): {(5, 2): 10}, (1, -1):
        {(6, 1): -1}, (1, 1): {(6, 1): -1}, (-1, -1): {(5, 0): 10}}, (6, 2):
        {(1, 0): {(6, 2): -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -
        1.0}, (0, -1): {(6, 1): -1.0}, (-1, 1): {(5, 3): -
        1.4142135623730951}, (1, -1): {(6, 2): -1}, (1, 1): {(6, 2): -1}, (
        -1, -1): {(5, 1): -1.4142135623730951}}, (6, 3): {(1, 0): {(6, 3): 
        -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5, 3): -1.0}, (0, -1): {(6,
        2): -1.0}, (-1, 1): {(5, 4): -1.4142135623730951}, (1, -1): {(6, 3):
        -1}, (1, 1): {(6, 3): -1}, (-1, -1): {(5, 2): -1.4142135623730951}},
        (6, 4): {(1, 0): {(6, 4): -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5,
        4): -1.0}, (0, -1): {(6, 3): -1.0}, (-1, 1): {(5, 5): -
        1.4142135623730951}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4): -1}, (
        -1, -1): {(5, 3): -1.4142135623730951}}, (6, 5): {(1, 0): {(6, 5): 
        -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4
        ): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6,
        5): -1}, (-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardCGap = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0},
        (-1, 0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1},
        (1, -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, 
        -1): {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2
        ): -1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1):
        {(0, 1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 
        2): -1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0):
        {(1, 2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, 
        -1): {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): 10}, (
        0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): 10}, (0, -1): {(1, 4): 10},
        (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): 10}, (1, 1): {(1, 5): -1},
        (-1, -1): {(0, 4): 10}}, (2, 0): {(1, 0): {(3, 0): -1.0}, (0, 1): {
        (2, 1): -1.0}, (-1, 0): {(1, 0): -1.0}, (0, -1): {(2, 0): -1}, (-1,
        1): {(1, 1): -1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {
        (3, 1): -1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1,
        0): {(3, 1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0},
        (0, -1): {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1,
        -1): {(3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -
        1.4142135623730951}, (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 
        2): {(1, 0): {(3, 2): -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 
        2): -1.0}, (0, -1): {(2, 1): -1.0}, (-1, 1): {(1, 3): -
        1.4142135623730951}, (1, -1): {(3, 1): -1.4142135623730951}, (1, 1):
        {(3, 3): -1.4142135623730951}, (-1, -1): {(1, 1): -
        1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -1.0}, (0, 1): {(2,
        4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2, 2): -1.0}, (-1, 1
        ): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2): -
        1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -1
        ): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -1.0}, (0, 1): {(3, 2): -1.0}, (-1, 0):
        {(2, 1): -1.0}, (0, -1): {(3, 0): -1.0}, (-1, 1): {(2, 2): -
        1.4142135623730951}, (1, -1): {(4, 0): -1.4142135623730951}, (1, 1):
        {(4, 2): -1.4142135623730951}, (-1, -1): {(2, 0): -
        1.4142135623730951}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3,
        3): -100}, (-1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1
        ): {(2, 3): -100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100},
        (-1, -1): {(2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1):
        {(3, 4): -100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (
        -1, 1): {(2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -
        100}, (-1, -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (
        0, 1): {(3, 5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -
        1.0}, (-1, 1): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5, 4): -1.0}, (0, -1): {(6,
        3): -1.0}, (-1, 1): {(5, 5): -1.4142135623730951}, (1, -1): {(6, 4):
        -1}, (1, 1): {(6, 4): -1}, (-1, -1): {(5, 3): -1.4142135623730951}},
        (6, 5): {(1, 0): {(6, 5): -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 
        5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1):
        {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1, -1): {(5, 4): -
        1.4142135623730951}}}
    performValueIteration = ValueIteration(transition, rewardA, valueTable,
        convergenceTolerance, gamma)
    optimalValuesA, policyTableA = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 4),
        trapStates=[(3, 0), (3, 1), (3, 2), (3, 3)], valueTable=optimalValuesA)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 4), trapStates
        =[(3, 0), (3, 1), (3, 2), (3, 3)], policy=policyTableA)
    print(p_traj(trajectoryToGoalA, beta, gamma, transition, rewardA,
        optimalValuesA))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalA, beta, gamma,
        transition, rewardA, optimalValuesA))
    plt.ylabel('Probabilty of goal A (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol A without gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardAGap,
        valueTable, convergenceTolerance, gamma)
    optimalValuesAG, policyTableAG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 4),
        trapStates=[(3, 0), (3, 2), (3, 3)], valueTable=optimalValuesAG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 4), trapStates
        =[(3, 0), (3, 2), (3, 3)], policy=policyTableAG)
    print(p_traj(trajectoryToGoalA, beta, gamma, transition, rewardAGap,
        optimalValuesAG))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalA, beta, gamma,
        transition, rewardAGap, optimalValuesAG))
    plt.ylabel('Probabilty of goal A Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol A with gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardB, valueTable,
        convergenceTolerance, gamma)
    optimalValuesB, policyTableB = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 1),
        trapStates=[(3, 0), (3, 1), (3, 2), (3, 3)], valueTable=optimalValuesB)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 1), trapStates
        =[(3, 0), (3, 1), (3, 2), (3, 3)], policy=policyTableB)
    print(p_traj(trajectoryToGoalB, beta, gamma, transition, rewardB,
        optimalValuesB))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalB, beta, gamma,
        transition, rewardB, optimalValuesB))
    plt.ylabel('Probabilty of goal B (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol B without gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardBGap,
        valueTable, convergenceTolerance, gamma)
    optimalValuesBG, policyTableBG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 1),
        trapStates=[(3, 0), (3, 2), (3, 3)], valueTable=optimalValuesBG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 1), trapStates
        =[(3, 0), (3, 2), (3, 3)], policy=policyTableBG)
    print(p_traj(trajectoryToGoalB, beta, gamma, transition, rewardBGap,
        optimalValuesBG))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalB, beta, gamma,
        transition, rewardBGap, optimalValuesBG))
    plt.ylabel('Probabilty of goal B Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol B with gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardC, valueTable,
        convergenceTolerance, gamma)
    optimalValuesC, policyTableC = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(1, 5),
        trapStates=[(3, 0), (3, 1), (3, 2), (3, 3)], valueTable=optimalValuesC)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(1, 5), trapStates
        =[(3, 0), (3, 1), (3, 2), (3, 3)], policy=policyTableC)
    print(p_traj(trajectoryToGoalC, beta, gamma, transition, rewardC,
        optimalValuesC))
    plt.plot([2, 3, 4, 5, 6], p_traj(trajectoryToGoalC, beta, gamma,
        transition, rewardC, optimalValuesC))
    plt.ylabel('Probabilty of goal C (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol C without gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardCGap,
        valueTable, convergenceTolerance, gamma)
    optimalValuesCG, policyTableCG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(1, 5),
        trapStates=[(3, 0), (3, 2), (3, 3)], valueTable=optimalValuesCG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(1, 5), trapStates
        =[(3, 0), (3, 2), (3, 3)], policy=policyTableCG)
    print(p_traj(trajectoryToGoalC, beta, gamma, transition, rewardCGap,
        optimalValuesCG))
    plt.plot([2, 3, 4, 5, 6], p_traj(trajectoryToGoalC, beta, gamma,
        transition, rewardCGap, optimalValuesCG))
    plt.ylabel('Probabilty of goal C Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol C with gap')
    plt.show()


<mask token>

<mask token>


class ValueIteration(object):

    def __init__(self, transitionTable, rewardTable, valueTable,
        convergenceTolerance, gamma):
        self.transitionTable = transitionTable
        self.rewardTable = rewardTable
        self.valueTable = valueTable
        self.convergenceTolerance = convergenceTolerance
        self.gamma = gamma

    def __call__(self):
        ValueTable = self.valueTable
        tempValueTable = copy.copy(ValueTable)
        delta = 1
        while delta >= self.convergenceTolerance:
            delta = 0
            for s in ValueTable:
                v = ValueTable[s]
                lib_s = self.transitionTable[s]
                max_a = 0
                for a in lib_s:
                    sum_sr = 0
                    lib_a = lib_s[a]
                    for ns in lib_a:
                        sum_sr = sum_sr + lib_a[ns] * (self.rewardTable[s][
                            a][ns] + self.gamma * tempValueTable[ns])
                    max_a = max(max_a, sum_sr)
                ValueTable[s] = max_a
                delta = max(delta, abs(v - ValueTable[s]))
            tempValueTable = copy.copy(ValueTable)
        policyTable = {}
        for s in ValueTable:
            lib_s = self.transitionTable[s]
            pi_s = 0, 0
            vs = 0
            prob_ns = 0
            for a in lib_s:
                sum_sr = 0
                lib_a = lib_s[a]
                for ns in lib_a:
                    sum_sr = sum_sr + lib_a[ns] * (self.rewardTable[s][a][
                        ns] + self.gamma * ValueTable[ns])
                if sum_sr > vs:
                    pi_s = a
                    vs = sum_sr
                    pi_ns = 0, 0
                    v_ns = 0
                    for ns in lib_a:
                        if ValueTable[ns] > v_ns:
                            pi_ns = ns
                            v_ns = ValueTable[ns]
                            prob_ns = lib_a[ns]
            policyTable[s] = {pi_s: prob_ns}
        return [ValueTable, policyTable]


def visualizeValueTable(gridWidth, gridHeight, goalState, trapStates,
    valueTable):
    gridAdjust = 0.5
    gridScale = 1.5
    xs = np.linspace(-gridAdjust, gridWidth - gridAdjust, gridWidth + 1)
    ys = np.linspace(-gridAdjust, gridHeight - gridAdjust, gridHeight + 1)
    plt.rcParams['figure.figsize'] = [gridWidth * gridScale, gridHeight *
        gridScale]
    ax = plt.gca(frameon=False, xticks=range(gridWidth), yticks=range(
        gridHeight))
    ax.add_patch(Rectangle((goalState[0] - gridAdjust, goalState[1] -
        gridAdjust), 1, 1, fill=True, color='green', alpha=0.1))
    for trapx, trapy in trapStates:
        ax.add_patch(Rectangle((trapx - gridAdjust, trapy - gridAdjust), 1,
            1, fill=True, color='black', alpha=0.1))
    for x in xs:
        plt.plot([x, x], [ys[0], ys[-1]], color='black')
    for y in ys:
        plt.plot([xs[0], xs[-1]], [y, y], color='black')
    for (statex, statey), val in valueTable.items():
        plt.text(statex - 0.2, statey, str(round(val, 3)))
    plt.show()


def visualizePolicy(gridWidth, gridHeight, goalState, trapStates, policy):
    gridAdjust = 0.5
    gridScale = 1.5
    arrowScale = 0.5
    xs = np.linspace(-gridAdjust, gridWidth - gridAdjust, gridWidth + 1)
    ys = np.linspace(-gridAdjust, gridHeight - gridAdjust, gridHeight + 1)
    plt.rcParams['figure.figsize'] = [gridWidth * gridScale, gridHeight *
        gridScale]
    ax = plt.gca(frameon=False, xticks=range(gridWidth), yticks=range(
        gridHeight))
    ax.add_patch(Rectangle((goalState[0] - gridAdjust, goalState[1] -
        gridAdjust), 1, 1, fill=True, color='green', alpha=0.1))
    for trapx, trapy in trapStates:
        ax.add_patch(Rectangle((trapx - gridAdjust, trapy - gridAdjust), 1,
            1, fill=True, color='black', alpha=0.1))
    for x in xs:
        plt.plot([x, x], [ys[0], ys[-1]], color='black')
    for y in ys:
        plt.plot([xs[0], xs[-1]], [y, y], color='black')
    for (statex, statey), actionDict in policy.items():
        for (optimalActionX, optimalActionY), actionProb in actionDict.items():
            plt.arrow(statex, statey, optimalActionX * actionProb *
                arrowScale, optimalActionY * actionProb * arrowScale,
                head_width=0.05 * actionProb, head_length=0.1 * actionProb)
    plt.show()


def viewDictionaryStructure(d, levels, indent=0):
    for key, value in d.items():
        print('\t' * indent + str(levels[indent]) + ': ' + str(key))
        if isinstance(value, dict):
            viewDictionaryStructure(value, levels, indent + 1)
        else:
            print('\t' * (indent + 1) + str(levels[indent + 1]) + ': ' +
                str(value))


def p_traj(traj, beta, gamma, transitTable, rewardTable, valueTable):
    p = 1
    ret = []
    for i in range(len(traj) - 1):
        p = p * p_stn_st(traj[i], traj[i + 1], beta, gamma, transitTable,
            rewardTable, valueTable)
        ret = ret + [p]
    return ret


def p_stn_st(st, stn, beta, gamma, transitTable, rewardTable, valueTable):
    lib_s = transitTable[st]
    p = 0
    for at in lib_s:
        if stn in lib_s[at]:
            p = p + lib_s[at][stn] * pias(st, at, beta, gamma, transitTable,
                rewardTable, valueTable)
    return p


def pias(st, at, beta, gamma, transitTable, rewardTable, valueTable):
    return math.log(beta * q(st, at, gamma, transitTable, rewardTable,
        valueTable))


def q(st, at, gamma, transitTable, rewardTable, valueTable):
    lib_sa = transitTable[st][at]
    q = 0
    for ns in lib_sa:
        q = q + lib_sa[ns] * (rewardTable[st][at][ns] + gamma * valueTable[ns])
    return q


def main():
    gamma = 0.95
    beta = 0.4
    convergenceTolerance = 1e-06
    transition = {(0, 0): {(1, 0): {(1, 0): 1}, (0, 1): {(0, 1): 1}, (-1, 0
        ): {(0, 0): 1}, (0, -1): {(0, 0): 1}, (-1, 1): {(0, 0): 1}, (1, -1):
        {(0, 0): 1}, (1, 1): {(1, 1): 1}, (-1, -1): {(0, 0): 1}}, (0, 1): {
        (1, 0): {(1, 1): 1}, (0, 1): {(0, 2): 1}, (-1, 0): {(0, 1): 1}, (0,
        -1): {(0, 0): 1}, (-1, 1): {(0, 1): 1}, (1, -1): {(1, 0): 1}, (1, 1
        ): {(1, 2): 1}, (-1, -1): {(0, 1): 1}}, (0, 2): {(1, 0): {(1, 2): 1
        }, (0, 1): {(0, 3): 1}, (-1, 0): {(0, 2): 1}, (0, -1): {(0, 1): 1},
        (-1, 1): {(0, 2): 1}, (1, -1): {(1, 1): 1}, (1, 1): {(1, 3): 1}, (-
        1, -1): {(0, 2): 1}}, (0, 3): {(1, 0): {(1, 3): 1}, (0, 1): {(0, 4):
        1}, (-1, 0): {(0, 3): 1}, (0, -1): {(0, 2): 1}, (-1, 1): {(0, 3): 1
        }, (1, -1): {(1, 2): 1}, (1, 1): {(1, 4): 1}, (-1, -1): {(0, 3): 1}
        }, (0, 4): {(1, 0): {(1, 4): 1}, (0, 1): {(0, 5): 1}, (-1, 0): {(0,
        4): 1}, (0, -1): {(0, 3): 1}, (-1, 1): {(0, 4): 1}, (1, -1): {(1, 3
        ): 1}, (1, 1): {(1, 5): 1}, (-1, -1): {(0, 4): 1}}, (0, 5): {(1, 0):
        {(1, 5): 1}, (0, 1): {(0, 5): 1}, (-1, 0): {(0, 5): 1}, (0, -1): {(
        0, 4): 1}, (-1, 1): {(0, 5): 1}, (1, -1): {(1, 4): 1}, (1, 1): {(0,
        5): 1}, (-1, -1): {(0, 5): 1}}, (1, 0): {(1, 0): {(2, 0): 1}, (0, 1
        ): {(1, 1): 1}, (-1, 0): {(0, 0): 1}, (0, -1): {(1, 0): 1}, (-1, 1):
        {(0, 1): 1}, (1, -1): {(1, 0): 1}, (1, 1): {(2, 1): 1}, (-1, -1): {
        (1, 0): 1}}, (1, 1): {(1, 0): {(2, 1): 1}, (0, 1): {(1, 2): 1}, (-1,
        0): {(0, 1): 1}, (0, -1): {(1, 0): 1}, (-1, 1): {(0, 2): 1}, (1, -1
        ): {(2, 0): 1}, (1, 1): {(2, 2): 1}, (-1, -1): {(0, 0): 1}}, (1, 2):
        {(1, 0): {(2, 2): 1}, (0, 1): {(1, 3): 1}, (-1, 0): {(0, 2): 1}, (0,
        -1): {(1, 1): 1}, (-1, 1): {(0, 3): 1}, (1, -1): {(2, 1): 1}, (1, 1
        ): {(2, 3): 1}, (-1, -1): {(0, 1): 1}}, (1, 3): {(1, 0): {(2, 3): 1
        }, (0, 1): {(1, 4): 1}, (-1, 0): {(0, 3): 1}, (0, -1): {(1, 2): 1},
        (-1, 1): {(0, 4): 1}, (1, -1): {(2, 2): 1}, (1, 1): {(2, 4): 1}, (-
        1, -1): {(0, 2): 1}}, (1, 4): {(1, 0): {(2, 4): 1}, (0, 1): {(1, 5):
        1}, (-1, 0): {(0, 4): 1}, (0, -1): {(1, 3): 1}, (-1, 1): {(0, 5): 1
        }, (1, -1): {(2, 3): 1}, (1, 1): {(2, 5): 1}, (-1, -1): {(0, 3): 1}
        }, (1, 5): {(1, 0): {(2, 5): 1}, (0, 1): {(1, 5): 1}, (-1, 0): {(0,
        5): 1}, (0, -1): {(1, 4): 1}, (-1, 1): {(1, 5): 1}, (1, -1): {(2, 4
        ): 1}, (1, 1): {(1, 5): 1}, (-1, -1): {(0, 4): 1}}, (2, 0): {(1, 0):
        {(3, 0): 1}, (0, 1): {(2, 1): 1}, (-1, 0): {(1, 0): 1}, (0, -1): {(
        2, 0): 1}, (-1, 1): {(1, 1): 1}, (1, -1): {(2, 0): 1}, (1, 1): {(3,
        1): 1}, (-1, -1): {(2, 0): 1}}, (2, 1): {(1, 0): {(3, 1): 1}, (0, 1
        ): {(2, 2): 1}, (-1, 0): {(1, 1): 1}, (0, -1): {(2, 0): 1}, (-1, 1):
        {(1, 2): 1}, (1, -1): {(3, 0): 1}, (1, 1): {(3, 2): 1}, (-1, -1): {
        (1, 0): 1}}, (2, 2): {(1, 0): {(3, 2): 1}, (0, 1): {(2, 3): 1}, (-1,
        0): {(1, 2): 1}, (0, -1): {(2, 1): 1}, (-1, 1): {(1, 3): 1}, (1, -1
        ): {(3, 1): 1}, (1, 1): {(3, 3): 1}, (-1, -1): {(1, 1): 1}}, (2, 3):
        {(1, 0): {(3, 3): 1}, (0, 1): {(2, 4): 1}, (-1, 0): {(1, 3): 1}, (0,
        -1): {(2, 2): 1}, (-1, 1): {(1, 4): 1}, (1, -1): {(3, 2): 1}, (1, 1
        ): {(3, 4): 1}, (-1, -1): {(1, 2): 1}}, (2, 4): {(1, 0): {(3, 4): 1
        }, (0, 1): {(2, 5): 1}, (-1, 0): {(1, 4): 1}, (0, -1): {(2, 3): 1},
        (-1, 1): {(1, 5): 1}, (1, -1): {(3, 3): 1}, (1, 1): {(3, 5): 1}, (-
        1, -1): {(1, 3): 1}}, (2, 5): {(1, 0): {(3, 5): 1}, (0, 1): {(2, 5):
        1}, (-1, 0): {(1, 5): 1}, (0, -1): {(2, 4): 1}, (-1, 1): {(2, 5): 1
        }, (1, -1): {(3, 4): 1}, (1, 1): {(2, 5): 1}, (-1, -1): {(1, 4): 1}
        }, (3, 0): {(1, 0): {(4, 0): 1}, (0, 1): {(3, 1): 1}, (-1, 0): {(2,
        0): 1}, (0, -1): {(3, 0): 1}, (-1, 1): {(2, 1): 1}, (1, -1): {(3, 0
        ): 1}, (1, 1): {(4, 1): 1}, (-1, -1): {(3, 0): 1}}, (3, 1): {(1, 0):
        {(4, 1): 1}, (0, 1): {(3, 2): 1}, (-1, 0): {(2, 1): 1}, (0, -1): {(
        3, 0): 1}, (-1, 1): {(2, 2): 1}, (1, -1): {(4, 0): 1}, (1, 1): {(4,
        2): 1}, (-1, -1): {(2, 0): 1}}, (3, 2): {(1, 0): {(4, 2): 1}, (0, 1
        ): {(3, 3): 1}, (-1, 0): {(2, 2): 1}, (0, -1): {(3, 1): 1}, (-1, 1):
        {(2, 3): 1}, (1, -1): {(4, 1): 1}, (1, 1): {(4, 3): 1}, (-1, -1): {
        (2, 1): 1}}, (3, 3): {(1, 0): {(4, 3): 1}, (0, 1): {(3, 4): 1}, (-1,
        0): {(2, 3): 1}, (0, -1): {(3, 2): 1}, (-1, 1): {(2, 4): 1}, (1, -1
        ): {(4, 2): 1}, (1, 1): {(4, 4): 1}, (-1, -1): {(2, 2): 1}}, (3, 4):
        {(1, 0): {(4, 4): 1}, (0, 1): {(3, 5): 1}, (-1, 0): {(2, 4): 1}, (0,
        -1): {(3, 3): 1}, (-1, 1): {(2, 5): 1}, (1, -1): {(4, 3): 1}, (1, 1
        ): {(4, 5): 1}, (-1, -1): {(2, 3): 1}}, (3, 5): {(1, 0): {(4, 5): 1
        }, (0, 1): {(3, 5): 1}, (-1, 0): {(2, 5): 1}, (0, -1): {(3, 4): 1},
        (-1, 1): {(3, 5): 1}, (1, -1): {(4, 4): 1}, (1, 1): {(3, 5): 1}, (-
        1, -1): {(2, 4): 1}}, (4, 0): {(1, 0): {(5, 0): 1}, (0, 1): {(4, 1):
        1}, (-1, 0): {(3, 0): 1}, (0, -1): {(4, 0): 1}, (-1, 1): {(3, 1): 1
        }, (1, -1): {(4, 0): 1}, (1, 1): {(5, 1): 1}, (-1, -1): {(4, 0): 1}
        }, (4, 1): {(1, 0): {(5, 1): 1}, (0, 1): {(4, 2): 1}, (-1, 0): {(3,
        1): 1}, (0, -1): {(4, 0): 1}, (-1, 1): {(3, 2): 1}, (1, -1): {(5, 0
        ): 1}, (1, 1): {(5, 2): 1}, (-1, -1): {(3, 0): 1}}, (4, 2): {(1, 0):
        {(5, 2): 1}, (0, 1): {(4, 3): 1}, (-1, 0): {(3, 2): 1}, (0, -1): {(
        4, 1): 1}, (-1, 1): {(3, 3): 1}, (1, -1): {(5, 1): 1}, (1, 1): {(5,
        3): 1}, (-1, -1): {(3, 1): 1}}, (4, 3): {(1, 0): {(5, 3): 1}, (0, 1
        ): {(4, 4): 1}, (-1, 0): {(3, 3): 1}, (0, -1): {(4, 2): 1}, (-1, 1):
        {(3, 4): 1}, (1, -1): {(5, 2): 1}, (1, 1): {(5, 4): 1}, (-1, -1): {
        (3, 2): 1}}, (4, 4): {(1, 0): {(5, 4): 1}, (0, 1): {(4, 5): 1}, (-1,
        0): {(3, 4): 1}, (0, -1): {(4, 3): 1}, (-1, 1): {(3, 5): 1}, (1, -1
        ): {(5, 3): 1}, (1, 1): {(5, 5): 1}, (-1, -1): {(3, 3): 1}}, (4, 5):
        {(1, 0): {(5, 5): 1}, (0, 1): {(4, 5): 1}, (-1, 0): {(3, 5): 1}, (0,
        -1): {(4, 4): 1}, (-1, 1): {(4, 5): 1}, (1, -1): {(5, 4): 1}, (1, 1
        ): {(4, 5): 1}, (-1, -1): {(3, 4): 1}}, (5, 0): {(1, 0): {(6, 0): 1
        }, (0, 1): {(5, 1): 1}, (-1, 0): {(4, 0): 1}, (0, -1): {(5, 0): 1},
        (-1, 1): {(4, 1): 1}, (1, -1): {(5, 0): 1}, (1, 1): {(6, 1): 1}, (-
        1, -1): {(5, 0): 1}}, (5, 1): {(1, 0): {(6, 1): 1}, (0, 1): {(5, 2):
        1}, (-1, 0): {(4, 1): 1}, (0, -1): {(5, 0): 1}, (-1, 1): {(4, 2): 1
        }, (1, -1): {(6, 0): 1}, (1, 1): {(6, 2): 1}, (-1, -1): {(4, 0): 1}
        }, (5, 2): {(1, 0): {(6, 2): 1}, (0, 1): {(5, 3): 1}, (-1, 0): {(4,
        2): 1}, (0, -1): {(5, 1): 1}, (-1, 1): {(4, 3): 1}, (1, -1): {(6, 1
        ): 1}, (1, 1): {(6, 3): 1}, (-1, -1): {(4, 1): 1}}, (5, 3): {(1, 0):
        {(6, 3): 1}, (0, 1): {(5, 4): 1}, (-1, 0): {(4, 3): 1}, (0, -1): {(
        5, 2): 1}, (-1, 1): {(4, 4): 1}, (1, -1): {(6, 2): 1}, (1, 1): {(6,
        4): 1}, (-1, -1): {(4, 2): 1}}, (5, 4): {(1, 0): {(6, 4): 1}, (0, 1
        ): {(5, 5): 1}, (-1, 0): {(4, 4): 1}, (0, -1): {(5, 3): 1}, (-1, 1):
        {(4, 5): 1}, (1, -1): {(6, 3): 1}, (1, 1): {(6, 5): 1}, (-1, -1): {
        (4, 3): 1}}, (5, 5): {(1, 0): {(6, 5): 1}, (0, 1): {(5, 5): 1}, (-1,
        0): {(4, 5): 1}, (0, -1): {(5, 4): 1}, (-1, 1): {(5, 5): 1}, (1, -1
        ): {(6, 4): 1}, (1, 1): {(5, 5): 1}, (-1, -1): {(4, 4): 1}}, (6, 0):
        {(1, 0): {(6, 0): 1}, (0, 1): {(6, 1): 1}, (-1, 0): {(5, 0): 1}, (0,
        -1): {(6, 0): 1}, (-1, 1): {(5, 1): 1}, (1, -1): {(6, 0): 1}, (1, 1
        ): {(6, 0): 1}, (-1, -1): {(6, 0): 1}}, (6, 1): {(1, 0): {(6, 1): 1
        }, (0, 1): {(6, 2): 1}, (-1, 0): {(5, 1): 1}, (0, -1): {(6, 0): 1},
        (-1, 1): {(5, 2): 1}, (1, -1): {(6, 1): 1}, (1, 1): {(6, 1): 1}, (-
        1, -1): {(5, 0): 1}}, (6, 2): {(1, 0): {(6, 2): 1}, (0, 1): {(6, 3):
        1}, (-1, 0): {(5, 2): 1}, (0, -1): {(6, 1): 1}, (-1, 1): {(5, 3): 1
        }, (1, -1): {(6, 2): 1}, (1, 1): {(6, 2): 1}, (-1, -1): {(5, 1): 1}
        }, (6, 3): {(1, 0): {(6, 3): 1}, (0, 1): {(6, 4): 1}, (-1, 0): {(5,
        3): 1}, (0, -1): {(6, 2): 1}, (-1, 1): {(5, 4): 1}, (1, -1): {(6, 3
        ): 1}, (1, 1): {(6, 3): 1}, (-1, -1): {(5, 2): 1}}, (6, 4): {(1, 0):
        {(6, 4): 1}, (0, 1): {(6, 5): 1}, (-1, 0): {(5, 4): 1}, (0, -1): {(
        6, 3): 1}, (-1, 1): {(5, 5): 1}, (1, -1): {(6, 4): 1}, (1, 1): {(6,
        4): 1}, (-1, -1): {(5, 3): 1}}, (6, 5): {(1, 0): {(6, 5): 1}, (0, 1
        ): {(6, 5): 1}, (-1, 0): {(5, 5): 1}, (0, -1): {(6, 4): 1}, (-1, 1):
        {(6, 5): 1}, (1, -1): {(6, 5): 1}, (1, 1): {(6, 5): 1}, (-1, -1): {
        (5, 4): 1}}}
    valueTable = {(0, 0): 0, (0, 1): 0, (0, 2): 0, (0, 3): 0, (0, 4): 0, (0,
        5): 0, (1, 0): 0, (1, 1): 0, (1, 2): 0, (1, 3): 0, (1, 4): 0, (1, 5
        ): 0, (2, 0): 0, (2, 1): 0, (2, 2): 0, (2, 3): 0, (2, 4): 0, (2, 5):
        0, (3, 0): 0, (3, 1): 0, (3, 2): 0, (3, 3): 0, (3, 4): 0, (3, 5): 0,
        (4, 0): 0, (4, 1): 0, (4, 2): 0, (4, 3): 0, (4, 4): 0, (4, 5): 0, (
        5, 0): 0, (5, 1): 0, (5, 2): 0, (5, 3): 0, (5, 4): 0, (5, 5): 0, (6,
        0): 0, (6, 1): 0, (6, 2): 0, (6, 3): 0, (6, 4): 0, (6, 5): 0}
    trajectoryToGoalA = [(0, 0), (1, 1), (1, 2), (2, 3), (3, 4), (4, 4), (5,
        4), (6, 4)]
    trajectoryToGoalB = [(0, 0), (1, 1), (2, 2), (2, 3), (3, 4), (4, 3), (5,
        2), (6, 1)]
    trajectoryToGoalC = [(0, 0), (0, 1), (1, 2), (1, 3), (1, 4), (1, 5)]
    rewardA = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0}, (-1,
        0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1}, (1,
        -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, -1):
        {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2): -
        1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1): {(0,
        1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 2): -
        1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0): {(1,
        2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, -1):
        {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -100}, (0, 1): {(3, 2): -100}, (-1, 0):
        {(2, 1): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 2): -100}, (
        1, -1): {(4, 0): -100}, (1, 1): {(4, 2): -100}, (-1, -1): {(2, 0): 
        -100}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3, 3): -100}, (-
        1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1): {(2, 3): -
        100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100}, (-1, -1): {(
        2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1): {(3, 4): -
        100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (-1, 1): {(
        2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -100}, (-1,
        -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (0, 1): {(3,
        5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -1.0}, (-1, 1
        ): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): 10}, (-1, 0): {(5, 4): 10}, (0, -1): {(6, 3):
        10}, (-1, 1): {(5, 5): 10}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4):
        -1}, (-1, -1): {(5, 3): 10}}, (6, 5): {(1, 0): {(6, 5): -1}, (0, 1):
        {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1,
        1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1,
        -1): {(5, 4): -1.4142135623730951}}}
    rewardB = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0}, (-1,
        0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1}, (1,
        -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, -1):
        {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2): -
        1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1): {(0,
        1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 2): -
        1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0): {(1,
        2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, -1):
        {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -100}, (0, 1): {(3, 2): -100}, (-1, 0):
        {(2, 1): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 2): -100}, (
        1, -1): {(4, 0): -100}, (1, 1): {(4, 2): -100}, (-1, -1): {(2, 0): 
        -100}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3, 3): -100}, (-
        1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1): {(2, 3): -
        100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100}, (-1, -1): {(
        2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1): {(3, 4): -
        100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (-1, 1): {(
        2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -100}, (-1,
        -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (0, 1): {(3,
        5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -1.0}, (-1, 1
        ): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): 10}, (-1, 0):
        {(5, 1): 10}, (0, -1): {(6, 0): 10}, (-1, 1): {(5, 2): 10}, (1, -1):
        {(6, 1): -1}, (1, 1): {(6, 1): -1}, (-1, -1): {(5, 0): 10}}, (6, 2):
        {(1, 0): {(6, 2): -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -
        1.0}, (0, -1): {(6, 1): -1.0}, (-1, 1): {(5, 3): -
        1.4142135623730951}, (1, -1): {(6, 2): -1}, (1, 1): {(6, 2): -1}, (
        -1, -1): {(5, 1): -1.4142135623730951}}, (6, 3): {(1, 0): {(6, 3): 
        -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5, 3): -1.0}, (0, -1): {(6,
        2): -1.0}, (-1, 1): {(5, 4): -1.4142135623730951}, (1, -1): {(6, 3):
        -1}, (1, 1): {(6, 3): -1}, (-1, -1): {(5, 2): -1.4142135623730951}},
        (6, 4): {(1, 0): {(6, 4): -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5,
        4): -1.0}, (0, -1): {(6, 3): -1.0}, (-1, 1): {(5, 5): -
        1.4142135623730951}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4): -1}, (
        -1, -1): {(5, 3): -1.4142135623730951}}, (6, 5): {(1, 0): {(6, 5): 
        -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4
        ): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6,
        5): -1}, (-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardC = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0}, (-1,
        0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1}, (1,
        -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, -1):
        {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2): -
        1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1): {(0,
        1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 2): -
        1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0): {(1,
        2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, -1):
        {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): 10}, (
        0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): 10}, (0, -1): {(1, 4): 10},
        (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): 10}, (1, 1): {(1, 5): -1},
        (-1, -1): {(0, 4): 10}}, (2, 0): {(1, 0): {(3, 0): -1.0}, (0, 1): {
        (2, 1): -1.0}, (-1, 0): {(1, 0): -1.0}, (0, -1): {(2, 0): -1}, (-1,
        1): {(1, 1): -1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {
        (3, 1): -1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1,
        0): {(3, 1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0},
        (0, -1): {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1,
        -1): {(3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -
        1.4142135623730951}, (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 
        2): {(1, 0): {(3, 2): -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 
        2): -1.0}, (0, -1): {(2, 1): -1.0}, (-1, 1): {(1, 3): -
        1.4142135623730951}, (1, -1): {(3, 1): -1.4142135623730951}, (1, 1):
        {(3, 3): -1.4142135623730951}, (-1, -1): {(1, 1): -
        1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -1.0}, (0, 1): {(2,
        4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2, 2): -1.0}, (-1, 1
        ): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2): -
        1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -1
        ): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -100}, (0, 1): {(3, 2): -100}, (-1, 0):
        {(2, 1): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 2): -100}, (
        1, -1): {(4, 0): -100}, (1, 1): {(4, 2): -100}, (-1, -1): {(2, 0): 
        -100}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3, 3): -100}, (-
        1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1): {(2, 3): -
        100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100}, (-1, -1): {(
        2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1): {(3, 4): -
        100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (-1, 1): {(
        2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -100}, (-1,
        -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (0, 1): {(3,
        5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -1.0}, (-1, 1
        ): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5, 4): -1.0}, (0, -1): {(6,
        3): -1.0}, (-1, 1): {(5, 5): -1.4142135623730951}, (1, -1): {(6, 4):
        -1}, (1, 1): {(6, 4): -1}, (-1, -1): {(5, 3): -1.4142135623730951}},
        (6, 5): {(1, 0): {(6, 5): -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 
        5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1):
        {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1, -1): {(5, 4): -
        1.4142135623730951}}}
    rewardAGap = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0},
        (-1, 0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1},
        (1, -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, 
        -1): {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2
        ): -1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1):
        {(0, 1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 
        2): -1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0):
        {(1, 2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, 
        -1): {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -1.0}, (0, 1): {(3, 2): -1.0}, (-1, 0):
        {(2, 1): -1.0}, (0, -1): {(3, 0): -1.0}, (-1, 1): {(2, 2): -
        1.4142135623730951}, (1, -1): {(4, 0): -1.4142135623730951}, (1, 1):
        {(4, 2): -1.4142135623730951}, (-1, -1): {(2, 0): -
        1.4142135623730951}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3,
        3): -100}, (-1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1
        ): {(2, 3): -100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100},
        (-1, -1): {(2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1):
        {(3, 4): -100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (
        -1, 1): {(2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -
        100}, (-1, -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (
        0, 1): {(3, 5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -
        1.0}, (-1, 1): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): 10}, (-1, 0): {(5, 4): 10}, (0, -1): {(6, 3):
        10}, (-1, 1): {(5, 5): 10}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4):
        -1}, (-1, -1): {(5, 3): 10}}, (6, 5): {(1, 0): {(6, 5): -1}, (0, 1):
        {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1,
        1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1,
        -1): {(5, 4): -1.4142135623730951}}}
    rewardBGap = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0},
        (-1, 0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1},
        (1, -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, 
        -1): {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2
        ): -1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1):
        {(0, 1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 
        2): -1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0):
        {(1, 2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, 
        -1): {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): -1.0},
        (0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): -1.0}, (0, -1): {(1, 4): -
        1.0}, (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): -1.4142135623730951},
        (1, 1): {(1, 5): -1}, (-1, -1): {(0, 4): -1.4142135623730951}}, (2,
        0): {(1, 0): {(3, 0): -1.0}, (0, 1): {(2, 1): -1.0}, (-1, 0): {(1, 
        0): -1.0}, (0, -1): {(2, 0): -1}, (-1, 1): {(1, 1): -
        1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {(3, 1): -
        1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1, 0): {(3,
        1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0}, (0, -1):
        {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1, -1): {(
        3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -1.4142135623730951},
        (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 2): {(1, 0): {(3, 2):
        -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 2): -1.0}, (0, -1): {(
        2, 1): -1.0}, (-1, 1): {(1, 3): -1.4142135623730951}, (1, -1): {(3,
        1): -1.4142135623730951}, (1, 1): {(3, 3): -1.4142135623730951}, (-
        1, -1): {(1, 1): -1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -
        1.0}, (0, 1): {(2, 4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2,
        2): -1.0}, (-1, 1): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2):
        -1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -
        1): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -1.0}, (0, 1): {(3, 2): -1.0}, (-1, 0):
        {(2, 1): -1.0}, (0, -1): {(3, 0): -1.0}, (-1, 1): {(2, 2): -
        1.4142135623730951}, (1, -1): {(4, 0): -1.4142135623730951}, (1, 1):
        {(4, 2): -1.4142135623730951}, (-1, -1): {(2, 0): -
        1.4142135623730951}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3,
        3): -100}, (-1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1
        ): {(2, 3): -100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100},
        (-1, -1): {(2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1):
        {(3, 4): -100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (
        -1, 1): {(2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -
        100}, (-1, -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (
        0, 1): {(3, 5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -
        1.0}, (-1, 1): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): 10}, (-1, 0):
        {(5, 1): 10}, (0, -1): {(6, 0): 10}, (-1, 1): {(5, 2): 10}, (1, -1):
        {(6, 1): -1}, (1, 1): {(6, 1): -1}, (-1, -1): {(5, 0): 10}}, (6, 2):
        {(1, 0): {(6, 2): -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -
        1.0}, (0, -1): {(6, 1): -1.0}, (-1, 1): {(5, 3): -
        1.4142135623730951}, (1, -1): {(6, 2): -1}, (1, 1): {(6, 2): -1}, (
        -1, -1): {(5, 1): -1.4142135623730951}}, (6, 3): {(1, 0): {(6, 3): 
        -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5, 3): -1.0}, (0, -1): {(6,
        2): -1.0}, (-1, 1): {(5, 4): -1.4142135623730951}, (1, -1): {(6, 3):
        -1}, (1, 1): {(6, 3): -1}, (-1, -1): {(5, 2): -1.4142135623730951}},
        (6, 4): {(1, 0): {(6, 4): -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5,
        4): -1.0}, (0, -1): {(6, 3): -1.0}, (-1, 1): {(5, 5): -
        1.4142135623730951}, (1, -1): {(6, 4): -1}, (1, 1): {(6, 4): -1}, (
        -1, -1): {(5, 3): -1.4142135623730951}}, (6, 5): {(1, 0): {(6, 5): 
        -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 5): -1.0}, (0, -1): {(6, 4
        ): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1): {(6, 5): -1}, (1, 1): {(6,
        5): -1}, (-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardCGap = {(0, 0): {(1, 0): {(1, 0): -1.0}, (0, 1): {(0, 1): -1.0},
        (-1, 0): {(0, 0): -1}, (0, -1): {(0, 0): -1}, (-1, 1): {(0, 0): -1},
        (1, -1): {(0, 0): -1}, (1, 1): {(1, 1): -1.4142135623730951}, (-1, 
        -1): {(0, 0): -1}}, (0, 1): {(1, 0): {(1, 1): -1.0}, (0, 1): {(0, 2
        ): -1.0}, (-1, 0): {(0, 1): -1}, (0, -1): {(0, 0): -1.0}, (-1, 1):
        {(0, 1): -1}, (1, -1): {(1, 0): -1.4142135623730951}, (1, 1): {(1, 
        2): -1.4142135623730951}, (-1, -1): {(0, 1): -1}}, (0, 2): {(1, 0):
        {(1, 2): -1.0}, (0, 1): {(0, 3): -1.0}, (-1, 0): {(0, 2): -1}, (0, 
        -1): {(0, 1): -1.0}, (-1, 1): {(0, 2): -1}, (1, -1): {(1, 1): -
        1.4142135623730951}, (1, 1): {(1, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1}}, (0, 3): {(1, 0): {(1, 3): -1.0}, (0, 1): {(0, 4):
        -1.0}, (-1, 0): {(0, 3): -1}, (0, -1): {(0, 2): -1.0}, (-1, 1): {(0,
        3): -1}, (1, -1): {(1, 2): -1.4142135623730951}, (1, 1): {(1, 4): -
        1.4142135623730951}, (-1, -1): {(0, 3): -1}}, (0, 4): {(1, 0): {(1,
        4): -1.0}, (0, 1): {(0, 5): -1.0}, (-1, 0): {(0, 4): -1}, (0, -1):
        {(0, 3): -1.0}, (-1, 1): {(0, 4): -1}, (1, -1): {(1, 3): -
        1.4142135623730951}, (1, 1): {(1, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 4): -1}}, (0, 5): {(1, 0): {(1, 5): -1.0}, (0, 1): {(0, 5):
        -1}, (-1, 0): {(0, 5): -1}, (0, -1): {(0, 4): -1.0}, (-1, 1): {(0, 
        5): -1}, (1, -1): {(1, 4): -1.4142135623730951}, (1, 1): {(0, 5): -
        1}, (-1, -1): {(0, 5): -1}}, (1, 0): {(1, 0): {(2, 0): -1.0}, (0, 1
        ): {(1, 1): -1.0}, (-1, 0): {(0, 0): -1.0}, (0, -1): {(1, 0): -1},
        (-1, 1): {(0, 1): -1.4142135623730951}, (1, -1): {(1, 0): -1}, (1, 
        1): {(2, 1): -1.4142135623730951}, (-1, -1): {(1, 0): -1}}, (1, 1):
        {(1, 0): {(2, 1): -1.0}, (0, 1): {(1, 2): -1.0}, (-1, 0): {(0, 1): 
        -1.0}, (0, -1): {(1, 0): -1.0}, (-1, 1): {(0, 2): -
        1.4142135623730951}, (1, -1): {(2, 0): -1.4142135623730951}, (1, 1):
        {(2, 2): -1.4142135623730951}, (-1, -1): {(0, 0): -
        1.4142135623730951}}, (1, 2): {(1, 0): {(2, 2): -1.0}, (0, 1): {(1,
        3): -1.0}, (-1, 0): {(0, 2): -1.0}, (0, -1): {(1, 1): -1.0}, (-1, 1
        ): {(0, 3): -1.4142135623730951}, (1, -1): {(2, 1): -
        1.4142135623730951}, (1, 1): {(2, 3): -1.4142135623730951}, (-1, -1
        ): {(0, 1): -1.4142135623730951}}, (1, 3): {(1, 0): {(2, 3): -1.0},
        (0, 1): {(1, 4): -1.0}, (-1, 0): {(0, 3): -1.0}, (0, -1): {(1, 2): 
        -1.0}, (-1, 1): {(0, 4): -1.4142135623730951}, (1, -1): {(2, 2): -
        1.4142135623730951}, (1, 1): {(2, 4): -1.4142135623730951}, (-1, -1
        ): {(0, 2): -1.4142135623730951}}, (1, 4): {(1, 0): {(2, 4): -1.0},
        (0, 1): {(1, 5): -1.0}, (-1, 0): {(0, 4): -1.0}, (0, -1): {(1, 3): 
        -1.0}, (-1, 1): {(0, 5): -1.4142135623730951}, (1, -1): {(2, 3): -
        1.4142135623730951}, (1, 1): {(2, 5): -1.4142135623730951}, (-1, -1
        ): {(0, 3): -1.4142135623730951}}, (1, 5): {(1, 0): {(2, 5): 10}, (
        0, 1): {(1, 5): -1}, (-1, 0): {(0, 5): 10}, (0, -1): {(1, 4): 10},
        (-1, 1): {(1, 5): -1}, (1, -1): {(2, 4): 10}, (1, 1): {(1, 5): -1},
        (-1, -1): {(0, 4): 10}}, (2, 0): {(1, 0): {(3, 0): -1.0}, (0, 1): {
        (2, 1): -1.0}, (-1, 0): {(1, 0): -1.0}, (0, -1): {(2, 0): -1}, (-1,
        1): {(1, 1): -1.4142135623730951}, (1, -1): {(2, 0): -1}, (1, 1): {
        (3, 1): -1.4142135623730951}, (-1, -1): {(2, 0): -1}}, (2, 1): {(1,
        0): {(3, 1): -1.0}, (0, 1): {(2, 2): -1.0}, (-1, 0): {(1, 1): -1.0},
        (0, -1): {(2, 0): -1.0}, (-1, 1): {(1, 2): -1.4142135623730951}, (1,
        -1): {(3, 0): -1.4142135623730951}, (1, 1): {(3, 2): -
        1.4142135623730951}, (-1, -1): {(1, 0): -1.4142135623730951}}, (2, 
        2): {(1, 0): {(3, 2): -1.0}, (0, 1): {(2, 3): -1.0}, (-1, 0): {(1, 
        2): -1.0}, (0, -1): {(2, 1): -1.0}, (-1, 1): {(1, 3): -
        1.4142135623730951}, (1, -1): {(3, 1): -1.4142135623730951}, (1, 1):
        {(3, 3): -1.4142135623730951}, (-1, -1): {(1, 1): -
        1.4142135623730951}}, (2, 3): {(1, 0): {(3, 3): -1.0}, (0, 1): {(2,
        4): -1.0}, (-1, 0): {(1, 3): -1.0}, (0, -1): {(2, 2): -1.0}, (-1, 1
        ): {(1, 4): -1.4142135623730951}, (1, -1): {(3, 2): -
        1.4142135623730951}, (1, 1): {(3, 4): -1.4142135623730951}, (-1, -1
        ): {(1, 2): -1.4142135623730951}}, (2, 4): {(1, 0): {(3, 4): -1.0},
        (0, 1): {(2, 5): -1.0}, (-1, 0): {(1, 4): -1.0}, (0, -1): {(2, 3): 
        -1.0}, (-1, 1): {(1, 5): -1.4142135623730951}, (1, -1): {(3, 3): -
        1.4142135623730951}, (1, 1): {(3, 5): -1.4142135623730951}, (-1, -1
        ): {(1, 3): -1.4142135623730951}}, (2, 5): {(1, 0): {(3, 5): -1.0},
        (0, 1): {(2, 5): -1}, (-1, 0): {(1, 5): -1.0}, (0, -1): {(2, 4): -
        1.0}, (-1, 1): {(2, 5): -1}, (1, -1): {(3, 4): -1.4142135623730951},
        (1, 1): {(2, 5): -1}, (-1, -1): {(1, 4): -1.4142135623730951}}, (3,
        0): {(1, 0): {(4, 0): -100}, (0, 1): {(3, 1): -100}, (-1, 0): {(2, 
        0): -100}, (0, -1): {(3, 0): -100}, (-1, 1): {(2, 1): -100}, (1, -1
        ): {(3, 0): -100}, (1, 1): {(4, 1): -100}, (-1, -1): {(3, 0): -100}
        }, (3, 1): {(1, 0): {(4, 1): -1.0}, (0, 1): {(3, 2): -1.0}, (-1, 0):
        {(2, 1): -1.0}, (0, -1): {(3, 0): -1.0}, (-1, 1): {(2, 2): -
        1.4142135623730951}, (1, -1): {(4, 0): -1.4142135623730951}, (1, 1):
        {(4, 2): -1.4142135623730951}, (-1, -1): {(2, 0): -
        1.4142135623730951}}, (3, 2): {(1, 0): {(4, 2): -100}, (0, 1): {(3,
        3): -100}, (-1, 0): {(2, 2): -100}, (0, -1): {(3, 1): -100}, (-1, 1
        ): {(2, 3): -100}, (1, -1): {(4, 1): -100}, (1, 1): {(4, 3): -100},
        (-1, -1): {(2, 1): -100}}, (3, 3): {(1, 0): {(4, 3): -100}, (0, 1):
        {(3, 4): -100}, (-1, 0): {(2, 3): -100}, (0, -1): {(3, 2): -100}, (
        -1, 1): {(2, 4): -100}, (1, -1): {(4, 2): -100}, (1, 1): {(4, 4): -
        100}, (-1, -1): {(2, 2): -100}}, (3, 4): {(1, 0): {(4, 4): -1.0}, (
        0, 1): {(3, 5): -1.0}, (-1, 0): {(2, 4): -1.0}, (0, -1): {(3, 3): -
        1.0}, (-1, 1): {(2, 5): -1.4142135623730951}, (1, -1): {(4, 3): -
        1.4142135623730951}, (1, 1): {(4, 5): -1.4142135623730951}, (-1, -1
        ): {(2, 3): -1.4142135623730951}}, (3, 5): {(1, 0): {(4, 5): -1.0},
        (0, 1): {(3, 5): -1}, (-1, 0): {(2, 5): -1.0}, (0, -1): {(3, 4): -
        1.0}, (-1, 1): {(3, 5): -1}, (1, -1): {(4, 4): -1.4142135623730951},
        (1, 1): {(3, 5): -1}, (-1, -1): {(2, 4): -1.4142135623730951}}, (4,
        0): {(1, 0): {(5, 0): -1.0}, (0, 1): {(4, 1): -1.0}, (-1, 0): {(3, 
        0): -1.0}, (0, -1): {(4, 0): -1}, (-1, 1): {(3, 1): -
        1.4142135623730951}, (1, -1): {(4, 0): -1}, (1, 1): {(5, 1): -
        1.4142135623730951}, (-1, -1): {(4, 0): -1}}, (4, 1): {(1, 0): {(5,
        1): -1.0}, (0, 1): {(4, 2): -1.0}, (-1, 0): {(3, 1): -1.0}, (0, -1):
        {(4, 0): -1.0}, (-1, 1): {(3, 2): -1.4142135623730951}, (1, -1): {(
        5, 0): -1.4142135623730951}, (1, 1): {(5, 2): -1.4142135623730951},
        (-1, -1): {(3, 0): -1.4142135623730951}}, (4, 2): {(1, 0): {(5, 2):
        -1.0}, (0, 1): {(4, 3): -1.0}, (-1, 0): {(3, 2): -1.0}, (0, -1): {(
        4, 1): -1.0}, (-1, 1): {(3, 3): -1.4142135623730951}, (1, -1): {(5,
        1): -1.4142135623730951}, (1, 1): {(5, 3): -1.4142135623730951}, (-
        1, -1): {(3, 1): -1.4142135623730951}}, (4, 3): {(1, 0): {(5, 3): -
        1.0}, (0, 1): {(4, 4): -1.0}, (-1, 0): {(3, 3): -1.0}, (0, -1): {(4,
        2): -1.0}, (-1, 1): {(3, 4): -1.4142135623730951}, (1, -1): {(5, 2):
        -1.4142135623730951}, (1, 1): {(5, 4): -1.4142135623730951}, (-1, -
        1): {(3, 2): -1.4142135623730951}}, (4, 4): {(1, 0): {(5, 4): -1.0},
        (0, 1): {(4, 5): -1.0}, (-1, 0): {(3, 4): -1.0}, (0, -1): {(4, 3): 
        -1.0}, (-1, 1): {(3, 5): -1.4142135623730951}, (1, -1): {(5, 3): -
        1.4142135623730951}, (1, 1): {(5, 5): -1.4142135623730951}, (-1, -1
        ): {(3, 3): -1.4142135623730951}}, (4, 5): {(1, 0): {(5, 5): -1.0},
        (0, 1): {(4, 5): -1}, (-1, 0): {(3, 5): -1.0}, (0, -1): {(4, 4): -
        1.0}, (-1, 1): {(4, 5): -1}, (1, -1): {(5, 4): -1.4142135623730951},
        (1, 1): {(4, 5): -1}, (-1, -1): {(3, 4): -1.4142135623730951}}, (5,
        0): {(1, 0): {(6, 0): -1.0}, (0, 1): {(5, 1): -1.0}, (-1, 0): {(4, 
        0): -1.0}, (0, -1): {(5, 0): -1}, (-1, 1): {(4, 1): -
        1.4142135623730951}, (1, -1): {(5, 0): -1}, (1, 1): {(6, 1): -
        1.4142135623730951}, (-1, -1): {(5, 0): -1}}, (5, 1): {(1, 0): {(6,
        1): -1.0}, (0, 1): {(5, 2): -1.0}, (-1, 0): {(4, 1): -1.0}, (0, -1):
        {(5, 0): -1.0}, (-1, 1): {(4, 2): -1.4142135623730951}, (1, -1): {(
        6, 0): -1.4142135623730951}, (1, 1): {(6, 2): -1.4142135623730951},
        (-1, -1): {(4, 0): -1.4142135623730951}}, (5, 2): {(1, 0): {(6, 2):
        -1.0}, (0, 1): {(5, 3): -1.0}, (-1, 0): {(4, 2): -1.0}, (0, -1): {(
        5, 1): -1.0}, (-1, 1): {(4, 3): -1.4142135623730951}, (1, -1): {(6,
        1): -1.4142135623730951}, (1, 1): {(6, 3): -1.4142135623730951}, (-
        1, -1): {(4, 1): -1.4142135623730951}}, (5, 3): {(1, 0): {(6, 3): -
        1.0}, (0, 1): {(5, 4): -1.0}, (-1, 0): {(4, 3): -1.0}, (0, -1): {(5,
        2): -1.0}, (-1, 1): {(4, 4): -1.4142135623730951}, (1, -1): {(6, 2):
        -1.4142135623730951}, (1, 1): {(6, 4): -1.4142135623730951}, (-1, -
        1): {(4, 2): -1.4142135623730951}}, (5, 4): {(1, 0): {(6, 4): -1.0},
        (0, 1): {(5, 5): -1.0}, (-1, 0): {(4, 4): -1.0}, (0, -1): {(5, 3): 
        -1.0}, (-1, 1): {(4, 5): -1.4142135623730951}, (1, -1): {(6, 3): -
        1.4142135623730951}, (1, 1): {(6, 5): -1.4142135623730951}, (-1, -1
        ): {(4, 3): -1.4142135623730951}}, (5, 5): {(1, 0): {(6, 5): -1.0},
        (0, 1): {(5, 5): -1}, (-1, 0): {(4, 5): -1.0}, (0, -1): {(5, 4): -
        1.0}, (-1, 1): {(5, 5): -1}, (1, -1): {(6, 4): -1.4142135623730951},
        (1, 1): {(5, 5): -1}, (-1, -1): {(4, 4): -1.4142135623730951}}, (6,
        0): {(1, 0): {(6, 0): -1}, (0, 1): {(6, 1): -1.0}, (-1, 0): {(5, 0):
        -1.0}, (0, -1): {(6, 0): -1}, (-1, 1): {(5, 1): -1.4142135623730951
        }, (1, -1): {(6, 0): -1}, (1, 1): {(6, 0): -1}, (-1, -1): {(6, 0): 
        -1}}, (6, 1): {(1, 0): {(6, 1): -1}, (0, 1): {(6, 2): -1.0}, (-1, 0
        ): {(5, 1): -1.0}, (0, -1): {(6, 0): -1.0}, (-1, 1): {(5, 2): -
        1.4142135623730951}, (1, -1): {(6, 1): -1}, (1, 1): {(6, 1): -1}, (
        -1, -1): {(5, 0): -1.4142135623730951}}, (6, 2): {(1, 0): {(6, 2): 
        -1}, (0, 1): {(6, 3): -1.0}, (-1, 0): {(5, 2): -1.0}, (0, -1): {(6,
        1): -1.0}, (-1, 1): {(5, 3): -1.4142135623730951}, (1, -1): {(6, 2):
        -1}, (1, 1): {(6, 2): -1}, (-1, -1): {(5, 1): -1.4142135623730951}},
        (6, 3): {(1, 0): {(6, 3): -1}, (0, 1): {(6, 4): -1.0}, (-1, 0): {(5,
        3): -1.0}, (0, -1): {(6, 2): -1.0}, (-1, 1): {(5, 4): -
        1.4142135623730951}, (1, -1): {(6, 3): -1}, (1, 1): {(6, 3): -1}, (
        -1, -1): {(5, 2): -1.4142135623730951}}, (6, 4): {(1, 0): {(6, 4): 
        -1}, (0, 1): {(6, 5): -1.0}, (-1, 0): {(5, 4): -1.0}, (0, -1): {(6,
        3): -1.0}, (-1, 1): {(5, 5): -1.4142135623730951}, (1, -1): {(6, 4):
        -1}, (1, 1): {(6, 4): -1}, (-1, -1): {(5, 3): -1.4142135623730951}},
        (6, 5): {(1, 0): {(6, 5): -1}, (0, 1): {(6, 5): -1}, (-1, 0): {(5, 
        5): -1.0}, (0, -1): {(6, 4): -1.0}, (-1, 1): {(6, 5): -1}, (1, -1):
        {(6, 5): -1}, (1, 1): {(6, 5): -1}, (-1, -1): {(5, 4): -
        1.4142135623730951}}}
    performValueIteration = ValueIteration(transition, rewardA, valueTable,
        convergenceTolerance, gamma)
    optimalValuesA, policyTableA = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 4),
        trapStates=[(3, 0), (3, 1), (3, 2), (3, 3)], valueTable=optimalValuesA)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 4), trapStates
        =[(3, 0), (3, 1), (3, 2), (3, 3)], policy=policyTableA)
    print(p_traj(trajectoryToGoalA, beta, gamma, transition, rewardA,
        optimalValuesA))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalA, beta, gamma,
        transition, rewardA, optimalValuesA))
    plt.ylabel('Probabilty of goal A (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol A without gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardAGap,
        valueTable, convergenceTolerance, gamma)
    optimalValuesAG, policyTableAG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 4),
        trapStates=[(3, 0), (3, 2), (3, 3)], valueTable=optimalValuesAG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 4), trapStates
        =[(3, 0), (3, 2), (3, 3)], policy=policyTableAG)
    print(p_traj(trajectoryToGoalA, beta, gamma, transition, rewardAGap,
        optimalValuesAG))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalA, beta, gamma,
        transition, rewardAGap, optimalValuesAG))
    plt.ylabel('Probabilty of goal A Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol A with gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardB, valueTable,
        convergenceTolerance, gamma)
    optimalValuesB, policyTableB = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 1),
        trapStates=[(3, 0), (3, 1), (3, 2), (3, 3)], valueTable=optimalValuesB)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 1), trapStates
        =[(3, 0), (3, 1), (3, 2), (3, 3)], policy=policyTableB)
    print(p_traj(trajectoryToGoalB, beta, gamma, transition, rewardB,
        optimalValuesB))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalB, beta, gamma,
        transition, rewardB, optimalValuesB))
    plt.ylabel('Probabilty of goal B (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol B without gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardBGap,
        valueTable, convergenceTolerance, gamma)
    optimalValuesBG, policyTableBG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(6, 1),
        trapStates=[(3, 0), (3, 2), (3, 3)], valueTable=optimalValuesBG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(6, 1), trapStates
        =[(3, 0), (3, 2), (3, 3)], policy=policyTableBG)
    print(p_traj(trajectoryToGoalB, beta, gamma, transition, rewardBGap,
        optimalValuesBG))
    plt.plot([2, 3, 4, 5, 6, 7, 8], p_traj(trajectoryToGoalB, beta, gamma,
        transition, rewardBGap, optimalValuesBG))
    plt.ylabel('Probabilty of goal B Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol B with gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardC, valueTable,
        convergenceTolerance, gamma)
    optimalValuesC, policyTableC = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(1, 5),
        trapStates=[(3, 0), (3, 1), (3, 2), (3, 3)], valueTable=optimalValuesC)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(1, 5), trapStates
        =[(3, 0), (3, 1), (3, 2), (3, 3)], policy=policyTableC)
    print(p_traj(trajectoryToGoalC, beta, gamma, transition, rewardC,
        optimalValuesC))
    plt.plot([2, 3, 4, 5, 6], p_traj(trajectoryToGoalC, beta, gamma,
        transition, rewardC, optimalValuesC))
    plt.ylabel('Probabilty of goal C (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol C without gap')
    plt.show()
    performValueIteration = ValueIteration(transition, rewardCGap,
        valueTable, convergenceTolerance, gamma)
    optimalValuesCG, policyTableCG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState=(1, 5),
        trapStates=[(3, 0), (3, 2), (3, 3)], valueTable=optimalValuesCG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState=(1, 5), trapStates
        =[(3, 0), (3, 2), (3, 3)], policy=policyTableCG)
    print(p_traj(trajectoryToGoalC, beta, gamma, transition, rewardCGap,
        optimalValuesCG))
    plt.plot([2, 3, 4, 5, 6], p_traj(trajectoryToGoalC, beta, gamma,
        transition, rewardCGap, optimalValuesCG))
    plt.ylabel('Probabilty of goal C Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol C with gap')
    plt.show()


if __name__ == '__main__':
    main()

"""
Class: Stat232C
Project 3: Goal Inference
Name:Mingjia Yao
Date: May, 2020

"""

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
import copy
import math

class ValueIteration(object):
    def __init__(self, transitionTable, rewardTable, valueTable, convergenceTolerance, gamma):
        self.transitionTable = transitionTable
        self.rewardTable  = rewardTable
        self.valueTable = valueTable
        self.convergenceTolerance = convergenceTolerance
        self.gamma = gamma

    def __call__(self):
        ValueTable=self.valueTable
        tempValueTable=copy.copy(ValueTable)
        delta=1
        while delta >= self.convergenceTolerance:
            delta=0
            for s in ValueTable:
                v=ValueTable[s]
                lib_s=self.transitionTable[s]
                max_a =0
                for a in lib_s:
                    sum_sr=0
                    lib_a=lib_s[a]
                    for ns in lib_a:
                        sum_sr=sum_sr+lib_a[ns]*(self.rewardTable[s][a][ns]+self.gamma*tempValueTable[ns])
                    max_a=max(max_a,sum_sr)
                ValueTable[s]=max_a
                delta=max(delta,abs(v-ValueTable[s]))
            tempValueTable=copy.copy(ValueTable)
        policyTable={}
        for s in ValueTable:
            lib_s=self.transitionTable[s]
            pi_s=(0,0)
            vs=0
            prob_ns=0
            for a in lib_s:
                sum_sr=0
                lib_a=lib_s[a]
                for ns in lib_a:
                    sum_sr=sum_sr+lib_a[ns]*(self.rewardTable[s][a][ns]+self.gamma*ValueTable[ns])
                if sum_sr>vs:
                    pi_s=a
                    vs=sum_sr
                    pi_ns=(0,0)
                    v_ns=0
                    for ns in lib_a:
                        if ValueTable[ns]>v_ns:
                            pi_ns=ns
                            v_ns=ValueTable[ns]
                            prob_ns=lib_a[ns]
            policyTable[s]={pi_s:prob_ns}
            
        return ([ValueTable, policyTable])


def visualizeValueTable(gridWidth, gridHeight, goalState, trapStates, valueTable):
    gridAdjust = .5
    gridScale = 1.5
    
    xs = np.linspace(-gridAdjust, gridWidth-gridAdjust, gridWidth+1)
    ys = np.linspace(-gridAdjust, gridHeight-gridAdjust, gridHeight+1)
    
    plt.rcParams["figure.figsize"] = [gridWidth*gridScale,gridHeight*gridScale]
    ax = plt.gca(frameon=False, xticks = range(gridWidth), yticks = range(gridHeight))

    #goal and trap coloring 
    ax.add_patch(Rectangle((goalState[0]-gridAdjust, goalState[1]-gridAdjust), 1, 1, fill=True, color='green', alpha=.1))
    
    for (trapx, trapy) in trapStates:
        ax.add_patch(Rectangle((trapx-gridAdjust, trapy-gridAdjust), 1, 1, fill=True, color='black', alpha=.1))
    
    # grid lines
    for x in xs:
        plt.plot([x, x], [ys[0], ys[-1]], color = "black")
    for y in ys:
        plt.plot([xs[0], xs[-1]], [y, y], color = "black")

    #labeled values
    for (statex, statey), val in valueTable.items():
        plt.text(statex-.2, statey, str(round(val, 3)))    

    plt.show()


def visualizePolicy(gridWidth, gridHeight, goalState, trapStates, policy):
    #grid height/width
    gridAdjust = .5
    gridScale = 1.5
    arrowScale = .5
    
    xs = np.linspace(-gridAdjust, gridWidth-gridAdjust, gridWidth+1)
    ys = np.linspace(-gridAdjust, gridHeight-gridAdjust, gridHeight+1)
    
    plt.rcParams["figure.figsize"] = [gridWidth*gridScale,gridHeight*gridScale]
    ax = plt.gca(frameon=False, xticks = range(gridWidth), yticks = range(gridHeight))

    #goal and trap coloring 
    ax.add_patch(Rectangle((goalState[0]-gridAdjust, goalState[1]-gridAdjust), 1, 1, fill=True, color='green', alpha=.1))
    
    for (trapx, trapy) in trapStates:
        ax.add_patch(Rectangle((trapx-gridAdjust, trapy-gridAdjust), 1, 1, fill=True, color='black', alpha=.1))

    # grid lines
    for x in xs:
        plt.plot([x, x], [ys[0], ys[-1]], color = "black")
    for y in ys:
        plt.plot([xs[0], xs[-1]], [y, y], color = "black")

    #labeled values
    for (statex, statey), actionDict in policy.items():
        for (optimalActionX, optimalActionY), actionProb in actionDict.items():
            plt.arrow(statex, statey, optimalActionX*actionProb*arrowScale, optimalActionY*actionProb*arrowScale, head_width=0.05*actionProb, head_length=0.1*actionProb)    

    plt.show()


def viewDictionaryStructure(d, levels, indent=0):
    for key, value in d.items():
        print('\t' * indent + str(levels[indent]) + ": "+ str(key))
        if isinstance(value, dict):
            viewDictionaryStructure(value, levels, indent+1)
        else:
            print('\t' * (indent+1) + str(levels[indent+1])+ ": " + str(value))

def p_traj(traj,beta,gamma,transitTable,rewardTable,valueTable):
    p=1
    ret=[]
    for i in range(len(traj)-1):
        p=p*p_stn_st(traj[i],traj[i+1],beta,gamma,transitTable,rewardTable,valueTable)
        ret=ret+[p]
    return ret

def p_stn_st(st,stn,beta,gamma,transitTable,rewardTable,valueTable):
    lib_s=transitTable[st]
    p=0
    for at in lib_s:
        if stn in lib_s[at]:
            p=p+lib_s[at][stn]*pias(st,at,beta,gamma,transitTable,rewardTable,valueTable)
    return p

def pias(st,at,beta,gamma,transitTable,rewardTable,valueTable):
    return math.log(beta*q(st,at,gamma,transitTable,rewardTable,valueTable))

def q(st,at,gamma,transitTable,rewardTable,valueTable):
    lib_sa=transitTable[st][at]
    q=0
    for ns in lib_sa:
        q=q+lib_sa[ns]*(rewardTable[st][at][ns]+gamma*valueTable[ns])
    return q

def main():
    gamma = .95
    beta = .4
    convergenceTolerance = 10e-7
    transition = {(0, 0): {(1, 0): {(1, 0): 1},(0, 1): {(0, 1): 1},(-1, 0): {(0, 0): 1},(0, -1): {(0, 0): 1},(-1, 1): {(0, 0): 1},(1, -1): {(0, 0): 1},(1, 1): {(1, 1): 1},(-1, -1): {(0, 0): 1}},(0, 1): {(1, 0): {(1, 1): 1},(0, 1): {(0, 2): 1},(-1, 0): {(0, 1): 1},(0, -1): {(0, 0): 1},(-1, 1): {(0, 1): 1},(1, -1): {(1, 0): 1},(1, 1): {(1, 2): 1},(-1, -1): {(0, 1): 1}},(0, 2): {(1, 0): {(1, 2): 1},(0, 1): {(0, 3): 1},(-1, 0): {(0, 2): 1},(0, -1): {(0, 1): 1},(-1, 1): {(0, 2): 1},(1, -1): {(1, 1): 1},(1, 1): {(1, 3): 1},(-1, -1): {(0, 2): 1}},(0, 3): {(1, 0): {(1, 3): 1},(0, 1): {(0, 4): 1},(-1, 0): {(0, 3): 1},(0, -1): {(0, 2): 1},(-1, 1): {(0, 3): 1},(1, -1): {(1, 2): 1},(1, 1): {(1, 4): 1},(-1, -1): {(0, 3): 1}},(0, 4): {(1, 0): {(1, 4): 1},(0, 1): {(0, 5): 1},(-1, 0): {(0, 4): 1},(0, -1): {(0, 3): 1},(-1, 1): {(0, 4): 1},(1, -1): {(1, 3): 1},(1, 1): {(1, 5): 1},(-1, -1): {(0, 4): 1}},(0, 5): {(1, 0): {(1, 5): 1},(0, 1): {(0, 5): 1},(-1, 0): {(0, 5): 1},(0, -1): {(0, 4): 1},(-1, 1): {(0, 5): 1},(1, -1): {(1, 4): 1},(1, 1): {(0, 5): 1},(-1, -1): {(0, 5): 1}},(1, 0): {(1, 0): {(2, 0): 1},(0, 1): {(1, 1): 1},(-1, 0): {(0, 0): 1},(0, -1): {(1, 0): 1},(-1, 1): {(0, 1): 1},(1, -1): {(1, 0): 1},(1, 1): {(2, 1): 1},(-1, -1): {(1, 0): 1}},(1, 1): {(1, 0): {(2, 1): 1},(0, 1): {(1, 2): 1},(-1, 0): {(0, 1): 1},(0, -1): {(1, 0): 1},(-1, 1): {(0, 2): 1},(1, -1): {(2, 0): 1},(1, 1): {(2, 2): 1},(-1, -1): {(0, 0): 1}},(1, 2): {(1, 0): {(2, 2): 1},(0, 1): {(1, 3): 1},(-1, 0): {(0, 2): 1},(0, -1): {(1, 1): 1},(-1, 1): {(0, 3): 1},(1, -1): {(2, 1): 1},(1, 1): {(2, 3): 1},(-1, -1): {(0, 1): 1}},(1, 3): {(1, 0): {(2, 3): 1},(0, 1): {(1, 4): 1},(-1, 0): {(0, 3): 1},(0, -1): {(1, 2): 1},(-1, 1): {(0, 4): 1},(1, -1): {(2, 2): 1},(1, 1): {(2, 4): 1},(-1, -1): {(0, 2): 1}},(1, 4): {(1, 0): {(2, 4): 1},(0, 1): {(1, 5): 1},(-1, 0): {(0, 4): 1},(0, -1): {(1, 3): 1},(-1, 1): {(0, 5): 1},(1, -1): {(2, 3): 1},(1, 1): {(2, 5): 1},(-1, -1): {(0, 3): 1}},(1, 5): {(1, 0): {(2, 5): 1},(0, 1): {(1, 5): 1},(-1, 0): {(0, 5): 1},(0, -1): {(1, 4): 1},(-1, 1): {(1, 5): 1},(1, -1): {(2, 4): 1},(1, 1): {(1, 5): 1},(-1, -1): {(0, 4): 1}},(2, 0): {(1, 0): {(3, 0): 1},(0, 1): {(2, 1): 1},(-1, 0): {(1, 0): 1},(0, -1): {(2, 0): 1},(-1, 1): {(1, 1): 1},(1, -1): {(2, 0): 1},(1, 1): {(3, 1): 1},(-1, -1): {(2, 0): 1}},(2, 1): {(1, 0): {(3, 1): 1},(0, 1): {(2, 2): 1},(-1, 0): {(1, 1): 1},(0, -1): {(2, 0): 1},(-1, 1): {(1, 2): 1},(1, -1): {(3, 0): 1},(1, 1): {(3, 2): 1},(-1, -1): {(1, 0): 1}},(2, 2): {(1, 0): {(3, 2): 1},(0, 1): {(2, 3): 1},(-1, 0): {(1, 2): 1},(0, -1): {(2, 1): 1},(-1, 1): {(1, 3): 1},(1, -1): {(3, 1): 1},(1, 1): {(3, 3): 1},(-1, -1): {(1, 1): 1}},(2, 3): {(1, 0): {(3, 3): 1},(0, 1): {(2, 4): 1},(-1, 0): {(1, 3): 1},(0, -1): {(2, 2): 1},(-1, 1): {(1, 4): 1},(1, -1): {(3, 2): 1},(1, 1): {(3, 4): 1},(-1, -1): {(1, 2): 1}},(2, 4): {(1, 0): {(3, 4): 1},(0, 1): {(2, 5): 1},(-1, 0): {(1, 4): 1},(0, -1): {(2, 3): 1},(-1, 1): {(1, 5): 1},(1, -1): {(3, 3): 1},(1, 1): {(3, 5): 1},(-1, -1): {(1, 3): 1}},(2, 5): {(1, 0): {(3, 5): 1},(0, 1): {(2, 5): 1},(-1, 0): {(1, 5): 1},(0, -1): {(2, 4): 1},(-1, 1): {(2, 5): 1},(1, -1): {(3, 4): 1},(1, 1): {(2, 5): 1},(-1, -1): {(1, 4): 1}},(3, 0): {(1, 0): {(4, 0): 1},(0, 1): {(3, 1): 1},(-1, 0): {(2, 0): 1},(0, -1): {(3, 0): 1},(-1, 1): {(2, 1): 1},(1, -1): {(3, 0): 1},(1, 1): {(4, 1): 1},(-1, -1): {(3, 0): 1}},(3, 1): {(1, 0): {(4, 1): 1},(0, 1): {(3, 2): 1},(-1, 0): {(2, 1): 1},(0, -1): {(3, 0): 1},(-1, 1): {(2, 2): 1},(1, -1): {(4, 0): 1},(1, 1): {(4, 2): 1},(-1, -1): {(2, 0): 1}},(3, 2): {(1, 0): {(4, 2): 1},(0, 1): {(3, 3): 1},(-1, 0): {(2, 2): 1},(0, -1): {(3, 1): 1},(-1, 1): {(2, 3): 1},(1, -1): {(4, 1): 1},(1, 1): {(4, 3): 1},(-1, -1): {(2, 1): 1}},(3, 3): {(1, 0): {(4, 3): 1},(0, 1): {(3, 4): 1},(-1, 0): {(2, 3): 1},(0, -1): {(3, 2): 1},(-1, 1): {(2, 4): 1},(1, -1): {(4, 2): 1},(1, 1): {(4, 4): 1},(-1, -1): {(2, 2): 1}},(3, 4): {(1, 0): {(4, 4): 1},(0, 1): {(3, 5): 1},(-1, 0): {(2, 4): 1},(0, -1): {(3, 3): 1},(-1, 1): {(2, 5): 1},(1, -1): {(4, 3): 1},(1, 1): {(4, 5): 1},(-1, -1): {(2, 3): 1}},(3, 5): {(1, 0): {(4, 5): 1},(0, 1): {(3, 5): 1},(-1, 0): {(2, 5): 1},(0, -1): {(3, 4): 1},(-1, 1): {(3, 5): 1},(1, -1): {(4, 4): 1},(1, 1): {(3, 5): 1},(-1, -1): {(2, 4): 1}},(4, 0): {(1, 0): {(5, 0): 1},(0, 1): {(4, 1): 1},(-1, 0): {(3, 0): 1},(0, -1): {(4, 0): 1},(-1, 1): {(3, 1): 1},(1, -1): {(4, 0): 1},(1, 1): {(5, 1): 1},(-1, -1): {(4, 0): 1}},(4, 1): {(1, 0): {(5, 1): 1},(0, 1): {(4, 2): 1},(-1, 0): {(3, 1): 1},(0, -1): {(4, 0): 1},(-1, 1): {(3, 2): 1},(1, -1): {(5, 0): 1},(1, 1): {(5, 2): 1},(-1, -1): {(3, 0): 1}},(4, 2): {(1, 0): {(5, 2): 1},(0, 1): {(4, 3): 1},(-1, 0): {(3, 2): 1},(0, -1): {(4, 1): 1},(-1, 1): {(3, 3): 1},(1, -1): {(5, 1): 1},(1, 1): {(5, 3): 1},(-1, -1): {(3, 1): 1}},(4, 3): {(1, 0): {(5, 3): 1},(0, 1): {(4, 4): 1},(-1, 0): {(3, 3): 1},(0, -1): {(4, 2): 1},(-1, 1): {(3, 4): 1},(1, -1): {(5, 2): 1},(1, 1): {(5, 4): 1},(-1, -1): {(3, 2): 1}},(4, 4): {(1, 0): {(5, 4): 1},(0, 1): {(4, 5): 1},(-1, 0): {(3, 4): 1},(0, -1): {(4, 3): 1},(-1, 1): {(3, 5): 1},(1, -1): {(5, 3): 1},(1, 1): {(5, 5): 1},(-1, -1): {(3, 3): 1}},(4, 5): {(1, 0): {(5, 5): 1},(0, 1): {(4, 5): 1},(-1, 0): {(3, 5): 1},(0, -1): {(4, 4): 1},(-1, 1): {(4, 5): 1},(1, -1): {(5, 4): 1},(1, 1): {(4, 5): 1},(-1, -1): {(3, 4): 1}},(5, 0): {(1, 0): {(6, 0): 1},(0, 1): {(5, 1): 1},(-1, 0): {(4, 0): 1},(0, -1): {(5, 0): 1},(-1, 1): {(4, 1): 1},(1, -1): {(5, 0): 1},(1, 1): {(6, 1): 1},(-1, -1): {(5, 0): 1}},(5, 1): {(1, 0): {(6, 1): 1},(0, 1): {(5, 2): 1},(-1, 0): {(4, 1): 1},(0, -1): {(5, 0): 1},(-1, 1): {(4, 2): 1},(1, -1): {(6, 0): 1},(1, 1): {(6, 2): 1},(-1, -1): {(4, 0): 1}},(5, 2): {(1, 0): {(6, 2): 1},(0, 1): {(5, 3): 1},(-1, 0): {(4, 2): 1},(0, -1): {(5, 1): 1},(-1, 1): {(4, 3): 1},(1, -1): {(6, 1): 1},(1, 1): {(6, 3): 1},(-1, -1): {(4, 1): 1}},(5, 3): {(1, 0): {(6, 3): 1},(0, 1): {(5, 4): 1},(-1, 0): {(4, 3): 1},(0, -1): {(5, 2): 1},(-1, 1): {(4, 4): 1},(1, -1): {(6, 2): 1},(1, 1): {(6, 4): 1},(-1, -1): {(4, 2): 1}},(5, 4): {(1, 0): {(6, 4): 1},(0, 1): {(5, 5): 1},(-1, 0): {(4, 4): 1},(0, -1): {(5, 3): 1},(-1, 1): {(4, 5): 1},(1, -1): {(6, 3): 1},(1, 1): {(6, 5): 1},(-1, -1): {(4, 3): 1}},(5, 5): {(1, 0): {(6, 5): 1},(0, 1): {(5, 5): 1},(-1, 0): {(4, 5): 1},(0, -1): {(5, 4): 1},(-1, 1): {(5, 5): 1},(1, -1): {(6, 4): 1},(1, 1): {(5, 5): 1},(-1, -1): {(4, 4): 1}},(6, 0): {(1, 0): {(6, 0): 1},(0, 1): {(6, 1): 1},(-1, 0): {(5, 0): 1},(0, -1): {(6, 0): 1},(-1, 1): {(5, 1): 1},(1, -1): {(6, 0): 1},(1, 1): {(6, 0): 1},(-1, -1): {(6, 0): 1}},(6, 1): {(1, 0): {(6, 1): 1},(0, 1): {(6, 2): 1},(-1, 0): {(5, 1): 1},(0, -1): {(6, 0): 1},(-1, 1): {(5, 2): 1},(1, -1): {(6, 1): 1},(1, 1): {(6, 1): 1},(-1, -1): {(5, 0): 1}},(6, 2): {(1, 0): {(6, 2): 1},(0, 1): {(6, 3): 1},(-1, 0): {(5, 2): 1},(0, -1): {(6, 1): 1},(-1, 1): {(5, 3): 1},(1, -1): {(6, 2): 1},(1, 1): {(6, 2): 1},(-1, -1): {(5, 1): 1}},(6, 3): {(1, 0): {(6, 3): 1},(0, 1): {(6, 4): 1},(-1, 0): {(5, 3): 1},(0, -1): {(6, 2): 1},(-1, 1): {(5, 4): 1},(1, -1): {(6, 3): 1},(1, 1): {(6, 3): 1},(-1, -1): {(5, 2): 1}},(6, 4): {(1, 0): {(6, 4): 1},(0, 1): {(6, 5): 1},(-1, 0): {(5, 4): 1},(0, -1): {(6, 3): 1},(-1, 1): {(5, 5): 1},(1, -1): {(6, 4): 1},(1, 1): {(6, 4): 1},(-1, -1): {(5, 3): 1}},(6, 5): {(1, 0): {(6, 5): 1},(0, 1): {(6, 5): 1},(-1, 0): {(5, 5): 1},(0, -1): {(6, 4): 1},(-1, 1): {(6, 5): 1},(1, -1): {(6, 5): 1},(1, 1): {(6, 5): 1},(-1, -1): {(5, 4): 1}}}
    valueTable = {(0, 0): 0,(0, 1): 0,(0, 2): 0,(0, 3): 0,(0, 4): 0,(0, 5): 0,(1, 0): 0,(1, 1): 0,(1, 2): 0,(1, 3): 0,(1, 4): 0,(1, 5): 0,(2, 0): 0,(2, 1): 0,(2, 2): 0,(2, 3): 0,(2, 4): 0,(2, 5): 0,(3, 0): 0,(3, 1): 0,(3, 2): 0,(3, 3): 0,(3, 4): 0,(3, 5): 0,(4, 0): 0,(4, 1): 0,(4, 2): 0,(4, 3): 0,(4, 4): 0,(4, 5): 0,(5, 0): 0,(5, 1): 0,(5, 2): 0,(5, 3): 0,(5, 4): 0,(5, 5): 0,(6, 0): 0,(6, 1): 0,(6, 2): 0,(6, 3): 0,(6, 4): 0,(6, 5): 0}
    
    #Observed Trajectories
    trajectoryToGoalA = [(0,0), (1,1), (1,2), (2,3), (3,4), (4,4), (5,4), (6,4)]
    trajectoryToGoalB = [(0,0), (1,1), (2,2), (2,3), (3,4), (4,3), (5,2), (6,1)]
    trajectoryToGoalC = [(0,0), (0,1), (1,2), (1,3), (1,4), (1,5)]

    #Environment 1: Solid  Barrier
    rewardA = {(0, 0): {(1, 0): {(1, 0): -1.0},(0, 1): {(0, 1): -1.0},(-1, 0): {(0, 0): -1},(0, -1): {(0, 0): -1},(-1, 1): {(0, 0): -1},(1, -1): {(0, 0): -1},(1, 1): {(1, 1): -1.4142135623730951},(-1, -1): {(0, 0): -1}},(0, 1): {(1, 0): {(1, 1): -1.0},(0, 1): {(0, 2): -1.0},(-1, 0): {(0, 1): -1},(0, -1): {(0, 0): -1.0},(-1, 1): {(0, 1): -1},(1, -1): {(1, 0): -1.4142135623730951},(1, 1): {(1, 2): -1.4142135623730951},(-1, -1): {(0, 1): -1}},(0, 2): {(1, 0): {(1, 2): -1.0},(0, 1): {(0, 3): -1.0},(-1, 0): {(0, 2): -1},(0, -1): {(0, 1): -1.0},(-1, 1): {(0, 2): -1},(1, -1): {(1, 1): -1.4142135623730951},(1, 1): {(1, 3): -1.4142135623730951},(-1, -1): {(0, 2): -1}},(0, 3): {(1, 0): {(1, 3): -1.0},(0, 1): {(0, 4): -1.0},(-1, 0): {(0, 3): -1},(0, -1): {(0, 2): -1.0},(-1, 1): {(0, 3): -1},(1, -1): {(1, 2): -1.4142135623730951},(1, 1): {(1, 4): -1.4142135623730951},(-1, -1): {(0, 3): -1}},(0, 4): {(1, 0): {(1, 4): -1.0},(0, 1): {(0, 5): -1.0},(-1, 0): {(0, 4): -1},(0, -1): {(0, 3): -1.0},(-1, 1): {(0, 4): -1},(1, -1): {(1, 3): -1.4142135623730951},(1, 1): {(1, 5): -1.4142135623730951},(-1, -1): {(0, 4): -1}},(0, 5): {(1, 0): {(1, 5): -1.0},(0, 1): {(0, 5): -1},(-1, 0): {(0, 5): -1},(0, -1): {(0, 4): -1.0},(-1, 1): {(0, 5): -1},(1, -1): {(1, 4): -1.4142135623730951},(1, 1): {(0, 5): -1},(-1, -1): {(0, 5): -1}},(1, 0): {(1, 0): {(2, 0): -1.0},(0, 1): {(1, 1): -1.0},(-1, 0): {(0, 0): -1.0},(0, -1): {(1, 0): -1},(-1, 1): {(0, 1): -1.4142135623730951},(1, -1): {(1, 0): -1},(1, 1): {(2, 1): -1.4142135623730951},(-1, -1): {(1, 0): -1}},(1, 1): {(1, 0): {(2, 1): -1.0},(0, 1): {(1, 2): -1.0},(-1, 0): {(0, 1): -1.0},(0, -1): {(1, 0): -1.0},(-1, 1): {(0, 2): -1.4142135623730951},(1, -1): {(2, 0): -1.4142135623730951},(1, 1): {(2, 2): -1.4142135623730951},(-1, -1): {(0, 0): -1.4142135623730951}},(1, 2): {(1, 0): {(2, 2): -1.0},(0, 1): {(1, 3): -1.0},(-1, 0): {(0, 2): -1.0},(0, -1): {(1, 1): -1.0},(-1, 1): {(0, 3): -1.4142135623730951},(1, -1): {(2, 1): -1.4142135623730951},(1, 1): {(2, 3): -1.4142135623730951},(-1, -1): {(0, 1): -1.4142135623730951}},(1, 3): {(1, 0): {(2, 3): -1.0},(0, 1): {(1, 4): -1.0},(-1, 0): {(0, 3): -1.0},(0, -1): {(1, 2): -1.0},(-1, 1): {(0, 4): -1.4142135623730951},(1, -1): {(2, 2): -1.4142135623730951},(1, 1): {(2, 4): -1.4142135623730951},(-1, -1): {(0, 2): -1.4142135623730951}},(1, 4): {(1, 0): {(2, 4): -1.0},(0, 1): {(1, 5): -1.0},(-1, 0): {(0, 4): -1.0},(0, -1): {(1, 3): -1.0},(-1, 1): {(0, 5): -1.4142135623730951},(1, -1): {(2, 3): -1.4142135623730951},(1, 1): {(2, 5): -1.4142135623730951},(-1, -1): {(0, 3): -1.4142135623730951}},(1, 5): {(1, 0): {(2, 5): -1.0},(0, 1): {(1, 5): -1},(-1, 0): {(0, 5): -1.0},(0, -1): {(1, 4): -1.0},(-1, 1): {(1, 5): -1},(1, -1): {(2, 4): -1.4142135623730951},(1, 1): {(1, 5): -1},(-1, -1): {(0, 4): -1.4142135623730951}},(2, 0): {(1, 0): {(3, 0): -1.0},(0, 1): {(2, 1): -1.0},(-1, 0): {(1, 0): -1.0},(0, -1): {(2, 0): -1},(-1, 1): {(1, 1): -1.4142135623730951},(1, -1): {(2, 0): -1},(1, 1): {(3, 1): -1.4142135623730951},(-1, -1): {(2, 0): -1}},(2, 1): {(1, 0): {(3, 1): -1.0},(0, 1): {(2, 2): -1.0},(-1, 0): {(1, 1): -1.0},(0, -1): {(2, 0): -1.0},(-1, 1): {(1, 2): -1.4142135623730951},(1, -1): {(3, 0): -1.4142135623730951},(1, 1): {(3, 2): -1.4142135623730951},(-1, -1): {(1, 0): -1.4142135623730951}},(2, 2): {(1, 0): {(3, 2): -1.0},(0, 1): {(2, 3): -1.0},(-1, 0): {(1, 2): -1.0},(0, -1): {(2, 1): -1.0},(-1, 1): {(1, 3): -1.4142135623730951},(1, -1): {(3, 1): -1.4142135623730951},(1, 1): {(3, 3): -1.4142135623730951},(-1, -1): {(1, 1): -1.4142135623730951}},(2, 3): {(1, 0): {(3, 3): -1.0},(0, 1): {(2, 4): -1.0},(-1, 0): {(1, 3): -1.0},(0, -1): {(2, 2): -1.0},(-1, 1): {(1, 4): -1.4142135623730951},(1, -1): {(3, 2): -1.4142135623730951},(1, 1): {(3, 4): -1.4142135623730951},(-1, -1): {(1, 2): -1.4142135623730951}},(2, 4): {(1, 0): {(3, 4): -1.0},(0, 1): {(2, 5): -1.0},(-1, 0): {(1, 4): -1.0},(0, -1): {(2, 3): -1.0},(-1, 1): {(1, 5): -1.4142135623730951},(1, -1): {(3, 3): -1.4142135623730951},(1, 1): {(3, 5): -1.4142135623730951},(-1, -1): {(1, 3): -1.4142135623730951}},(2, 5): {(1, 0): {(3, 5): -1.0},(0, 1): {(2, 5): -1},(-1, 0): {(1, 5): -1.0},(0, -1): {(2, 4): -1.0},(-1, 1): {(2, 5): -1},(1, -1): {(3, 4): -1.4142135623730951},(1, 1): {(2, 5): -1},(-1, -1): {(1, 4): -1.4142135623730951}},(3, 0): {(1, 0): {(4, 0): -100},(0, 1): {(3, 1): -100},(-1, 0): {(2, 0): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 1): -100},(1, -1): {(3, 0): -100},(1, 1): {(4, 1): -100},(-1, -1): {(3, 0): -100}},(3, 1): {(1, 0): {(4, 1): -100},(0, 1): {(3, 2): -100},(-1, 0): {(2, 1): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 2): -100},(1, -1): {(4, 0): -100},(1, 1): {(4, 2): -100},(-1, -1): {(2, 0): -100}},(3, 2): {(1, 0): {(4, 2): -100},(0, 1): {(3, 3): -100},(-1, 0): {(2, 2): -100},(0, -1): {(3, 1): -100},(-1, 1): {(2, 3): -100},(1, -1): {(4, 1): -100},(1, 1): {(4, 3): -100},(-1, -1): {(2, 1): -100}},(3, 3): {(1, 0): {(4, 3): -100},(0, 1): {(3, 4): -100},(-1, 0): {(2, 3): -100},(0, -1): {(3, 2): -100},(-1, 1): {(2, 4): -100},(1, -1): {(4, 2): -100},(1, 1): {(4, 4): -100},(-1, -1): {(2, 2): -100}},(3, 4): {(1, 0): {(4, 4): -1.0},(0, 1): {(3, 5): -1.0},(-1, 0): {(2, 4): -1.0},(0, -1): {(3, 3): -1.0},(-1, 1): {(2, 5): -1.4142135623730951},(1, -1): {(4, 3): -1.4142135623730951},(1, 1): {(4, 5): -1.4142135623730951},(-1, -1): {(2, 3): -1.4142135623730951}},(3, 5): {(1, 0): {(4, 5): -1.0},(0, 1): {(3, 5): -1},(-1, 0): {(2, 5): -1.0},(0, -1): {(3, 4): -1.0},(-1, 1): {(3, 5): -1},(1, -1): {(4, 4): -1.4142135623730951},(1, 1): {(3, 5): -1},(-1, -1): {(2, 4): -1.4142135623730951}},(4, 0): {(1, 0): {(5, 0): -1.0},(0, 1): {(4, 1): -1.0},(-1, 0): {(3, 0): -1.0},(0, -1): {(4, 0): -1},(-1, 1): {(3, 1): -1.4142135623730951},(1, -1): {(4, 0): -1},(1, 1): {(5, 1): -1.4142135623730951},(-1, -1): {(4, 0): -1}},(4, 1): {(1, 0): {(5, 1): -1.0},(0, 1): {(4, 2): -1.0},(-1, 0): {(3, 1): -1.0},(0, -1): {(4, 0): -1.0},(-1, 1): {(3, 2): -1.4142135623730951},(1, -1): {(5, 0): -1.4142135623730951},(1, 1): {(5, 2): -1.4142135623730951},(-1, -1): {(3, 0): -1.4142135623730951}},(4, 2): {(1, 0): {(5, 2): -1.0},(0, 1): {(4, 3): -1.0},(-1, 0): {(3, 2): -1.0},(0, -1): {(4, 1): -1.0},(-1, 1): {(3, 3): -1.4142135623730951},(1, -1): {(5, 1): -1.4142135623730951},(1, 1): {(5, 3): -1.4142135623730951},(-1, -1): {(3, 1): -1.4142135623730951}},(4, 3): {(1, 0): {(5, 3): -1.0},(0, 1): {(4, 4): -1.0},(-1, 0): {(3, 3): -1.0},(0, -1): {(4, 2): -1.0},(-1, 1): {(3, 4): -1.4142135623730951},(1, -1): {(5, 2): -1.4142135623730951},(1, 1): {(5, 4): -1.4142135623730951},(-1, -1): {(3, 2): -1.4142135623730951}},(4, 4): {(1, 0): {(5, 4): -1.0},(0, 1): {(4, 5): -1.0},(-1, 0): {(3, 4): -1.0},(0, -1): {(4, 3): -1.0},(-1, 1): {(3, 5): -1.4142135623730951},(1, -1): {(5, 3): -1.4142135623730951},(1, 1): {(5, 5): -1.4142135623730951},(-1, -1): {(3, 3): -1.4142135623730951}},(4, 5): {(1, 0): {(5, 5): -1.0},(0, 1): {(4, 5): -1},(-1, 0): {(3, 5): -1.0},(0, -1): {(4, 4): -1.0},(-1, 1): {(4, 5): -1},(1, -1): {(5, 4): -1.4142135623730951},(1, 1): {(4, 5): -1},(-1, -1): {(3, 4): -1.4142135623730951}},(5, 0): {(1, 0): {(6, 0): -1.0},(0, 1): {(5, 1): -1.0},(-1, 0): {(4, 0): -1.0},(0, -1): {(5, 0): -1},(-1, 1): {(4, 1): -1.4142135623730951},(1, -1): {(5, 0): -1},(1, 1): {(6, 1): -1.4142135623730951},(-1, -1): {(5, 0): -1}},(5, 1): {(1, 0): {(6, 1): -1.0},(0, 1): {(5, 2): -1.0},(-1, 0): {(4, 1): -1.0},(0, -1): {(5, 0): -1.0},(-1, 1): {(4, 2): -1.4142135623730951},(1, -1): {(6, 0): -1.4142135623730951},(1, 1): {(6, 2): -1.4142135623730951},(-1, -1): {(4, 0): -1.4142135623730951}},(5, 2): {(1, 0): {(6, 2): -1.0},(0, 1): {(5, 3): -1.0},(-1, 0): {(4, 2): -1.0},(0, -1): {(5, 1): -1.0},(-1, 1): {(4, 3): -1.4142135623730951},(1, -1): {(6, 1): -1.4142135623730951},(1, 1): {(6, 3): -1.4142135623730951},(-1, -1): {(4, 1): -1.4142135623730951}},(5, 3): {(1, 0): {(6, 3): -1.0},(0, 1): {(5, 4): -1.0},(-1, 0): {(4, 3): -1.0},(0, -1): {(5, 2): -1.0},(-1, 1): {(4, 4): -1.4142135623730951},(1, -1): {(6, 2): -1.4142135623730951},(1, 1): {(6, 4): -1.4142135623730951},(-1, -1): {(4, 2): -1.4142135623730951}},(5, 4): {(1, 0): {(6, 4): -1.0},(0, 1): {(5, 5): -1.0},(-1, 0): {(4, 4): -1.0},(0, -1): {(5, 3): -1.0},(-1, 1): {(4, 5): -1.4142135623730951},(1, -1): {(6, 3): -1.4142135623730951},(1, 1): {(6, 5): -1.4142135623730951},(-1, -1): {(4, 3): -1.4142135623730951}},(5, 5): {(1, 0): {(6, 5): -1.0},(0, 1): {(5, 5): -1},(-1, 0): {(4, 5): -1.0},(0, -1): {(5, 4): -1.0},(-1, 1): {(5, 5): -1},(1, -1): {(6, 4): -1.4142135623730951},(1, 1): {(5, 5): -1},(-1, -1): {(4, 4): -1.4142135623730951}},(6, 0): {(1, 0): {(6, 0): -1},(0, 1): {(6, 1): -1.0},(-1, 0): {(5, 0): -1.0},(0, -1): {(6, 0): -1},(-1, 1): {(5, 1): -1.4142135623730951},(1, -1): {(6, 0): -1},(1, 1): {(6, 0): -1},(-1, -1): {(6, 0): -1}},(6, 1): {(1, 0): {(6, 1): -1},(0, 1): {(6, 2): -1.0},(-1, 0): {(5, 1): -1.0},(0, -1): {(6, 0): -1.0},(-1, 1): {(5, 2): -1.4142135623730951},(1, -1): {(6, 1): -1},(1, 1): {(6, 1): -1},(-1, -1): {(5, 0): -1.4142135623730951}},(6, 2): {(1, 0): {(6, 2): -1},(0, 1): {(6, 3): -1.0},(-1, 0): {(5, 2): -1.0},(0, -1): {(6, 1): -1.0},(-1, 1): {(5, 3): -1.4142135623730951},(1, -1): {(6, 2): -1},(1, 1): {(6, 2): -1},(-1, -1): {(5, 1): -1.4142135623730951}},(6, 3): {(1, 0): {(6, 3): -1},(0, 1): {(6, 4): -1.0},(-1, 0): {(5, 3): -1.0},(0, -1): {(6, 2): -1.0},(-1, 1): {(5, 4): -1.4142135623730951},(1, -1): {(6, 3): -1},(1, 1): {(6, 3): -1},(-1, -1): {(5, 2): -1.4142135623730951}},(6, 4): {(1, 0): {(6, 4): -1},(0, 1): {(6, 5): 10},(-1, 0): {(5, 4): 10},(0, -1): {(6, 3): 10},(-1, 1): {(5, 5): 10},(1, -1): {(6, 4): -1},(1, 1): {(6, 4): -1},(-1, -1): {(5, 3): 10}},(6, 5): {(1, 0): {(6, 5): -1},(0, 1): {(6, 5): -1},(-1, 0): {(5, 5): -1.0},(0, -1): {(6, 4): -1.0},(-1, 1): {(6, 5): -1},(1, -1): {(6, 5): -1},(1, 1): {(6, 5): -1},(-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardB = {(0, 0): {(1, 0): {(1, 0): -1.0},(0, 1): {(0, 1): -1.0},(-1, 0): {(0, 0): -1},(0, -1): {(0, 0): -1},(-1, 1): {(0, 0): -1},(1, -1): {(0, 0): -1},(1, 1): {(1, 1): -1.4142135623730951},(-1, -1): {(0, 0): -1}},(0, 1): {(1, 0): {(1, 1): -1.0},(0, 1): {(0, 2): -1.0},(-1, 0): {(0, 1): -1},(0, -1): {(0, 0): -1.0},(-1, 1): {(0, 1): -1},(1, -1): {(1, 0): -1.4142135623730951},(1, 1): {(1, 2): -1.4142135623730951},(-1, -1): {(0, 1): -1}},(0, 2): {(1, 0): {(1, 2): -1.0},(0, 1): {(0, 3): -1.0},(-1, 0): {(0, 2): -1},(0, -1): {(0, 1): -1.0},(-1, 1): {(0, 2): -1},(1, -1): {(1, 1): -1.4142135623730951},(1, 1): {(1, 3): -1.4142135623730951},(-1, -1): {(0, 2): -1}},(0, 3): {(1, 0): {(1, 3): -1.0},(0, 1): {(0, 4): -1.0},(-1, 0): {(0, 3): -1},(0, -1): {(0, 2): -1.0},(-1, 1): {(0, 3): -1},(1, -1): {(1, 2): -1.4142135623730951},(1, 1): {(1, 4): -1.4142135623730951},(-1, -1): {(0, 3): -1}},(0, 4): {(1, 0): {(1, 4): -1.0},(0, 1): {(0, 5): -1.0},(-1, 0): {(0, 4): -1},(0, -1): {(0, 3): -1.0},(-1, 1): {(0, 4): -1},(1, -1): {(1, 3): -1.4142135623730951},(1, 1): {(1, 5): -1.4142135623730951},(-1, -1): {(0, 4): -1}},(0, 5): {(1, 0): {(1, 5): -1.0},(0, 1): {(0, 5): -1},(-1, 0): {(0, 5): -1},(0, -1): {(0, 4): -1.0},(-1, 1): {(0, 5): -1},(1, -1): {(1, 4): -1.4142135623730951},(1, 1): {(0, 5): -1},(-1, -1): {(0, 5): -1}},(1, 0): {(1, 0): {(2, 0): -1.0},(0, 1): {(1, 1): -1.0},(-1, 0): {(0, 0): -1.0},(0, -1): {(1, 0): -1},(-1, 1): {(0, 1): -1.4142135623730951},(1, -1): {(1, 0): -1},(1, 1): {(2, 1): -1.4142135623730951},(-1, -1): {(1, 0): -1}},(1, 1): {(1, 0): {(2, 1): -1.0},(0, 1): {(1, 2): -1.0},(-1, 0): {(0, 1): -1.0},(0, -1): {(1, 0): -1.0},(-1, 1): {(0, 2): -1.4142135623730951},(1, -1): {(2, 0): -1.4142135623730951},(1, 1): {(2, 2): -1.4142135623730951},(-1, -1): {(0, 0): -1.4142135623730951}},(1, 2): {(1, 0): {(2, 2): -1.0},(0, 1): {(1, 3): -1.0},(-1, 0): {(0, 2): -1.0},(0, -1): {(1, 1): -1.0},(-1, 1): {(0, 3): -1.4142135623730951},(1, -1): {(2, 1): -1.4142135623730951},(1, 1): {(2, 3): -1.4142135623730951},(-1, -1): {(0, 1): -1.4142135623730951}},(1, 3): {(1, 0): {(2, 3): -1.0},(0, 1): {(1, 4): -1.0},(-1, 0): {(0, 3): -1.0},(0, -1): {(1, 2): -1.0},(-1, 1): {(0, 4): -1.4142135623730951},(1, -1): {(2, 2): -1.4142135623730951},(1, 1): {(2, 4): -1.4142135623730951},(-1, -1): {(0, 2): -1.4142135623730951}},(1, 4): {(1, 0): {(2, 4): -1.0},(0, 1): {(1, 5): -1.0},(-1, 0): {(0, 4): -1.0},(0, -1): {(1, 3): -1.0},(-1, 1): {(0, 5): -1.4142135623730951},(1, -1): {(2, 3): -1.4142135623730951},(1, 1): {(2, 5): -1.4142135623730951},(-1, -1): {(0, 3): -1.4142135623730951}},(1, 5): {(1, 0): {(2, 5): -1.0},(0, 1): {(1, 5): -1},(-1, 0): {(0, 5): -1.0},(0, -1): {(1, 4): -1.0},(-1, 1): {(1, 5): -1},(1, -1): {(2, 4): -1.4142135623730951},(1, 1): {(1, 5): -1},(-1, -1): {(0, 4): -1.4142135623730951}},(2, 0): {(1, 0): {(3, 0): -1.0},(0, 1): {(2, 1): -1.0},(-1, 0): {(1, 0): -1.0},(0, -1): {(2, 0): -1},(-1, 1): {(1, 1): -1.4142135623730951},(1, -1): {(2, 0): -1},(1, 1): {(3, 1): -1.4142135623730951},(-1, -1): {(2, 0): -1}},(2, 1): {(1, 0): {(3, 1): -1.0},(0, 1): {(2, 2): -1.0},(-1, 0): {(1, 1): -1.0},(0, -1): {(2, 0): -1.0},(-1, 1): {(1, 2): -1.4142135623730951},(1, -1): {(3, 0): -1.4142135623730951},(1, 1): {(3, 2): -1.4142135623730951},(-1, -1): {(1, 0): -1.4142135623730951}},(2, 2): {(1, 0): {(3, 2): -1.0},(0, 1): {(2, 3): -1.0},(-1, 0): {(1, 2): -1.0},(0, -1): {(2, 1): -1.0},(-1, 1): {(1, 3): -1.4142135623730951},(1, -1): {(3, 1): -1.4142135623730951},(1, 1): {(3, 3): -1.4142135623730951},(-1, -1): {(1, 1): -1.4142135623730951}},(2, 3): {(1, 0): {(3, 3): -1.0},(0, 1): {(2, 4): -1.0},(-1, 0): {(1, 3): -1.0},(0, -1): {(2, 2): -1.0},(-1, 1): {(1, 4): -1.4142135623730951},(1, -1): {(3, 2): -1.4142135623730951},(1, 1): {(3, 4): -1.4142135623730951},(-1, -1): {(1, 2): -1.4142135623730951}},(2, 4): {(1, 0): {(3, 4): -1.0},(0, 1): {(2, 5): -1.0},(-1, 0): {(1, 4): -1.0},(0, -1): {(2, 3): -1.0},(-1, 1): {(1, 5): -1.4142135623730951},(1, -1): {(3, 3): -1.4142135623730951},(1, 1): {(3, 5): -1.4142135623730951},(-1, -1): {(1, 3): -1.4142135623730951}},(2, 5): {(1, 0): {(3, 5): -1.0},(0, 1): {(2, 5): -1},(-1, 0): {(1, 5): -1.0},(0, -1): {(2, 4): -1.0},(-1, 1): {(2, 5): -1},(1, -1): {(3, 4): -1.4142135623730951},(1, 1): {(2, 5): -1},(-1, -1): {(1, 4): -1.4142135623730951}},(3, 0): {(1, 0): {(4, 0): -100},(0, 1): {(3, 1): -100},(-1, 0): {(2, 0): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 1): -100},(1, -1): {(3, 0): -100},(1, 1): {(4, 1): -100},(-1, -1): {(3, 0): -100}},(3, 1): {(1, 0): {(4, 1): -100},(0, 1): {(3, 2): -100},(-1, 0): {(2, 1): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 2): -100},(1, -1): {(4, 0): -100},(1, 1): {(4, 2): -100},(-1, -1): {(2, 0): -100}},(3, 2): {(1, 0): {(4, 2): -100},(0, 1): {(3, 3): -100},(-1, 0): {(2, 2): -100},(0, -1): {(3, 1): -100},(-1, 1): {(2, 3): -100},(1, -1): {(4, 1): -100},(1, 1): {(4, 3): -100},(-1, -1): {(2, 1): -100}},(3, 3): {(1, 0): {(4, 3): -100},(0, 1): {(3, 4): -100},(-1, 0): {(2, 3): -100},(0, -1): {(3, 2): -100},(-1, 1): {(2, 4): -100},(1, -1): {(4, 2): -100},(1, 1): {(4, 4): -100},(-1, -1): {(2, 2): -100}},(3, 4): {(1, 0): {(4, 4): -1.0},(0, 1): {(3, 5): -1.0},(-1, 0): {(2, 4): -1.0},(0, -1): {(3, 3): -1.0},(-1, 1): {(2, 5): -1.4142135623730951},(1, -1): {(4, 3): -1.4142135623730951},(1, 1): {(4, 5): -1.4142135623730951},(-1, -1): {(2, 3): -1.4142135623730951}},(3, 5): {(1, 0): {(4, 5): -1.0},(0, 1): {(3, 5): -1},(-1, 0): {(2, 5): -1.0},(0, -1): {(3, 4): -1.0},(-1, 1): {(3, 5): -1},(1, -1): {(4, 4): -1.4142135623730951},(1, 1): {(3, 5): -1},(-1, -1): {(2, 4): -1.4142135623730951}},(4, 0): {(1, 0): {(5, 0): -1.0},(0, 1): {(4, 1): -1.0},(-1, 0): {(3, 0): -1.0},(0, -1): {(4, 0): -1},(-1, 1): {(3, 1): -1.4142135623730951},(1, -1): {(4, 0): -1},(1, 1): {(5, 1): -1.4142135623730951},(-1, -1): {(4, 0): -1}},(4, 1): {(1, 0): {(5, 1): -1.0},(0, 1): {(4, 2): -1.0},(-1, 0): {(3, 1): -1.0},(0, -1): {(4, 0): -1.0},(-1, 1): {(3, 2): -1.4142135623730951},(1, -1): {(5, 0): -1.4142135623730951},(1, 1): {(5, 2): -1.4142135623730951},(-1, -1): {(3, 0): -1.4142135623730951}},(4, 2): {(1, 0): {(5, 2): -1.0},(0, 1): {(4, 3): -1.0},(-1, 0): {(3, 2): -1.0},(0, -1): {(4, 1): -1.0},(-1, 1): {(3, 3): -1.4142135623730951},(1, -1): {(5, 1): -1.4142135623730951},(1, 1): {(5, 3): -1.4142135623730951},(-1, -1): {(3, 1): -1.4142135623730951}},(4, 3): {(1, 0): {(5, 3): -1.0},(0, 1): {(4, 4): -1.0},(-1, 0): {(3, 3): -1.0},(0, -1): {(4, 2): -1.0},(-1, 1): {(3, 4): -1.4142135623730951},(1, -1): {(5, 2): -1.4142135623730951},(1, 1): {(5, 4): -1.4142135623730951},(-1, -1): {(3, 2): -1.4142135623730951}},(4, 4): {(1, 0): {(5, 4): -1.0},(0, 1): {(4, 5): -1.0},(-1, 0): {(3, 4): -1.0},(0, -1): {(4, 3): -1.0},(-1, 1): {(3, 5): -1.4142135623730951},(1, -1): {(5, 3): -1.4142135623730951},(1, 1): {(5, 5): -1.4142135623730951},(-1, -1): {(3, 3): -1.4142135623730951}},(4, 5): {(1, 0): {(5, 5): -1.0},(0, 1): {(4, 5): -1},(-1, 0): {(3, 5): -1.0},(0, -1): {(4, 4): -1.0},(-1, 1): {(4, 5): -1},(1, -1): {(5, 4): -1.4142135623730951},(1, 1): {(4, 5): -1},(-1, -1): {(3, 4): -1.4142135623730951}},(5, 0): {(1, 0): {(6, 0): -1.0},(0, 1): {(5, 1): -1.0},(-1, 0): {(4, 0): -1.0},(0, -1): {(5, 0): -1},(-1, 1): {(4, 1): -1.4142135623730951},(1, -1): {(5, 0): -1},(1, 1): {(6, 1): -1.4142135623730951},(-1, -1): {(5, 0): -1}},(5, 1): {(1, 0): {(6, 1): -1.0},(0, 1): {(5, 2): -1.0},(-1, 0): {(4, 1): -1.0},(0, -1): {(5, 0): -1.0},(-1, 1): {(4, 2): -1.4142135623730951},(1, -1): {(6, 0): -1.4142135623730951},(1, 1): {(6, 2): -1.4142135623730951},(-1, -1): {(4, 0): -1.4142135623730951}},(5, 2): {(1, 0): {(6, 2): -1.0},(0, 1): {(5, 3): -1.0},(-1, 0): {(4, 2): -1.0},(0, -1): {(5, 1): -1.0},(-1, 1): {(4, 3): -1.4142135623730951},(1, -1): {(6, 1): -1.4142135623730951},(1, 1): {(6, 3): -1.4142135623730951},(-1, -1): {(4, 1): -1.4142135623730951}},(5, 3): {(1, 0): {(6, 3): -1.0},(0, 1): {(5, 4): -1.0},(-1, 0): {(4, 3): -1.0},(0, -1): {(5, 2): -1.0},(-1, 1): {(4, 4): -1.4142135623730951},(1, -1): {(6, 2): -1.4142135623730951},(1, 1): {(6, 4): -1.4142135623730951},(-1, -1): {(4, 2): -1.4142135623730951}},(5, 4): {(1, 0): {(6, 4): -1.0},(0, 1): {(5, 5): -1.0},(-1, 0): {(4, 4): -1.0},(0, -1): {(5, 3): -1.0},(-1, 1): {(4, 5): -1.4142135623730951},(1, -1): {(6, 3): -1.4142135623730951},(1, 1): {(6, 5): -1.4142135623730951},(-1, -1): {(4, 3): -1.4142135623730951}},(5, 5): {(1, 0): {(6, 5): -1.0},(0, 1): {(5, 5): -1},(-1, 0): {(4, 5): -1.0},(0, -1): {(5, 4): -1.0},(-1, 1): {(5, 5): -1},(1, -1): {(6, 4): -1.4142135623730951},(1, 1): {(5, 5): -1},(-1, -1): {(4, 4): -1.4142135623730951}},(6, 0): {(1, 0): {(6, 0): -1},(0, 1): {(6, 1): -1.0},(-1, 0): {(5, 0): -1.0},(0, -1): {(6, 0): -1},(-1, 1): {(5, 1): -1.4142135623730951},(1, -1): {(6, 0): -1},(1, 1): {(6, 0): -1},(-1, -1): {(6, 0): -1}},(6, 1): {(1, 0): {(6, 1): -1},(0, 1): {(6, 2): 10},(-1, 0): {(5, 1): 10},(0, -1): {(6, 0): 10},(-1, 1): {(5, 2): 10},(1, -1): {(6, 1): -1},(1, 1): {(6, 1): -1},(-1, -1): {(5, 0): 10}},(6, 2): {(1, 0): {(6, 2): -1},(0, 1): {(6, 3): -1.0},(-1, 0): {(5, 2): -1.0},(0, -1): {(6, 1): -1.0},(-1, 1): {(5, 3): -1.4142135623730951},(1, -1): {(6, 2): -1},(1, 1): {(6, 2): -1},(-1, -1): {(5, 1): -1.4142135623730951}},(6, 3): {(1, 0): {(6, 3): -1},(0, 1): {(6, 4): -1.0},(-1, 0): {(5, 3): -1.0},(0, -1): {(6, 2): -1.0},(-1, 1): {(5, 4): -1.4142135623730951},(1, -1): {(6, 3): -1},(1, 1): {(6, 3): -1},(-1, -1): {(5, 2): -1.4142135623730951}},(6, 4): {(1, 0): {(6, 4): -1},(0, 1): {(6, 5): -1.0},(-1, 0): {(5, 4): -1.0},(0, -1): {(6, 3): -1.0},(-1, 1): {(5, 5): -1.4142135623730951},(1, -1): {(6, 4): -1},(1, 1): {(6, 4): -1},(-1, -1): {(5, 3): -1.4142135623730951}},(6, 5): {(1, 0): {(6, 5): -1},(0, 1): {(6, 5): -1},(-1, 0): {(5, 5): -1.0},(0, -1): {(6, 4): -1.0},(-1, 1): {(6, 5): -1},(1, -1): {(6, 5): -1},(1, 1): {(6, 5): -1},(-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardC = {(0, 0): {(1, 0): {(1, 0): -1.0},(0, 1): {(0, 1): -1.0},(-1, 0): {(0, 0): -1},(0, -1): {(0, 0): -1},(-1, 1): {(0, 0): -1},(1, -1): {(0, 0): -1},(1, 1): {(1, 1): -1.4142135623730951},(-1, -1): {(0, 0): -1}},(0, 1): {(1, 0): {(1, 1): -1.0},(0, 1): {(0, 2): -1.0},(-1, 0): {(0, 1): -1},(0, -1): {(0, 0): -1.0},(-1, 1): {(0, 1): -1},(1, -1): {(1, 0): -1.4142135623730951},(1, 1): {(1, 2): -1.4142135623730951},(-1, -1): {(0, 1): -1}},(0, 2): {(1, 0): {(1, 2): -1.0},(0, 1): {(0, 3): -1.0},(-1, 0): {(0, 2): -1},(0, -1): {(0, 1): -1.0},(-1, 1): {(0, 2): -1},(1, -1): {(1, 1): -1.4142135623730951},(1, 1): {(1, 3): -1.4142135623730951},(-1, -1): {(0, 2): -1}},(0, 3): {(1, 0): {(1, 3): -1.0},(0, 1): {(0, 4): -1.0},(-1, 0): {(0, 3): -1},(0, -1): {(0, 2): -1.0},(-1, 1): {(0, 3): -1},(1, -1): {(1, 2): -1.4142135623730951},(1, 1): {(1, 4): -1.4142135623730951},(-1, -1): {(0, 3): -1}},(0, 4): {(1, 0): {(1, 4): -1.0},(0, 1): {(0, 5): -1.0},(-1, 0): {(0, 4): -1},(0, -1): {(0, 3): -1.0},(-1, 1): {(0, 4): -1},(1, -1): {(1, 3): -1.4142135623730951},(1, 1): {(1, 5): -1.4142135623730951},(-1, -1): {(0, 4): -1}},(0, 5): {(1, 0): {(1, 5): -1.0},(0, 1): {(0, 5): -1},(-1, 0): {(0, 5): -1},(0, -1): {(0, 4): -1.0},(-1, 1): {(0, 5): -1},(1, -1): {(1, 4): -1.4142135623730951},(1, 1): {(0, 5): -1},(-1, -1): {(0, 5): -1}},(1, 0): {(1, 0): {(2, 0): -1.0},(0, 1): {(1, 1): -1.0},(-1, 0): {(0, 0): -1.0},(0, -1): {(1, 0): -1},(-1, 1): {(0, 1): -1.4142135623730951},(1, -1): {(1, 0): -1},(1, 1): {(2, 1): -1.4142135623730951},(-1, -1): {(1, 0): -1}},(1, 1): {(1, 0): {(2, 1): -1.0},(0, 1): {(1, 2): -1.0},(-1, 0): {(0, 1): -1.0},(0, -1): {(1, 0): -1.0},(-1, 1): {(0, 2): -1.4142135623730951},(1, -1): {(2, 0): -1.4142135623730951},(1, 1): {(2, 2): -1.4142135623730951},(-1, -1): {(0, 0): -1.4142135623730951}},(1, 2): {(1, 0): {(2, 2): -1.0},(0, 1): {(1, 3): -1.0},(-1, 0): {(0, 2): -1.0},(0, -1): {(1, 1): -1.0},(-1, 1): {(0, 3): -1.4142135623730951},(1, -1): {(2, 1): -1.4142135623730951},(1, 1): {(2, 3): -1.4142135623730951},(-1, -1): {(0, 1): -1.4142135623730951}},(1, 3): {(1, 0): {(2, 3): -1.0},(0, 1): {(1, 4): -1.0},(-1, 0): {(0, 3): -1.0},(0, -1): {(1, 2): -1.0},(-1, 1): {(0, 4): -1.4142135623730951},(1, -1): {(2, 2): -1.4142135623730951},(1, 1): {(2, 4): -1.4142135623730951},(-1, -1): {(0, 2): -1.4142135623730951}},(1, 4): {(1, 0): {(2, 4): -1.0},(0, 1): {(1, 5): -1.0},(-1, 0): {(0, 4): -1.0},(0, -1): {(1, 3): -1.0},(-1, 1): {(0, 5): -1.4142135623730951},(1, -1): {(2, 3): -1.4142135623730951},(1, 1): {(2, 5): -1.4142135623730951},(-1, -1): {(0, 3): -1.4142135623730951}},(1, 5): {(1, 0): {(2, 5): 10},(0, 1): {(1, 5): -1},(-1, 0): {(0, 5): 10},(0, -1): {(1, 4): 10},(-1, 1): {(1, 5): -1},(1, -1): {(2, 4): 10},(1, 1): {(1, 5): -1},(-1, -1): {(0, 4): 10}},(2, 0): {(1, 0): {(3, 0): -1.0},(0, 1): {(2, 1): -1.0},(-1, 0): {(1, 0): -1.0},(0, -1): {(2, 0): -1},(-1, 1): {(1, 1): -1.4142135623730951},(1, -1): {(2, 0): -1},(1, 1): {(3, 1): -1.4142135623730951},(-1, -1): {(2, 0): -1}},(2, 1): {(1, 0): {(3, 1): -1.0},(0, 1): {(2, 2): -1.0},(-1, 0): {(1, 1): -1.0},(0, -1): {(2, 0): -1.0},(-1, 1): {(1, 2): -1.4142135623730951},(1, -1): {(3, 0): -1.4142135623730951},(1, 1): {(3, 2): -1.4142135623730951},(-1, -1): {(1, 0): -1.4142135623730951}},(2, 2): {(1, 0): {(3, 2): -1.0},(0, 1): {(2, 3): -1.0},(-1, 0): {(1, 2): -1.0},(0, -1): {(2, 1): -1.0},(-1, 1): {(1, 3): -1.4142135623730951},(1, -1): {(3, 1): -1.4142135623730951},(1, 1): {(3, 3): -1.4142135623730951},(-1, -1): {(1, 1): -1.4142135623730951}},(2, 3): {(1, 0): {(3, 3): -1.0},(0, 1): {(2, 4): -1.0},(-1, 0): {(1, 3): -1.0},(0, -1): {(2, 2): -1.0},(-1, 1): {(1, 4): -1.4142135623730951},(1, -1): {(3, 2): -1.4142135623730951},(1, 1): {(3, 4): -1.4142135623730951},(-1, -1): {(1, 2): -1.4142135623730951}},(2, 4): {(1, 0): {(3, 4): -1.0},(0, 1): {(2, 5): -1.0},(-1, 0): {(1, 4): -1.0},(0, -1): {(2, 3): -1.0},(-1, 1): {(1, 5): -1.4142135623730951},(1, -1): {(3, 3): -1.4142135623730951},(1, 1): {(3, 5): -1.4142135623730951},(-1, -1): {(1, 3): -1.4142135623730951}},(2, 5): {(1, 0): {(3, 5): -1.0},(0, 1): {(2, 5): -1},(-1, 0): {(1, 5): -1.0},(0, -1): {(2, 4): -1.0},(-1, 1): {(2, 5): -1},(1, -1): {(3, 4): -1.4142135623730951},(1, 1): {(2, 5): -1},(-1, -1): {(1, 4): -1.4142135623730951}},(3, 0): {(1, 0): {(4, 0): -100},(0, 1): {(3, 1): -100},(-1, 0): {(2, 0): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 1): -100},(1, -1): {(3, 0): -100},(1, 1): {(4, 1): -100},(-1, -1): {(3, 0): -100}},(3, 1): {(1, 0): {(4, 1): -100},(0, 1): {(3, 2): -100},(-1, 0): {(2, 1): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 2): -100},(1, -1): {(4, 0): -100},(1, 1): {(4, 2): -100},(-1, -1): {(2, 0): -100}},(3, 2): {(1, 0): {(4, 2): -100},(0, 1): {(3, 3): -100},(-1, 0): {(2, 2): -100},(0, -1): {(3, 1): -100},(-1, 1): {(2, 3): -100},(1, -1): {(4, 1): -100},(1, 1): {(4, 3): -100},(-1, -1): {(2, 1): -100}},(3, 3): {(1, 0): {(4, 3): -100},(0, 1): {(3, 4): -100},(-1, 0): {(2, 3): -100},(0, -1): {(3, 2): -100},(-1, 1): {(2, 4): -100},(1, -1): {(4, 2): -100},(1, 1): {(4, 4): -100},(-1, -1): {(2, 2): -100}},(3, 4): {(1, 0): {(4, 4): -1.0},(0, 1): {(3, 5): -1.0},(-1, 0): {(2, 4): -1.0},(0, -1): {(3, 3): -1.0},(-1, 1): {(2, 5): -1.4142135623730951},(1, -1): {(4, 3): -1.4142135623730951},(1, 1): {(4, 5): -1.4142135623730951},(-1, -1): {(2, 3): -1.4142135623730951}},(3, 5): {(1, 0): {(4, 5): -1.0},(0, 1): {(3, 5): -1},(-1, 0): {(2, 5): -1.0},(0, -1): {(3, 4): -1.0},(-1, 1): {(3, 5): -1},(1, -1): {(4, 4): -1.4142135623730951},(1, 1): {(3, 5): -1},(-1, -1): {(2, 4): -1.4142135623730951}},(4, 0): {(1, 0): {(5, 0): -1.0},(0, 1): {(4, 1): -1.0},(-1, 0): {(3, 0): -1.0},(0, -1): {(4, 0): -1},(-1, 1): {(3, 1): -1.4142135623730951},(1, -1): {(4, 0): -1},(1, 1): {(5, 1): -1.4142135623730951},(-1, -1): {(4, 0): -1}},(4, 1): {(1, 0): {(5, 1): -1.0},(0, 1): {(4, 2): -1.0},(-1, 0): {(3, 1): -1.0},(0, -1): {(4, 0): -1.0},(-1, 1): {(3, 2): -1.4142135623730951},(1, -1): {(5, 0): -1.4142135623730951},(1, 1): {(5, 2): -1.4142135623730951},(-1, -1): {(3, 0): -1.4142135623730951}},(4, 2): {(1, 0): {(5, 2): -1.0},(0, 1): {(4, 3): -1.0},(-1, 0): {(3, 2): -1.0},(0, -1): {(4, 1): -1.0},(-1, 1): {(3, 3): -1.4142135623730951},(1, -1): {(5, 1): -1.4142135623730951},(1, 1): {(5, 3): -1.4142135623730951},(-1, -1): {(3, 1): -1.4142135623730951}},(4, 3): {(1, 0): {(5, 3): -1.0},(0, 1): {(4, 4): -1.0},(-1, 0): {(3, 3): -1.0},(0, -1): {(4, 2): -1.0},(-1, 1): {(3, 4): -1.4142135623730951},(1, -1): {(5, 2): -1.4142135623730951},(1, 1): {(5, 4): -1.4142135623730951},(-1, -1): {(3, 2): -1.4142135623730951}},(4, 4): {(1, 0): {(5, 4): -1.0},(0, 1): {(4, 5): -1.0},(-1, 0): {(3, 4): -1.0},(0, -1): {(4, 3): -1.0},(-1, 1): {(3, 5): -1.4142135623730951},(1, -1): {(5, 3): -1.4142135623730951},(1, 1): {(5, 5): -1.4142135623730951},(-1, -1): {(3, 3): -1.4142135623730951}},(4, 5): {(1, 0): {(5, 5): -1.0},(0, 1): {(4, 5): -1},(-1, 0): {(3, 5): -1.0},(0, -1): {(4, 4): -1.0},(-1, 1): {(4, 5): -1},(1, -1): {(5, 4): -1.4142135623730951},(1, 1): {(4, 5): -1},(-1, -1): {(3, 4): -1.4142135623730951}},(5, 0): {(1, 0): {(6, 0): -1.0},(0, 1): {(5, 1): -1.0},(-1, 0): {(4, 0): -1.0},(0, -1): {(5, 0): -1},(-1, 1): {(4, 1): -1.4142135623730951},(1, -1): {(5, 0): -1},(1, 1): {(6, 1): -1.4142135623730951},(-1, -1): {(5, 0): -1}},(5, 1): {(1, 0): {(6, 1): -1.0},(0, 1): {(5, 2): -1.0},(-1, 0): {(4, 1): -1.0},(0, -1): {(5, 0): -1.0},(-1, 1): {(4, 2): -1.4142135623730951},(1, -1): {(6, 0): -1.4142135623730951},(1, 1): {(6, 2): -1.4142135623730951},(-1, -1): {(4, 0): -1.4142135623730951}},(5, 2): {(1, 0): {(6, 2): -1.0},(0, 1): {(5, 3): -1.0},(-1, 0): {(4, 2): -1.0},(0, -1): {(5, 1): -1.0},(-1, 1): {(4, 3): -1.4142135623730951},(1, -1): {(6, 1): -1.4142135623730951},(1, 1): {(6, 3): -1.4142135623730951},(-1, -1): {(4, 1): -1.4142135623730951}},(5, 3): {(1, 0): {(6, 3): -1.0},(0, 1): {(5, 4): -1.0},(-1, 0): {(4, 3): -1.0},(0, -1): {(5, 2): -1.0},(-1, 1): {(4, 4): -1.4142135623730951},(1, -1): {(6, 2): -1.4142135623730951},(1, 1): {(6, 4): -1.4142135623730951},(-1, -1): {(4, 2): -1.4142135623730951}},(5, 4): {(1, 0): {(6, 4): -1.0},(0, 1): {(5, 5): -1.0},(-1, 0): {(4, 4): -1.0},(0, -1): {(5, 3): -1.0},(-1, 1): {(4, 5): -1.4142135623730951},(1, -1): {(6, 3): -1.4142135623730951},(1, 1): {(6, 5): -1.4142135623730951},(-1, -1): {(4, 3): -1.4142135623730951}},(5, 5): {(1, 0): {(6, 5): -1.0},(0, 1): {(5, 5): -1},(-1, 0): {(4, 5): -1.0},(0, -1): {(5, 4): -1.0},(-1, 1): {(5, 5): -1},(1, -1): {(6, 4): -1.4142135623730951},(1, 1): {(5, 5): -1},(-1, -1): {(4, 4): -1.4142135623730951}},(6, 0): {(1, 0): {(6, 0): -1},(0, 1): {(6, 1): -1.0},(-1, 0): {(5, 0): -1.0},(0, -1): {(6, 0): -1},(-1, 1): {(5, 1): -1.4142135623730951},(1, -1): {(6, 0): -1},(1, 1): {(6, 0): -1},(-1, -1): {(6, 0): -1}},(6, 1): {(1, 0): {(6, 1): -1},(0, 1): {(6, 2): -1.0},(-1, 0): {(5, 1): -1.0},(0, -1): {(6, 0): -1.0},(-1, 1): {(5, 2): -1.4142135623730951},(1, -1): {(6, 1): -1},(1, 1): {(6, 1): -1},(-1, -1): {(5, 0): -1.4142135623730951}},(6, 2): {(1, 0): {(6, 2): -1},(0, 1): {(6, 3): -1.0},(-1, 0): {(5, 2): -1.0},(0, -1): {(6, 1): -1.0},(-1, 1): {(5, 3): -1.4142135623730951},(1, -1): {(6, 2): -1},(1, 1): {(6, 2): -1},(-1, -1): {(5, 1): -1.4142135623730951}},(6, 3): {(1, 0): {(6, 3): -1},(0, 1): {(6, 4): -1.0},(-1, 0): {(5, 3): -1.0},(0, -1): {(6, 2): -1.0},(-1, 1): {(5, 4): -1.4142135623730951},(1, -1): {(6, 3): -1},(1, 1): {(6, 3): -1},(-1, -1): {(5, 2): -1.4142135623730951}},(6, 4): {(1, 0): {(6, 4): -1},(0, 1): {(6, 5): -1.0},(-1, 0): {(5, 4): -1.0},(0, -1): {(6, 3): -1.0},(-1, 1): {(5, 5): -1.4142135623730951},(1, -1): {(6, 4): -1},(1, 1): {(6, 4): -1},(-1, -1): {(5, 3): -1.4142135623730951}},(6, 5): {(1, 0): {(6, 5): -1},(0, 1): {(6, 5): -1},(-1, 0): {(5, 5): -1.0},(0, -1): {(6, 4): -1.0},(-1, 1): {(6, 5): -1},(1, -1): {(6, 5): -1},(1, 1): {(6, 5): -1},(-1, -1): {(5, 4): -1.4142135623730951}}}
    
    #Environment 2: Barrier with a Gap
    rewardAGap = {(0, 0): {(1, 0): {(1, 0): -1.0},(0, 1): {(0, 1): -1.0},(-1, 0): {(0, 0): -1},(0, -1): {(0, 0): -1},(-1, 1): {(0, 0): -1},(1, -1): {(0, 0): -1},(1, 1): {(1, 1): -1.4142135623730951},(-1, -1): {(0, 0): -1}},(0, 1): {(1, 0): {(1, 1): -1.0},(0, 1): {(0, 2): -1.0},(-1, 0): {(0, 1): -1},(0, -1): {(0, 0): -1.0},(-1, 1): {(0, 1): -1},(1, -1): {(1, 0): -1.4142135623730951},(1, 1): {(1, 2): -1.4142135623730951},(-1, -1): {(0, 1): -1}},(0, 2): {(1, 0): {(1, 2): -1.0},(0, 1): {(0, 3): -1.0},(-1, 0): {(0, 2): -1},(0, -1): {(0, 1): -1.0},(-1, 1): {(0, 2): -1},(1, -1): {(1, 1): -1.4142135623730951},(1, 1): {(1, 3): -1.4142135623730951},(-1, -1): {(0, 2): -1}},(0, 3): {(1, 0): {(1, 3): -1.0},(0, 1): {(0, 4): -1.0},(-1, 0): {(0, 3): -1},(0, -1): {(0, 2): -1.0},(-1, 1): {(0, 3): -1},(1, -1): {(1, 2): -1.4142135623730951},(1, 1): {(1, 4): -1.4142135623730951},(-1, -1): {(0, 3): -1}},(0, 4): {(1, 0): {(1, 4): -1.0},(0, 1): {(0, 5): -1.0},(-1, 0): {(0, 4): -1},(0, -1): {(0, 3): -1.0},(-1, 1): {(0, 4): -1},(1, -1): {(1, 3): -1.4142135623730951},(1, 1): {(1, 5): -1.4142135623730951},(-1, -1): {(0, 4): -1}},(0, 5): {(1, 0): {(1, 5): -1.0},(0, 1): {(0, 5): -1},(-1, 0): {(0, 5): -1},(0, -1): {(0, 4): -1.0},(-1, 1): {(0, 5): -1},(1, -1): {(1, 4): -1.4142135623730951},(1, 1): {(0, 5): -1},(-1, -1): {(0, 5): -1}},(1, 0): {(1, 0): {(2, 0): -1.0},(0, 1): {(1, 1): -1.0},(-1, 0): {(0, 0): -1.0},(0, -1): {(1, 0): -1},(-1, 1): {(0, 1): -1.4142135623730951},(1, -1): {(1, 0): -1},(1, 1): {(2, 1): -1.4142135623730951},(-1, -1): {(1, 0): -1}},(1, 1): {(1, 0): {(2, 1): -1.0},(0, 1): {(1, 2): -1.0},(-1, 0): {(0, 1): -1.0},(0, -1): {(1, 0): -1.0},(-1, 1): {(0, 2): -1.4142135623730951},(1, -1): {(2, 0): -1.4142135623730951},(1, 1): {(2, 2): -1.4142135623730951},(-1, -1): {(0, 0): -1.4142135623730951}},(1, 2): {(1, 0): {(2, 2): -1.0},(0, 1): {(1, 3): -1.0},(-1, 0): {(0, 2): -1.0},(0, -1): {(1, 1): -1.0},(-1, 1): {(0, 3): -1.4142135623730951},(1, -1): {(2, 1): -1.4142135623730951},(1, 1): {(2, 3): -1.4142135623730951},(-1, -1): {(0, 1): -1.4142135623730951}},(1, 3): {(1, 0): {(2, 3): -1.0},(0, 1): {(1, 4): -1.0},(-1, 0): {(0, 3): -1.0},(0, -1): {(1, 2): -1.0},(-1, 1): {(0, 4): -1.4142135623730951},(1, -1): {(2, 2): -1.4142135623730951},(1, 1): {(2, 4): -1.4142135623730951},(-1, -1): {(0, 2): -1.4142135623730951}},(1, 4): {(1, 0): {(2, 4): -1.0},(0, 1): {(1, 5): -1.0},(-1, 0): {(0, 4): -1.0},(0, -1): {(1, 3): -1.0},(-1, 1): {(0, 5): -1.4142135623730951},(1, -1): {(2, 3): -1.4142135623730951},(1, 1): {(2, 5): -1.4142135623730951},(-1, -1): {(0, 3): -1.4142135623730951}},(1, 5): {(1, 0): {(2, 5): -1.0},(0, 1): {(1, 5): -1},(-1, 0): {(0, 5): -1.0},(0, -1): {(1, 4): -1.0},(-1, 1): {(1, 5): -1},(1, -1): {(2, 4): -1.4142135623730951},(1, 1): {(1, 5): -1},(-1, -1): {(0, 4): -1.4142135623730951}},(2, 0): {(1, 0): {(3, 0): -1.0},(0, 1): {(2, 1): -1.0},(-1, 0): {(1, 0): -1.0},(0, -1): {(2, 0): -1},(-1, 1): {(1, 1): -1.4142135623730951},(1, -1): {(2, 0): -1},(1, 1): {(3, 1): -1.4142135623730951},(-1, -1): {(2, 0): -1}},(2, 1): {(1, 0): {(3, 1): -1.0},(0, 1): {(2, 2): -1.0},(-1, 0): {(1, 1): -1.0},(0, -1): {(2, 0): -1.0},(-1, 1): {(1, 2): -1.4142135623730951},(1, -1): {(3, 0): -1.4142135623730951},(1, 1): {(3, 2): -1.4142135623730951},(-1, -1): {(1, 0): -1.4142135623730951}},(2, 2): {(1, 0): {(3, 2): -1.0},(0, 1): {(2, 3): -1.0},(-1, 0): {(1, 2): -1.0},(0, -1): {(2, 1): -1.0},(-1, 1): {(1, 3): -1.4142135623730951},(1, -1): {(3, 1): -1.4142135623730951},(1, 1): {(3, 3): -1.4142135623730951},(-1, -1): {(1, 1): -1.4142135623730951}},(2, 3): {(1, 0): {(3, 3): -1.0},(0, 1): {(2, 4): -1.0},(-1, 0): {(1, 3): -1.0},(0, -1): {(2, 2): -1.0},(-1, 1): {(1, 4): -1.4142135623730951},(1, -1): {(3, 2): -1.4142135623730951},(1, 1): {(3, 4): -1.4142135623730951},(-1, -1): {(1, 2): -1.4142135623730951}},(2, 4): {(1, 0): {(3, 4): -1.0},(0, 1): {(2, 5): -1.0},(-1, 0): {(1, 4): -1.0},(0, -1): {(2, 3): -1.0},(-1, 1): {(1, 5): -1.4142135623730951},(1, -1): {(3, 3): -1.4142135623730951},(1, 1): {(3, 5): -1.4142135623730951},(-1, -1): {(1, 3): -1.4142135623730951}},(2, 5): {(1, 0): {(3, 5): -1.0},(0, 1): {(2, 5): -1},(-1, 0): {(1, 5): -1.0},(0, -1): {(2, 4): -1.0},(-1, 1): {(2, 5): -1},(1, -1): {(3, 4): -1.4142135623730951},(1, 1): {(2, 5): -1},(-1, -1): {(1, 4): -1.4142135623730951}},(3, 0): {(1, 0): {(4, 0): -100},(0, 1): {(3, 1): -100},(-1, 0): {(2, 0): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 1): -100},(1, -1): {(3, 0): -100},(1, 1): {(4, 1): -100},(-1, -1): {(3, 0): -100}},(3, 1): {(1, 0): {(4, 1): -1.0},(0, 1): {(3, 2): -1.0},(-1, 0): {(2, 1): -1.0},(0, -1): {(3, 0): -1.0},(-1, 1): {(2, 2): -1.4142135623730951},(1, -1): {(4, 0): -1.4142135623730951},(1, 1): {(4, 2): -1.4142135623730951},(-1, -1): {(2, 0): -1.4142135623730951}},(3, 2): {(1, 0): {(4, 2): -100},(0, 1): {(3, 3): -100},(-1, 0): {(2, 2): -100},(0, -1): {(3, 1): -100},(-1, 1): {(2, 3): -100},(1, -1): {(4, 1): -100},(1, 1): {(4, 3): -100},(-1, -1): {(2, 1): -100}},(3, 3): {(1, 0): {(4, 3): -100},(0, 1): {(3, 4): -100},(-1, 0): {(2, 3): -100},(0, -1): {(3, 2): -100},(-1, 1): {(2, 4): -100},(1, -1): {(4, 2): -100},(1, 1): {(4, 4): -100},(-1, -1): {(2, 2): -100}},(3, 4): {(1, 0): {(4, 4): -1.0},(0, 1): {(3, 5): -1.0},(-1, 0): {(2, 4): -1.0},(0, -1): {(3, 3): -1.0},(-1, 1): {(2, 5): -1.4142135623730951},(1, -1): {(4, 3): -1.4142135623730951},(1, 1): {(4, 5): -1.4142135623730951},(-1, -1): {(2, 3): -1.4142135623730951}},(3, 5): {(1, 0): {(4, 5): -1.0},(0, 1): {(3, 5): -1},(-1, 0): {(2, 5): -1.0},(0, -1): {(3, 4): -1.0},(-1, 1): {(3, 5): -1},(1, -1): {(4, 4): -1.4142135623730951},(1, 1): {(3, 5): -1},(-1, -1): {(2, 4): -1.4142135623730951}},(4, 0): {(1, 0): {(5, 0): -1.0},(0, 1): {(4, 1): -1.0},(-1, 0): {(3, 0): -1.0},(0, -1): {(4, 0): -1},(-1, 1): {(3, 1): -1.4142135623730951},(1, -1): {(4, 0): -1},(1, 1): {(5, 1): -1.4142135623730951},(-1, -1): {(4, 0): -1}},(4, 1): {(1, 0): {(5, 1): -1.0},(0, 1): {(4, 2): -1.0},(-1, 0): {(3, 1): -1.0},(0, -1): {(4, 0): -1.0},(-1, 1): {(3, 2): -1.4142135623730951},(1, -1): {(5, 0): -1.4142135623730951},(1, 1): {(5, 2): -1.4142135623730951},(-1, -1): {(3, 0): -1.4142135623730951}},(4, 2): {(1, 0): {(5, 2): -1.0},(0, 1): {(4, 3): -1.0},(-1, 0): {(3, 2): -1.0},(0, -1): {(4, 1): -1.0},(-1, 1): {(3, 3): -1.4142135623730951},(1, -1): {(5, 1): -1.4142135623730951},(1, 1): {(5, 3): -1.4142135623730951},(-1, -1): {(3, 1): -1.4142135623730951}},(4, 3): {(1, 0): {(5, 3): -1.0},(0, 1): {(4, 4): -1.0},(-1, 0): {(3, 3): -1.0},(0, -1): {(4, 2): -1.0},(-1, 1): {(3, 4): -1.4142135623730951},(1, -1): {(5, 2): -1.4142135623730951},(1, 1): {(5, 4): -1.4142135623730951},(-1, -1): {(3, 2): -1.4142135623730951}},(4, 4): {(1, 0): {(5, 4): -1.0},(0, 1): {(4, 5): -1.0},(-1, 0): {(3, 4): -1.0},(0, -1): {(4, 3): -1.0},(-1, 1): {(3, 5): -1.4142135623730951},(1, -1): {(5, 3): -1.4142135623730951},(1, 1): {(5, 5): -1.4142135623730951},(-1, -1): {(3, 3): -1.4142135623730951}},(4, 5): {(1, 0): {(5, 5): -1.0},(0, 1): {(4, 5): -1},(-1, 0): {(3, 5): -1.0},(0, -1): {(4, 4): -1.0},(-1, 1): {(4, 5): -1},(1, -1): {(5, 4): -1.4142135623730951},(1, 1): {(4, 5): -1},(-1, -1): {(3, 4): -1.4142135623730951}},(5, 0): {(1, 0): {(6, 0): -1.0},(0, 1): {(5, 1): -1.0},(-1, 0): {(4, 0): -1.0},(0, -1): {(5, 0): -1},(-1, 1): {(4, 1): -1.4142135623730951},(1, -1): {(5, 0): -1},(1, 1): {(6, 1): -1.4142135623730951},(-1, -1): {(5, 0): -1}},(5, 1): {(1, 0): {(6, 1): -1.0},(0, 1): {(5, 2): -1.0},(-1, 0): {(4, 1): -1.0},(0, -1): {(5, 0): -1.0},(-1, 1): {(4, 2): -1.4142135623730951},(1, -1): {(6, 0): -1.4142135623730951},(1, 1): {(6, 2): -1.4142135623730951},(-1, -1): {(4, 0): -1.4142135623730951}},(5, 2): {(1, 0): {(6, 2): -1.0},(0, 1): {(5, 3): -1.0},(-1, 0): {(4, 2): -1.0},(0, -1): {(5, 1): -1.0},(-1, 1): {(4, 3): -1.4142135623730951},(1, -1): {(6, 1): -1.4142135623730951},(1, 1): {(6, 3): -1.4142135623730951},(-1, -1): {(4, 1): -1.4142135623730951}},(5, 3): {(1, 0): {(6, 3): -1.0},(0, 1): {(5, 4): -1.0},(-1, 0): {(4, 3): -1.0},(0, -1): {(5, 2): -1.0},(-1, 1): {(4, 4): -1.4142135623730951},(1, -1): {(6, 2): -1.4142135623730951},(1, 1): {(6, 4): -1.4142135623730951},(-1, -1): {(4, 2): -1.4142135623730951}},(5, 4): {(1, 0): {(6, 4): -1.0},(0, 1): {(5, 5): -1.0},(-1, 0): {(4, 4): -1.0},(0, -1): {(5, 3): -1.0},(-1, 1): {(4, 5): -1.4142135623730951},(1, -1): {(6, 3): -1.4142135623730951},(1, 1): {(6, 5): -1.4142135623730951},(-1, -1): {(4, 3): -1.4142135623730951}},(5, 5): {(1, 0): {(6, 5): -1.0},(0, 1): {(5, 5): -1},(-1, 0): {(4, 5): -1.0},(0, -1): {(5, 4): -1.0},(-1, 1): {(5, 5): -1},(1, -1): {(6, 4): -1.4142135623730951},(1, 1): {(5, 5): -1},(-1, -1): {(4, 4): -1.4142135623730951}},(6, 0): {(1, 0): {(6, 0): -1},(0, 1): {(6, 1): -1.0},(-1, 0): {(5, 0): -1.0},(0, -1): {(6, 0): -1},(-1, 1): {(5, 1): -1.4142135623730951},(1, -1): {(6, 0): -1},(1, 1): {(6, 0): -1},(-1, -1): {(6, 0): -1}},(6, 1): {(1, 0): {(6, 1): -1},(0, 1): {(6, 2): -1.0},(-1, 0): {(5, 1): -1.0},(0, -1): {(6, 0): -1.0},(-1, 1): {(5, 2): -1.4142135623730951},(1, -1): {(6, 1): -1},(1, 1): {(6, 1): -1},(-1, -1): {(5, 0): -1.4142135623730951}},(6, 2): {(1, 0): {(6, 2): -1},(0, 1): {(6, 3): -1.0},(-1, 0): {(5, 2): -1.0},(0, -1): {(6, 1): -1.0},(-1, 1): {(5, 3): -1.4142135623730951},(1, -1): {(6, 2): -1},(1, 1): {(6, 2): -1},(-1, -1): {(5, 1): -1.4142135623730951}},(6, 3): {(1, 0): {(6, 3): -1},(0, 1): {(6, 4): -1.0},(-1, 0): {(5, 3): -1.0},(0, -1): {(6, 2): -1.0},(-1, 1): {(5, 4): -1.4142135623730951},(1, -1): {(6, 3): -1},(1, 1): {(6, 3): -1},(-1, -1): {(5, 2): -1.4142135623730951}},(6, 4): {(1, 0): {(6, 4): -1},(0, 1): {(6, 5): 10},(-1, 0): {(5, 4): 10},(0, -1): {(6, 3): 10},(-1, 1): {(5, 5): 10},(1, -1): {(6, 4): -1},(1, 1): {(6, 4): -1},(-1, -1): {(5, 3): 10}},(6, 5): {(1, 0): {(6, 5): -1},(0, 1): {(6, 5): -1},(-1, 0): {(5, 5): -1.0},(0, -1): {(6, 4): -1.0},(-1, 1): {(6, 5): -1},(1, -1): {(6, 5): -1},(1, 1): {(6, 5): -1},(-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardBGap = {(0, 0): {(1, 0): {(1, 0): -1.0},(0, 1): {(0, 1): -1.0},(-1, 0): {(0, 0): -1},(0, -1): {(0, 0): -1},(-1, 1): {(0, 0): -1},(1, -1): {(0, 0): -1},(1, 1): {(1, 1): -1.4142135623730951},(-1, -1): {(0, 0): -1}},(0, 1): {(1, 0): {(1, 1): -1.0},(0, 1): {(0, 2): -1.0},(-1, 0): {(0, 1): -1},(0, -1): {(0, 0): -1.0},(-1, 1): {(0, 1): -1},(1, -1): {(1, 0): -1.4142135623730951},(1, 1): {(1, 2): -1.4142135623730951},(-1, -1): {(0, 1): -1}},(0, 2): {(1, 0): {(1, 2): -1.0},(0, 1): {(0, 3): -1.0},(-1, 0): {(0, 2): -1},(0, -1): {(0, 1): -1.0},(-1, 1): {(0, 2): -1},(1, -1): {(1, 1): -1.4142135623730951},(1, 1): {(1, 3): -1.4142135623730951},(-1, -1): {(0, 2): -1}},(0, 3): {(1, 0): {(1, 3): -1.0},(0, 1): {(0, 4): -1.0},(-1, 0): {(0, 3): -1},(0, -1): {(0, 2): -1.0},(-1, 1): {(0, 3): -1},(1, -1): {(1, 2): -1.4142135623730951},(1, 1): {(1, 4): -1.4142135623730951},(-1, -1): {(0, 3): -1}},(0, 4): {(1, 0): {(1, 4): -1.0},(0, 1): {(0, 5): -1.0},(-1, 0): {(0, 4): -1},(0, -1): {(0, 3): -1.0},(-1, 1): {(0, 4): -1},(1, -1): {(1, 3): -1.4142135623730951},(1, 1): {(1, 5): -1.4142135623730951},(-1, -1): {(0, 4): -1}},(0, 5): {(1, 0): {(1, 5): -1.0},(0, 1): {(0, 5): -1},(-1, 0): {(0, 5): -1},(0, -1): {(0, 4): -1.0},(-1, 1): {(0, 5): -1},(1, -1): {(1, 4): -1.4142135623730951},(1, 1): {(0, 5): -1},(-1, -1): {(0, 5): -1}},(1, 0): {(1, 0): {(2, 0): -1.0},(0, 1): {(1, 1): -1.0},(-1, 0): {(0, 0): -1.0},(0, -1): {(1, 0): -1},(-1, 1): {(0, 1): -1.4142135623730951},(1, -1): {(1, 0): -1},(1, 1): {(2, 1): -1.4142135623730951},(-1, -1): {(1, 0): -1}},(1, 1): {(1, 0): {(2, 1): -1.0},(0, 1): {(1, 2): -1.0},(-1, 0): {(0, 1): -1.0},(0, -1): {(1, 0): -1.0},(-1, 1): {(0, 2): -1.4142135623730951},(1, -1): {(2, 0): -1.4142135623730951},(1, 1): {(2, 2): -1.4142135623730951},(-1, -1): {(0, 0): -1.4142135623730951}},(1, 2): {(1, 0): {(2, 2): -1.0},(0, 1): {(1, 3): -1.0},(-1, 0): {(0, 2): -1.0},(0, -1): {(1, 1): -1.0},(-1, 1): {(0, 3): -1.4142135623730951},(1, -1): {(2, 1): -1.4142135623730951},(1, 1): {(2, 3): -1.4142135623730951},(-1, -1): {(0, 1): -1.4142135623730951}},(1, 3): {(1, 0): {(2, 3): -1.0},(0, 1): {(1, 4): -1.0},(-1, 0): {(0, 3): -1.0},(0, -1): {(1, 2): -1.0},(-1, 1): {(0, 4): -1.4142135623730951},(1, -1): {(2, 2): -1.4142135623730951},(1, 1): {(2, 4): -1.4142135623730951},(-1, -1): {(0, 2): -1.4142135623730951}},(1, 4): {(1, 0): {(2, 4): -1.0},(0, 1): {(1, 5): -1.0},(-1, 0): {(0, 4): -1.0},(0, -1): {(1, 3): -1.0},(-1, 1): {(0, 5): -1.4142135623730951},(1, -1): {(2, 3): -1.4142135623730951},(1, 1): {(2, 5): -1.4142135623730951},(-1, -1): {(0, 3): -1.4142135623730951}},(1, 5): {(1, 0): {(2, 5): -1.0},(0, 1): {(1, 5): -1},(-1, 0): {(0, 5): -1.0},(0, -1): {(1, 4): -1.0},(-1, 1): {(1, 5): -1},(1, -1): {(2, 4): -1.4142135623730951},(1, 1): {(1, 5): -1},(-1, -1): {(0, 4): -1.4142135623730951}},(2, 0): {(1, 0): {(3, 0): -1.0},(0, 1): {(2, 1): -1.0},(-1, 0): {(1, 0): -1.0},(0, -1): {(2, 0): -1},(-1, 1): {(1, 1): -1.4142135623730951},(1, -1): {(2, 0): -1},(1, 1): {(3, 1): -1.4142135623730951},(-1, -1): {(2, 0): -1}},(2, 1): {(1, 0): {(3, 1): -1.0},(0, 1): {(2, 2): -1.0},(-1, 0): {(1, 1): -1.0},(0, -1): {(2, 0): -1.0},(-1, 1): {(1, 2): -1.4142135623730951},(1, -1): {(3, 0): -1.4142135623730951},(1, 1): {(3, 2): -1.4142135623730951},(-1, -1): {(1, 0): -1.4142135623730951}},(2, 2): {(1, 0): {(3, 2): -1.0},(0, 1): {(2, 3): -1.0},(-1, 0): {(1, 2): -1.0},(0, -1): {(2, 1): -1.0},(-1, 1): {(1, 3): -1.4142135623730951},(1, -1): {(3, 1): -1.4142135623730951},(1, 1): {(3, 3): -1.4142135623730951},(-1, -1): {(1, 1): -1.4142135623730951}},(2, 3): {(1, 0): {(3, 3): -1.0},(0, 1): {(2, 4): -1.0},(-1, 0): {(1, 3): -1.0},(0, -1): {(2, 2): -1.0},(-1, 1): {(1, 4): -1.4142135623730951},(1, -1): {(3, 2): -1.4142135623730951},(1, 1): {(3, 4): -1.4142135623730951},(-1, -1): {(1, 2): -1.4142135623730951}},(2, 4): {(1, 0): {(3, 4): -1.0},(0, 1): {(2, 5): -1.0},(-1, 0): {(1, 4): -1.0},(0, -1): {(2, 3): -1.0},(-1, 1): {(1, 5): -1.4142135623730951},(1, -1): {(3, 3): -1.4142135623730951},(1, 1): {(3, 5): -1.4142135623730951},(-1, -1): {(1, 3): -1.4142135623730951}},(2, 5): {(1, 0): {(3, 5): -1.0},(0, 1): {(2, 5): -1},(-1, 0): {(1, 5): -1.0},(0, -1): {(2, 4): -1.0},(-1, 1): {(2, 5): -1},(1, -1): {(3, 4): -1.4142135623730951},(1, 1): {(2, 5): -1},(-1, -1): {(1, 4): -1.4142135623730951}},(3, 0): {(1, 0): {(4, 0): -100},(0, 1): {(3, 1): -100},(-1, 0): {(2, 0): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 1): -100},(1, -1): {(3, 0): -100},(1, 1): {(4, 1): -100},(-1, -1): {(3, 0): -100}},(3, 1): {(1, 0): {(4, 1): -1.0},(0, 1): {(3, 2): -1.0},(-1, 0): {(2, 1): -1.0},(0, -1): {(3, 0): -1.0},(-1, 1): {(2, 2): -1.4142135623730951},(1, -1): {(4, 0): -1.4142135623730951},(1, 1): {(4, 2): -1.4142135623730951},(-1, -1): {(2, 0): -1.4142135623730951}},(3, 2): {(1, 0): {(4, 2): -100},(0, 1): {(3, 3): -100},(-1, 0): {(2, 2): -100},(0, -1): {(3, 1): -100},(-1, 1): {(2, 3): -100},(1, -1): {(4, 1): -100},(1, 1): {(4, 3): -100},(-1, -1): {(2, 1): -100}},(3, 3): {(1, 0): {(4, 3): -100},(0, 1): {(3, 4): -100},(-1, 0): {(2, 3): -100},(0, -1): {(3, 2): -100},(-1, 1): {(2, 4): -100},(1, -1): {(4, 2): -100},(1, 1): {(4, 4): -100},(-1, -1): {(2, 2): -100}},(3, 4): {(1, 0): {(4, 4): -1.0},(0, 1): {(3, 5): -1.0},(-1, 0): {(2, 4): -1.0},(0, -1): {(3, 3): -1.0},(-1, 1): {(2, 5): -1.4142135623730951},(1, -1): {(4, 3): -1.4142135623730951},(1, 1): {(4, 5): -1.4142135623730951},(-1, -1): {(2, 3): -1.4142135623730951}},(3, 5): {(1, 0): {(4, 5): -1.0},(0, 1): {(3, 5): -1},(-1, 0): {(2, 5): -1.0},(0, -1): {(3, 4): -1.0},(-1, 1): {(3, 5): -1},(1, -1): {(4, 4): -1.4142135623730951},(1, 1): {(3, 5): -1},(-1, -1): {(2, 4): -1.4142135623730951}},(4, 0): {(1, 0): {(5, 0): -1.0},(0, 1): {(4, 1): -1.0},(-1, 0): {(3, 0): -1.0},(0, -1): {(4, 0): -1},(-1, 1): {(3, 1): -1.4142135623730951},(1, -1): {(4, 0): -1},(1, 1): {(5, 1): -1.4142135623730951},(-1, -1): {(4, 0): -1}},(4, 1): {(1, 0): {(5, 1): -1.0},(0, 1): {(4, 2): -1.0},(-1, 0): {(3, 1): -1.0},(0, -1): {(4, 0): -1.0},(-1, 1): {(3, 2): -1.4142135623730951},(1, -1): {(5, 0): -1.4142135623730951},(1, 1): {(5, 2): -1.4142135623730951},(-1, -1): {(3, 0): -1.4142135623730951}},(4, 2): {(1, 0): {(5, 2): -1.0},(0, 1): {(4, 3): -1.0},(-1, 0): {(3, 2): -1.0},(0, -1): {(4, 1): -1.0},(-1, 1): {(3, 3): -1.4142135623730951},(1, -1): {(5, 1): -1.4142135623730951},(1, 1): {(5, 3): -1.4142135623730951},(-1, -1): {(3, 1): -1.4142135623730951}},(4, 3): {(1, 0): {(5, 3): -1.0},(0, 1): {(4, 4): -1.0},(-1, 0): {(3, 3): -1.0},(0, -1): {(4, 2): -1.0},(-1, 1): {(3, 4): -1.4142135623730951},(1, -1): {(5, 2): -1.4142135623730951},(1, 1): {(5, 4): -1.4142135623730951},(-1, -1): {(3, 2): -1.4142135623730951}},(4, 4): {(1, 0): {(5, 4): -1.0},(0, 1): {(4, 5): -1.0},(-1, 0): {(3, 4): -1.0},(0, -1): {(4, 3): -1.0},(-1, 1): {(3, 5): -1.4142135623730951},(1, -1): {(5, 3): -1.4142135623730951},(1, 1): {(5, 5): -1.4142135623730951},(-1, -1): {(3, 3): -1.4142135623730951}},(4, 5): {(1, 0): {(5, 5): -1.0},(0, 1): {(4, 5): -1},(-1, 0): {(3, 5): -1.0},(0, -1): {(4, 4): -1.0},(-1, 1): {(4, 5): -1},(1, -1): {(5, 4): -1.4142135623730951},(1, 1): {(4, 5): -1},(-1, -1): {(3, 4): -1.4142135623730951}},(5, 0): {(1, 0): {(6, 0): -1.0},(0, 1): {(5, 1): -1.0},(-1, 0): {(4, 0): -1.0},(0, -1): {(5, 0): -1},(-1, 1): {(4, 1): -1.4142135623730951},(1, -1): {(5, 0): -1},(1, 1): {(6, 1): -1.4142135623730951},(-1, -1): {(5, 0): -1}},(5, 1): {(1, 0): {(6, 1): -1.0},(0, 1): {(5, 2): -1.0},(-1, 0): {(4, 1): -1.0},(0, -1): {(5, 0): -1.0},(-1, 1): {(4, 2): -1.4142135623730951},(1, -1): {(6, 0): -1.4142135623730951},(1, 1): {(6, 2): -1.4142135623730951},(-1, -1): {(4, 0): -1.4142135623730951}},(5, 2): {(1, 0): {(6, 2): -1.0},(0, 1): {(5, 3): -1.0},(-1, 0): {(4, 2): -1.0},(0, -1): {(5, 1): -1.0},(-1, 1): {(4, 3): -1.4142135623730951},(1, -1): {(6, 1): -1.4142135623730951},(1, 1): {(6, 3): -1.4142135623730951},(-1, -1): {(4, 1): -1.4142135623730951}},(5, 3): {(1, 0): {(6, 3): -1.0},(0, 1): {(5, 4): -1.0},(-1, 0): {(4, 3): -1.0},(0, -1): {(5, 2): -1.0},(-1, 1): {(4, 4): -1.4142135623730951},(1, -1): {(6, 2): -1.4142135623730951},(1, 1): {(6, 4): -1.4142135623730951},(-1, -1): {(4, 2): -1.4142135623730951}},(5, 4): {(1, 0): {(6, 4): -1.0},(0, 1): {(5, 5): -1.0},(-1, 0): {(4, 4): -1.0},(0, -1): {(5, 3): -1.0},(-1, 1): {(4, 5): -1.4142135623730951},(1, -1): {(6, 3): -1.4142135623730951},(1, 1): {(6, 5): -1.4142135623730951},(-1, -1): {(4, 3): -1.4142135623730951}},(5, 5): {(1, 0): {(6, 5): -1.0},(0, 1): {(5, 5): -1},(-1, 0): {(4, 5): -1.0},(0, -1): {(5, 4): -1.0},(-1, 1): {(5, 5): -1},(1, -1): {(6, 4): -1.4142135623730951},(1, 1): {(5, 5): -1},(-1, -1): {(4, 4): -1.4142135623730951}},(6, 0): {(1, 0): {(6, 0): -1},(0, 1): {(6, 1): -1.0},(-1, 0): {(5, 0): -1.0},(0, -1): {(6, 0): -1},(-1, 1): {(5, 1): -1.4142135623730951},(1, -1): {(6, 0): -1},(1, 1): {(6, 0): -1},(-1, -1): {(6, 0): -1}},(6, 1): {(1, 0): {(6, 1): -1},(0, 1): {(6, 2): 10},(-1, 0): {(5, 1): 10},(0, -1): {(6, 0): 10},(-1, 1): {(5, 2): 10},(1, -1): {(6, 1): -1},(1, 1): {(6, 1): -1},(-1, -1): {(5, 0): 10}},(6, 2): {(1, 0): {(6, 2): -1},(0, 1): {(6, 3): -1.0},(-1, 0): {(5, 2): -1.0},(0, -1): {(6, 1): -1.0},(-1, 1): {(5, 3): -1.4142135623730951},(1, -1): {(6, 2): -1},(1, 1): {(6, 2): -1},(-1, -1): {(5, 1): -1.4142135623730951}},(6, 3): {(1, 0): {(6, 3): -1},(0, 1): {(6, 4): -1.0},(-1, 0): {(5, 3): -1.0},(0, -1): {(6, 2): -1.0},(-1, 1): {(5, 4): -1.4142135623730951},(1, -1): {(6, 3): -1},(1, 1): {(6, 3): -1},(-1, -1): {(5, 2): -1.4142135623730951}},(6, 4): {(1, 0): {(6, 4): -1},(0, 1): {(6, 5): -1.0},(-1, 0): {(5, 4): -1.0},(0, -1): {(6, 3): -1.0},(-1, 1): {(5, 5): -1.4142135623730951},(1, -1): {(6, 4): -1},(1, 1): {(6, 4): -1},(-1, -1): {(5, 3): -1.4142135623730951}},(6, 5): {(1, 0): {(6, 5): -1},(0, 1): {(6, 5): -1},(-1, 0): {(5, 5): -1.0},(0, -1): {(6, 4): -1.0},(-1, 1): {(6, 5): -1},(1, -1): {(6, 5): -1},(1, 1): {(6, 5): -1},(-1, -1): {(5, 4): -1.4142135623730951}}}
    rewardCGap = {(0, 0): {(1, 0): {(1, 0): -1.0},(0, 1): {(0, 1): -1.0},(-1, 0): {(0, 0): -1},(0, -1): {(0, 0): -1},(-1, 1): {(0, 0): -1},(1, -1): {(0, 0): -1},(1, 1): {(1, 1): -1.4142135623730951},(-1, -1): {(0, 0): -1}},(0, 1): {(1, 0): {(1, 1): -1.0},(0, 1): {(0, 2): -1.0},(-1, 0): {(0, 1): -1},(0, -1): {(0, 0): -1.0},(-1, 1): {(0, 1): -1},(1, -1): {(1, 0): -1.4142135623730951},(1, 1): {(1, 2): -1.4142135623730951},(-1, -1): {(0, 1): -1}},(0, 2): {(1, 0): {(1, 2): -1.0},(0, 1): {(0, 3): -1.0},(-1, 0): {(0, 2): -1},(0, -1): {(0, 1): -1.0},(-1, 1): {(0, 2): -1},(1, -1): {(1, 1): -1.4142135623730951},(1, 1): {(1, 3): -1.4142135623730951},(-1, -1): {(0, 2): -1}},(0, 3): {(1, 0): {(1, 3): -1.0},(0, 1): {(0, 4): -1.0},(-1, 0): {(0, 3): -1},(0, -1): {(0, 2): -1.0},(-1, 1): {(0, 3): -1},(1, -1): {(1, 2): -1.4142135623730951},(1, 1): {(1, 4): -1.4142135623730951},(-1, -1): {(0, 3): -1}},(0, 4): {(1, 0): {(1, 4): -1.0},(0, 1): {(0, 5): -1.0},(-1, 0): {(0, 4): -1},(0, -1): {(0, 3): -1.0},(-1, 1): {(0, 4): -1},(1, -1): {(1, 3): -1.4142135623730951},(1, 1): {(1, 5): -1.4142135623730951},(-1, -1): {(0, 4): -1}},(0, 5): {(1, 0): {(1, 5): -1.0},(0, 1): {(0, 5): -1},(-1, 0): {(0, 5): -1},(0, -1): {(0, 4): -1.0},(-1, 1): {(0, 5): -1},(1, -1): {(1, 4): -1.4142135623730951},(1, 1): {(0, 5): -1},(-1, -1): {(0, 5): -1}},(1, 0): {(1, 0): {(2, 0): -1.0},(0, 1): {(1, 1): -1.0},(-1, 0): {(0, 0): -1.0},(0, -1): {(1, 0): -1},(-1, 1): {(0, 1): -1.4142135623730951},(1, -1): {(1, 0): -1},(1, 1): {(2, 1): -1.4142135623730951},(-1, -1): {(1, 0): -1}},(1, 1): {(1, 0): {(2, 1): -1.0},(0, 1): {(1, 2): -1.0},(-1, 0): {(0, 1): -1.0},(0, -1): {(1, 0): -1.0},(-1, 1): {(0, 2): -1.4142135623730951},(1, -1): {(2, 0): -1.4142135623730951},(1, 1): {(2, 2): -1.4142135623730951},(-1, -1): {(0, 0): -1.4142135623730951}},(1, 2): {(1, 0): {(2, 2): -1.0},(0, 1): {(1, 3): -1.0},(-1, 0): {(0, 2): -1.0},(0, -1): {(1, 1): -1.0},(-1, 1): {(0, 3): -1.4142135623730951},(1, -1): {(2, 1): -1.4142135623730951},(1, 1): {(2, 3): -1.4142135623730951},(-1, -1): {(0, 1): -1.4142135623730951}},(1, 3): {(1, 0): {(2, 3): -1.0},(0, 1): {(1, 4): -1.0},(-1, 0): {(0, 3): -1.0},(0, -1): {(1, 2): -1.0},(-1, 1): {(0, 4): -1.4142135623730951},(1, -1): {(2, 2): -1.4142135623730951},(1, 1): {(2, 4): -1.4142135623730951},(-1, -1): {(0, 2): -1.4142135623730951}},(1, 4): {(1, 0): {(2, 4): -1.0},(0, 1): {(1, 5): -1.0},(-1, 0): {(0, 4): -1.0},(0, -1): {(1, 3): -1.0},(-1, 1): {(0, 5): -1.4142135623730951},(1, -1): {(2, 3): -1.4142135623730951},(1, 1): {(2, 5): -1.4142135623730951},(-1, -1): {(0, 3): -1.4142135623730951}},(1, 5): {(1, 0): {(2, 5): 10},(0, 1): {(1, 5): -1},(-1, 0): {(0, 5): 10},(0, -1): {(1, 4): 10},(-1, 1): {(1, 5): -1},(1, -1): {(2, 4): 10},(1, 1): {(1, 5): -1},(-1, -1): {(0, 4): 10}},(2, 0): {(1, 0): {(3, 0): -1.0},(0, 1): {(2, 1): -1.0},(-1, 0): {(1, 0): -1.0},(0, -1): {(2, 0): -1},(-1, 1): {(1, 1): -1.4142135623730951},(1, -1): {(2, 0): -1},(1, 1): {(3, 1): -1.4142135623730951},(-1, -1): {(2, 0): -1}},(2, 1): {(1, 0): {(3, 1): -1.0},(0, 1): {(2, 2): -1.0},(-1, 0): {(1, 1): -1.0},(0, -1): {(2, 0): -1.0},(-1, 1): {(1, 2): -1.4142135623730951},(1, -1): {(3, 0): -1.4142135623730951},(1, 1): {(3, 2): -1.4142135623730951},(-1, -1): {(1, 0): -1.4142135623730951}},(2, 2): {(1, 0): {(3, 2): -1.0},(0, 1): {(2, 3): -1.0},(-1, 0): {(1, 2): -1.0},(0, -1): {(2, 1): -1.0},(-1, 1): {(1, 3): -1.4142135623730951},(1, -1): {(3, 1): -1.4142135623730951},(1, 1): {(3, 3): -1.4142135623730951},(-1, -1): {(1, 1): -1.4142135623730951}},(2, 3): {(1, 0): {(3, 3): -1.0},(0, 1): {(2, 4): -1.0},(-1, 0): {(1, 3): -1.0},(0, -1): {(2, 2): -1.0},(-1, 1): {(1, 4): -1.4142135623730951},(1, -1): {(3, 2): -1.4142135623730951},(1, 1): {(3, 4): -1.4142135623730951},(-1, -1): {(1, 2): -1.4142135623730951}},(2, 4): {(1, 0): {(3, 4): -1.0},(0, 1): {(2, 5): -1.0},(-1, 0): {(1, 4): -1.0},(0, -1): {(2, 3): -1.0},(-1, 1): {(1, 5): -1.4142135623730951},(1, -1): {(3, 3): -1.4142135623730951},(1, 1): {(3, 5): -1.4142135623730951},(-1, -1): {(1, 3): -1.4142135623730951}},(2, 5): {(1, 0): {(3, 5): -1.0},(0, 1): {(2, 5): -1},(-1, 0): {(1, 5): -1.0},(0, -1): {(2, 4): -1.0},(-1, 1): {(2, 5): -1},(1, -1): {(3, 4): -1.4142135623730951},(1, 1): {(2, 5): -1},(-1, -1): {(1, 4): -1.4142135623730951}},(3, 0): {(1, 0): {(4, 0): -100},(0, 1): {(3, 1): -100},(-1, 0): {(2, 0): -100},(0, -1): {(3, 0): -100},(-1, 1): {(2, 1): -100},(1, -1): {(3, 0): -100},(1, 1): {(4, 1): -100},(-1, -1): {(3, 0): -100}},(3, 1): {(1, 0): {(4, 1): -1.0},(0, 1): {(3, 2): -1.0},(-1, 0): {(2, 1): -1.0},(0, -1): {(3, 0): -1.0},(-1, 1): {(2, 2): -1.4142135623730951},(1, -1): {(4, 0): -1.4142135623730951},(1, 1): {(4, 2): -1.4142135623730951},(-1, -1): {(2, 0): -1.4142135623730951}},(3, 2): {(1, 0): {(4, 2): -100},(0, 1): {(3, 3): -100},(-1, 0): {(2, 2): -100},(0, -1): {(3, 1): -100},(-1, 1): {(2, 3): -100},(1, -1): {(4, 1): -100},(1, 1): {(4, 3): -100},(-1, -1): {(2, 1): -100}},(3, 3): {(1, 0): {(4, 3): -100},(0, 1): {(3, 4): -100},(-1, 0): {(2, 3): -100},(0, -1): {(3, 2): -100},(-1, 1): {(2, 4): -100},(1, -1): {(4, 2): -100},(1, 1): {(4, 4): -100},(-1, -1): {(2, 2): -100}},(3, 4): {(1, 0): {(4, 4): -1.0},(0, 1): {(3, 5): -1.0},(-1, 0): {(2, 4): -1.0},(0, -1): {(3, 3): -1.0},(-1, 1): {(2, 5): -1.4142135623730951},(1, -1): {(4, 3): -1.4142135623730951},(1, 1): {(4, 5): -1.4142135623730951},(-1, -1): {(2, 3): -1.4142135623730951}},(3, 5): {(1, 0): {(4, 5): -1.0},(0, 1): {(3, 5): -1},(-1, 0): {(2, 5): -1.0},(0, -1): {(3, 4): -1.0},(-1, 1): {(3, 5): -1},(1, -1): {(4, 4): -1.4142135623730951},(1, 1): {(3, 5): -1},(-1, -1): {(2, 4): -1.4142135623730951}},(4, 0): {(1, 0): {(5, 0): -1.0},(0, 1): {(4, 1): -1.0},(-1, 0): {(3, 0): -1.0},(0, -1): {(4, 0): -1},(-1, 1): {(3, 1): -1.4142135623730951},(1, -1): {(4, 0): -1},(1, 1): {(5, 1): -1.4142135623730951},(-1, -1): {(4, 0): -1}},(4, 1): {(1, 0): {(5, 1): -1.0},(0, 1): {(4, 2): -1.0},(-1, 0): {(3, 1): -1.0},(0, -1): {(4, 0): -1.0},(-1, 1): {(3, 2): -1.4142135623730951},(1, -1): {(5, 0): -1.4142135623730951},(1, 1): {(5, 2): -1.4142135623730951},(-1, -1): {(3, 0): -1.4142135623730951}},(4, 2): {(1, 0): {(5, 2): -1.0},(0, 1): {(4, 3): -1.0},(-1, 0): {(3, 2): -1.0},(0, -1): {(4, 1): -1.0},(-1, 1): {(3, 3): -1.4142135623730951},(1, -1): {(5, 1): -1.4142135623730951},(1, 1): {(5, 3): -1.4142135623730951},(-1, -1): {(3, 1): -1.4142135623730951}},(4, 3): {(1, 0): {(5, 3): -1.0},(0, 1): {(4, 4): -1.0},(-1, 0): {(3, 3): -1.0},(0, -1): {(4, 2): -1.0},(-1, 1): {(3, 4): -1.4142135623730951},(1, -1): {(5, 2): -1.4142135623730951},(1, 1): {(5, 4): -1.4142135623730951},(-1, -1): {(3, 2): -1.4142135623730951}},(4, 4): {(1, 0): {(5, 4): -1.0},(0, 1): {(4, 5): -1.0},(-1, 0): {(3, 4): -1.0},(0, -1): {(4, 3): -1.0},(-1, 1): {(3, 5): -1.4142135623730951},(1, -1): {(5, 3): -1.4142135623730951},(1, 1): {(5, 5): -1.4142135623730951},(-1, -1): {(3, 3): -1.4142135623730951}},(4, 5): {(1, 0): {(5, 5): -1.0},(0, 1): {(4, 5): -1},(-1, 0): {(3, 5): -1.0},(0, -1): {(4, 4): -1.0},(-1, 1): {(4, 5): -1},(1, -1): {(5, 4): -1.4142135623730951},(1, 1): {(4, 5): -1},(-1, -1): {(3, 4): -1.4142135623730951}},(5, 0): {(1, 0): {(6, 0): -1.0},(0, 1): {(5, 1): -1.0},(-1, 0): {(4, 0): -1.0},(0, -1): {(5, 0): -1},(-1, 1): {(4, 1): -1.4142135623730951},(1, -1): {(5, 0): -1},(1, 1): {(6, 1): -1.4142135623730951},(-1, -1): {(5, 0): -1}},(5, 1): {(1, 0): {(6, 1): -1.0},(0, 1): {(5, 2): -1.0},(-1, 0): {(4, 1): -1.0},(0, -1): {(5, 0): -1.0},(-1, 1): {(4, 2): -1.4142135623730951},(1, -1): {(6, 0): -1.4142135623730951},(1, 1): {(6, 2): -1.4142135623730951},(-1, -1): {(4, 0): -1.4142135623730951}},(5, 2): {(1, 0): {(6, 2): -1.0},(0, 1): {(5, 3): -1.0},(-1, 0): {(4, 2): -1.0},(0, -1): {(5, 1): -1.0},(-1, 1): {(4, 3): -1.4142135623730951},(1, -1): {(6, 1): -1.4142135623730951},(1, 1): {(6, 3): -1.4142135623730951},(-1, -1): {(4, 1): -1.4142135623730951}},(5, 3): {(1, 0): {(6, 3): -1.0},(0, 1): {(5, 4): -1.0},(-1, 0): {(4, 3): -1.0},(0, -1): {(5, 2): -1.0},(-1, 1): {(4, 4): -1.4142135623730951},(1, -1): {(6, 2): -1.4142135623730951},(1, 1): {(6, 4): -1.4142135623730951},(-1, -1): {(4, 2): -1.4142135623730951}},(5, 4): {(1, 0): {(6, 4): -1.0},(0, 1): {(5, 5): -1.0},(-1, 0): {(4, 4): -1.0},(0, -1): {(5, 3): -1.0},(-1, 1): {(4, 5): -1.4142135623730951},(1, -1): {(6, 3): -1.4142135623730951},(1, 1): {(6, 5): -1.4142135623730951},(-1, -1): {(4, 3): -1.4142135623730951}},(5, 5): {(1, 0): {(6, 5): -1.0},(0, 1): {(5, 5): -1},(-1, 0): {(4, 5): -1.0},(0, -1): {(5, 4): -1.0},(-1, 1): {(5, 5): -1},(1, -1): {(6, 4): -1.4142135623730951},(1, 1): {(5, 5): -1},(-1, -1): {(4, 4): -1.4142135623730951}},(6, 0): {(1, 0): {(6, 0): -1},(0, 1): {(6, 1): -1.0},(-1, 0): {(5, 0): -1.0},(0, -1): {(6, 0): -1},(-1, 1): {(5, 1): -1.4142135623730951},(1, -1): {(6, 0): -1},(1, 1): {(6, 0): -1},(-1, -1): {(6, 0): -1}},(6, 1): {(1, 0): {(6, 1): -1},(0, 1): {(6, 2): -1.0},(-1, 0): {(5, 1): -1.0},(0, -1): {(6, 0): -1.0},(-1, 1): {(5, 2): -1.4142135623730951},(1, -1): {(6, 1): -1},(1, 1): {(6, 1): -1},(-1, -1): {(5, 0): -1.4142135623730951}},(6, 2): {(1, 0): {(6, 2): -1},(0, 1): {(6, 3): -1.0},(-1, 0): {(5, 2): -1.0},(0, -1): {(6, 1): -1.0},(-1, 1): {(5, 3): -1.4142135623730951},(1, -1): {(6, 2): -1},(1, 1): {(6, 2): -1},(-1, -1): {(5, 1): -1.4142135623730951}},(6, 3): {(1, 0): {(6, 3): -1},(0, 1): {(6, 4): -1.0},(-1, 0): {(5, 3): -1.0},(0, -1): {(6, 2): -1.0},(-1, 1): {(5, 4): -1.4142135623730951},(1, -1): {(6, 3): -1},(1, 1): {(6, 3): -1},(-1, -1): {(5, 2): -1.4142135623730951}},(6, 4): {(1, 0): {(6, 4): -1},(0, 1): {(6, 5): -1.0},(-1, 0): {(5, 4): -1.0},(0, -1): {(6, 3): -1.0},(-1, 1): {(5, 5): -1.4142135623730951},(1, -1): {(6, 4): -1},(1, 1): {(6, 4): -1},(-1, -1): {(5, 3): -1.4142135623730951}},(6, 5): {(1, 0): {(6, 5): -1},(0, 1): {(6, 5): -1},(-1, 0): {(5, 5): -1.0},(0, -1): {(6, 4): -1.0},(-1, 1): {(6, 5): -1},(1, -1): {(6, 5): -1},(1, 1): {(6, 5): -1},(-1, -1): {(5, 4): -1.4142135623730951}}}
    
    #reward A part
    performValueIteration = ValueIteration(transition, rewardA, valueTable, convergenceTolerance, gamma)
    optimalValuesA, policyTableA = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState = (6,4) , trapStates = [(3,0), (3,1),(3,2), (3,3)],valueTable=optimalValuesA)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState = (6,4) , trapStates = [(3,0), (3,1),(3,2), (3,3)], policy=policyTableA)
    
    print(p_traj(trajectoryToGoalA,beta,gamma,transition,rewardA,optimalValuesA))
    plt.plot([2,3,4,5,6,7,8],p_traj(trajectoryToGoalA,beta,gamma,transition,rewardA,optimalValuesA))
    plt.ylabel('Probabilty of goal A (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol A without gap')
    plt.show()
    
    #reward A Gap part
    performValueIteration = ValueIteration(transition, rewardAGap, valueTable, convergenceTolerance, gamma)
    optimalValuesAG, policyTableAG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState = (6,4) , trapStates = [(3,0), (3,2), (3,3)],valueTable=optimalValuesAG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState = (6,4) , trapStates = [(3,0), (3,2), (3,3)], policy=policyTableAG)
    
    print(p_traj(trajectoryToGoalA,beta,gamma,transition,rewardAGap,optimalValuesAG))
    plt.plot([2,3,4,5,6,7,8],p_traj(trajectoryToGoalA,beta,gamma,transition,rewardAGap,optimalValuesAG))
    plt.ylabel('Probabilty of goal A Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol A with gap')
    plt.show()
    
    
    #reward B part
    performValueIteration = ValueIteration(transition, rewardB, valueTable, convergenceTolerance, gamma)
    optimalValuesB, policyTableB = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState = (6,1) , trapStates = [(3,0), (3,1),(3,2), (3,3)],valueTable=optimalValuesB)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState = (6,1) , trapStates = [(3,0), (3,1),(3,2), (3,3)], policy=policyTableB)
    
    print(p_traj(trajectoryToGoalB,beta,gamma,transition,rewardB,optimalValuesB))
    plt.plot([2,3,4,5,6,7,8],p_traj(trajectoryToGoalB,beta,gamma,transition,rewardB,optimalValuesB))
    plt.ylabel('Probabilty of goal B (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol B without gap')
    plt.show()
    
    
    #reward B Gap part
    performValueIteration = ValueIteration(transition, rewardBGap, valueTable, convergenceTolerance, gamma)
    optimalValuesBG, policyTableBG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState = (6,1) , trapStates = [(3,0), (3,2), (3,3)],valueTable=optimalValuesBG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState = (6,1) , trapStates = [(3,0), (3,2), (3,3)], policy=policyTableBG)
    
    print(p_traj(trajectoryToGoalB,beta,gamma,transition,rewardBGap,optimalValuesBG))
    plt.plot([2,3,4,5,6,7,8],p_traj(trajectoryToGoalB,beta,gamma,transition,rewardBGap,optimalValuesBG))
    plt.ylabel('Probabilty of goal B Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol B with gap')
    plt.show()
    
    #reward C part
    performValueIteration = ValueIteration(transition, rewardC, valueTable, convergenceTolerance, gamma)
    optimalValuesC, policyTableC = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState = (1,5) , trapStates = [(3,0), (3,1),(3,2), (3,3)],valueTable=optimalValuesC)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState = (1,5) , trapStates = [(3,0), (3,1),(3,2), (3,3)], policy=policyTableC)
    
    print(p_traj(trajectoryToGoalC,beta,gamma,transition,rewardC,optimalValuesC))
    plt.plot([2,3,4,5,6],p_traj(trajectoryToGoalC,beta,gamma,transition,rewardC,optimalValuesC))
    plt.ylabel('Probabilty of goal C (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol C without gap')
    plt.show()
    
    #reward C Gap part
    performValueIteration = ValueIteration(transition, rewardCGap, valueTable, convergenceTolerance, gamma)
    optimalValuesCG, policyTableCG = performValueIteration()
    visualizeValueTable(gridWidth=7, gridHeight=6, goalState = (1,5) , trapStates = [(3,0), (3,2), (3,3)],valueTable=optimalValuesCG)
    visualizePolicy(gridWidth=7, gridHeight=6, goalState = (1,5) , trapStates = [(3,0), (3,2), (3,3)], policy=policyTableCG)
    
    print(p_traj(trajectoryToGoalC,beta,gamma,transition,rewardCGap,optimalValuesCG))
    plt.plot([2,3,4,5,6],p_traj(trajectoryToGoalC,beta,gamma,transition,rewardCGap,optimalValuesCG))
    plt.ylabel('Probabilty of goal C Gap (proportional to)')
    plt.xlabel('Time point')
    plt.title('Gaol C with gap')
    plt.show()

if __name__ == '__main__':
    main()