import math
class GemFinderPartATestCases:
test_case_1 = {‘test_case’: 1,
‘area_map’: [‘…B..’,
‘……’,
‘A..@.C’],
‘move’: [‘move 1.570963 1.0’,
‘move 1.570963 1.0’,
‘move 1.570963 1.0’,
‘move 1.570963 1.0’,
‘move 1.570963 1.0’,
‘move 1.570963 1.0’,
‘move 1.570963 1.0’,
‘move 1.570963 1.0’,
‘move 1.570963 1.0’,
‘move 1.570963 1.0’,
‘move 1.570963 1.0’],
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘robot_tolerance’: 0.25,
‘landmark_tolerance’: 0.25}
test_case_2 = {‘test_case’: 2,
‘area_map’: [‘AB.DE..A’,
‘M……K’,
‘N……L’,
‘O@……’,
‘F.HIJ.TR’],
‘move’: [‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move 1.570963 1.0’,
‘move 1.570963 1.0’,
‘move 1.570963 1.0’],
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘robot_tolerance’: 0.25,
‘landmark_tolerance’: 0.25}
test_case_3 = {‘test_case’: 3,
‘area_map’: [‘.QRHID.V’,
‘….G..X’,
‘.A..C..Y’,
‘…V.@.Z’,
‘O.B.FBCM’],
‘move’: [‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’],
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘robot_tolerance’: 0.25,
‘landmark_tolerance’: 0.25}
test_case_4 = {‘test_case’: 4,
‘area_map’: [‘……..’,
‘…L….’,
‘..A…..’,
‘……..’,
‘…D….’,
‘.@……’,
‘……M.’],
‘move’: [‘move 1.570963 0.0’,
‘move 1.570963 0.0’,
‘move 0.785481 1.0’,
‘move 0.0 0.5’,
‘move 0.0 0.5’,
‘move 1.0 0.5’,
‘move 0.0 0.5’],
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘robot_tolerance’: 0.25,
‘landmark_tolerance’: 0.25}
test_case_5 = {‘test_case’: 5,
‘area_map’: [‘J.A.MNOC’,
‘D@..L..P’,
‘G.B….K’,
‘H…..Q.’,
‘I.E.R…’],
‘move’: [‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move 1.570963 1.0’,
‘move 1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’],
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘robot_tolerance’: 0.25,
‘landmark_tolerance’: 0.25}
test_case_6 = {‘test_case’: 6,
‘area_map’: [‘A……DEFG’,
‘……….J’,
‘Z……….’,
‘Y……….’,
‘X.@……..’,
‘W………N’,
‘STUV…OPQR’],
‘move’: [‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.2 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.2 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move -1.570963 1.0’,
‘move 0.0 1.0’,
‘move 0.0 1.0’],
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘robot_tolerance’: 0.25,
‘landmark_tolerance’: 0.25}
all_cases = [
test_case_1,
test_case_2,
test_case_3,
test_case_4,
test_case_5,
test_case_6
]
class GemFinderPartBTestCases:
test_case_1 = {‘test_case’: 1,
‘area_map’: [‘….’,
‘..@A’,
‘..B.’],
‘needed_gems’: list(‘A’),
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘max_distance’: 2.0,
‘max_steering’: math.pi / 2. + 0.01,
‘horizon’: 1.5}
test_case_2 = {‘test_case’: 2,
‘area_map’: [‘AXCZ.Z.S’,
‘M..Z..@.’,
‘O…V..R’,
‘.B..FGH.’,
‘T……E’],
‘needed_gems’: list(‘ABC’),
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘max_distance’: 2.0,
‘max_steering’: math.pi / 2. + 0.01,
‘horizon’: 3.5}
test_case_3 = {‘test_case’: 3,
‘area_map’: [‘A……B’,
‘.F..@…’,
‘.E……’,
‘C……D’, ],
‘needed_gems’: list(‘ABCD’),
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘max_distance’: 2.0,
‘max_steering’: math.pi / 2. + 0.01,
‘horizon’: 5.0}
test_case_4 = {‘test_case’: 4,
‘area_map’: [‘O….A…’,
‘.@….C..’,
‘……..M’,
‘PB……N’],
‘needed_gems’: list(‘ABC’),
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘max_distance’: 2.0,
‘max_steering’: math.pi / 2. + 0.01,
‘horizon’: 5.0}
test_case_5 = {‘test_case’: 5,
‘area_map’: [‘ABCDEF’,
‘GHIJKL’,
‘M.@PQR’,
‘S.UVWX’,
‘..YNOT’],
‘needed_gems’: list(‘ABCDEFGHIJKLMNOPQRSTUVWXY’),
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘max_distance’: 2.0,
‘max_steering’: math.pi / 2. + 0.01,
‘horizon’: 2.5}
test_case_6 = {‘test_case’: 6,
‘area_map’: [‘..TOP.S’,
‘……I’,
‘……D’,
‘…@..E’,
‘…….’],
‘needed_gems’: list(‘OPT’),
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘max_distance’: 1.0,
‘max_steering’: math.pi / 2. + 0.01,
‘horizon’: 2.5}
test_case_7 = {‘test_case’: 7,
‘area_map’: [‘…C…..O….’,
‘….R……O..’,
‘..N….A……’,
‘S…E………’,
‘…….L.F….’,
‘..I….S..O…’,
‘….L…..A…’,
‘…..T…I..O.’,
‘N…….@…..’,
‘ZZZZZZZZZZZZZZ’],
‘needed_gems’: list(‘EFT’),
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘max_distance’: 3.0,
‘max_steering’: math.pi / 2. + 0.01,
‘horizon’: 4.5}
test_case_8 = {‘test_case’: 8,
‘area_map’: [‘ABCDEFG’,
‘QR.@.HI’,
‘JKLMNOP’],
‘needed_gems’: list(‘ACEGIK’),
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘max_distance’: 2.0,
‘max_steering’: math.pi / 2. + 0.01,
‘horizon’: 2.5}
test_case_9 = {‘test_case’: 9,
‘area_map’: [‘@A….F’,
‘…..MP’,
‘G….ZD’],
‘needed_gems’: list(‘ADM’),
‘max_distance’: 1.0,
‘max_steering’: math.pi / 2. + 0.01,
‘robot_distance_noise’: 0.05,
‘robot_bearing_noise’: 0.02,
‘horizon’: 4.0}
all_cases = [
test_case_1,
test_case_2,
test_case_3,
test_case_4,
test_case_5,
test_case_6,
test_case_7,
test_case_8,
test_case_9
]