Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +6 -0
- .gitignore +31 -0
- analyze_maze.py +407 -0
- analyze_simple.py +56 -0
- cli_utils.py +112 -0
- data/maze/100/maze_A1_RWs_10_0.6.txt +20 -0
- data/maze/100/maze_C1_RWs_10_0.6.txt +20 -0
- data/maze/100/maze_E1_RWs_10_0.6.txt +20 -0
- data/maze/100/maze_H1_RWs_10_0.6.txt +20 -0
- data/maze/100/maze_I1_RWs_10_0.6.txt +20 -0
- data/maze/100/maze_graph_A1_RWs.graphml +520 -0
- data/maze/100/maze_graph_C1_RWs.graphml +524 -0
- data/maze/100/maze_graph_E1_RWs.graphml +532 -0
- data/maze/100/maze_graph_H1_RWs.graphml +522 -0
- data/maze/100/maze_graph_I1_RWs.graphml +520 -0
- data/maze/100/meta_A1_RWs.pkl +3 -0
- data/maze/100/meta_C1_RWs.pkl +3 -0
- data/maze/100/meta_E1_RWs.pkl +3 -0
- data/maze/100/meta_H1_RWs.pkl +3 -0
- data/maze/100/meta_I1_RWs.pkl +3 -0
- data/maze/100/test_A1_RWs_10K.txt +0 -0
- data/maze/100/test_A1_RWs_1K.txt +0 -0
- data/maze/100/test_C1_RWs_100.txt +100 -0
- data/maze/100/test_C1_RWs_10K.txt +0 -0
- data/maze/100/test_E1_RWs_10K.txt +0 -0
- data/maze/100/test_H1_RWs_10K.txt +0 -0
- data/maze/100/test_I1_RWs_10K.txt +0 -0
- data/maze/100/train_A1_RWs_500K.bin +3 -0
- data/maze/100/train_A1_RWs_500K.txt +3 -0
- data/maze/100/train_C1_RWs_100.txt +300 -0
- data/maze/100/train_C1_RWs_10M.bin +3 -0
- data/maze/100/train_C1_RWs_10M.txt +3 -0
- data/maze/100/train_C1_RWs_500K.bin +3 -0
- data/maze/100/train_C1_RWs_500K.txt +3 -0
- data/maze/100/train_E1_RWs_500K.bin +3 -0
- data/maze/100/train_E1_RWs_500K.txt +3 -0
- data/maze/100/train_H1_RWs_10M.bin +3 -0
- data/maze/100/train_H1_RWs_10M.txt +3 -0
- data/maze/100/train_I1_RWs_10M.bin +3 -0
- data/maze/100/train_I1_RWs_10M.txt +3 -0
- data/maze/100/val_A1_RWs_10K.bin +3 -0
- data/maze/100/val_A1_RWs_1K.bin +3 -0
- data/maze/100/val_C1_RWs_10K.bin +3 -0
- data/maze/100/val_E1_RWs_10K.bin +3 -0
- data/maze/100/val_H1_RWs_10K.bin +3 -0
- data/maze/100/val_I1_RWs_10K.bin +3 -0
- data/maze/create_maze.py +447 -0
- data/maze/create_multitask_maze.py +1204 -0
- data/maze/prepare_minigpt.py +164 -0
- data/maze/prepare_multitask_minigpt.py +323 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,9 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
data/maze/100/train_A1_RWs_500K.txt filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
data/maze/100/train_C1_RWs_10M.txt filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
data/maze/100/train_C1_RWs_500K.txt filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
data/maze/100/train_E1_RWs_500K.txt filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
data/maze/100/train_H1_RWs_10M.txt filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
data/maze/100/train_I1_RWs_10M.txt filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Output directories
|
| 2 |
+
out/
|
| 3 |
+
out2/
|
| 4 |
+
# Keep result/plot dirs (small)
|
| 5 |
+
!out/
|
| 6 |
+
out/*
|
| 7 |
+
!out/maze_kdetour/
|
| 8 |
+
!out/plot/
|
| 9 |
+
|
| 10 |
+
# Large training data
|
| 11 |
+
data/maze/36/
|
| 12 |
+
data/maze/100/
|
| 13 |
+
|
| 14 |
+
# Python cache
|
| 15 |
+
__pycache__/
|
| 16 |
+
*.pyc
|
| 17 |
+
*.pyo
|
| 18 |
+
*.pyd
|
| 19 |
+
.Python
|
| 20 |
+
|
| 21 |
+
# Virtual environments
|
| 22 |
+
venv/
|
| 23 |
+
env/
|
| 24 |
+
ENV/
|
| 25 |
+
|
| 26 |
+
# IDE
|
| 27 |
+
.vscode/
|
| 28 |
+
.idea/
|
| 29 |
+
*.swp
|
| 30 |
+
*.swo
|
| 31 |
+
*~
|
analyze_maze.py
ADDED
|
@@ -0,0 +1,407 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import argparse
|
| 3 |
+
import math
|
| 4 |
+
from cli_utils import parse_count, format_count
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
def analyze_maze_predictions(file_path, multitasks=False, no_task_tag=False):
|
| 8 |
+
"""
|
| 9 |
+
Analyze maze predictions from test output file.
|
| 10 |
+
|
| 11 |
+
Args:
|
| 12 |
+
file_path: Path to the prediction file
|
| 13 |
+
multitasks: If True, separate analysis for Task A and Task B
|
| 14 |
+
no_task_tag: If True, data files do not contain task identifiers
|
| 15 |
+
|
| 16 |
+
Returns:
|
| 17 |
+
Dictionary with overall stats and per-task stats if multitasks=True
|
| 18 |
+
"""
|
| 19 |
+
total = 0
|
| 20 |
+
correct = 0
|
| 21 |
+
illegal_direction = 0
|
| 22 |
+
incorrect_target = 0
|
| 23 |
+
syntax_error = 0
|
| 24 |
+
overall_high_conf = 0
|
| 25 |
+
overall_low_conf = 0
|
| 26 |
+
|
| 27 |
+
# Per-task statistics
|
| 28 |
+
taskA_stats = {'total': 0, 'correct': 0, 'syntax_error': 0, 'illegal_direction': 0, 'incorrect_target': 0,
|
| 29 |
+
'high_conf_mistake': 0, 'low_conf_mistake': 0}
|
| 30 |
+
taskB_stats = {'total': 0, 'correct': 0, 'syntax_error': 0, 'incorrect_target_label': 0, 'incorrect_neighbor_label': 0,
|
| 31 |
+
'high_conf_mistake': 0, 'low_conf_mistake': 0}
|
| 32 |
+
taskC_stats = {'total': 0, 'correct': 0, 'syntax_error': 0, 'illegal_direction': 0, 'incorrect_target': 0,
|
| 33 |
+
'incorrect_label': 0, 'high_conf_mistake': 0, 'low_conf_mistake': 0}
|
| 34 |
+
taskD_stats = {'total': 0, 'correct': 0, 'syntax_error': 0, 'illegal_direction': 0, 'incorrect_target': 0,
|
| 35 |
+
'high_conf_mistake': 0, 'low_conf_mistake': 0}
|
| 36 |
+
taskE_stats = {'total': 0, 'correct': 0, 'syntax_error': 0, 'illegal_direction': 0, 'incorrect_target': 0,
|
| 37 |
+
'incorrect_label': 0, 'high_conf_mistake': 0, 'low_conf_mistake': 0}
|
| 38 |
+
taskF_stats = {'total': 0, 'correct': 0, 'syntax_error': 0, 'incorrect_target_label': 0,
|
| 39 |
+
'high_conf_mistake': 0, 'low_conf_mistake': 0}
|
| 40 |
+
taskG_stats = {'total': 0, 'correct': 0, 'syntax_error': 0, 'illegal_direction': 0, 'incorrect_target': 0,
|
| 41 |
+
'high_conf_mistake': 0, 'low_conf_mistake': 0}
|
| 42 |
+
taskH_stats = {'total': 0, 'correct': 0, 'syntax_error': 0, 'illegal_direction': 0, 'incorrect_target': 0,
|
| 43 |
+
'high_conf_mistake': 0, 'low_conf_mistake': 0}
|
| 44 |
+
|
| 45 |
+
task_stats_map = {
|
| 46 |
+
'A': taskA_stats, 'B': taskB_stats, 'C': taskC_stats,
|
| 47 |
+
'D': taskD_stats, 'E': taskE_stats, 'F': taskF_stats, 'G': taskG_stats,
|
| 48 |
+
'H': taskH_stats
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
with open(file_path, 'r') as f:
|
| 52 |
+
for line in f:
|
| 53 |
+
line = line.strip()
|
| 54 |
+
if not line:
|
| 55 |
+
continue
|
| 56 |
+
total += 1
|
| 57 |
+
|
| 58 |
+
parts = line.split()
|
| 59 |
+
|
| 60 |
+
# Detect task ID (A, B, C, D, E, F, G)
|
| 61 |
+
task_id = None
|
| 62 |
+
task_offset = 0
|
| 63 |
+
|
| 64 |
+
if not no_task_tag:
|
| 65 |
+
# Original logic with task tags
|
| 66 |
+
if len(parts) > 0 and parts[0] in ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']:
|
| 67 |
+
task_id = parts[0]
|
| 68 |
+
task_offset = 1
|
| 69 |
+
else:
|
| 70 |
+
# In no_task_tag mode, read task type from parentheses in the line
|
| 71 |
+
if line.startswith('(') and ')' in line:
|
| 72 |
+
end_paren = line.find(')')
|
| 73 |
+
task_id_str = line[1:end_paren]
|
| 74 |
+
if task_id_str in ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']:
|
| 75 |
+
task_id = task_id_str
|
| 76 |
+
line_without_label = line[end_paren+1:].strip()
|
| 77 |
+
parts = line_without_label.split()
|
| 78 |
+
task_offset = 0
|
| 79 |
+
|
| 80 |
+
if task_id is None:
|
| 81 |
+
if ':' in line:
|
| 82 |
+
colon_idx = line.index(':')
|
| 83 |
+
prompt_part = line[:colon_idx].strip()
|
| 84 |
+
prompt_tokens = prompt_part.split()
|
| 85 |
+
|
| 86 |
+
if len(prompt_tokens) >= 2:
|
| 87 |
+
answer_part = line[colon_idx + 1:].strip()
|
| 88 |
+
answer_tokens = answer_part.split()
|
| 89 |
+
if len(answer_tokens) >= 2 and answer_tokens[1] in ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']:
|
| 90 |
+
task_id = 'E'
|
| 91 |
+
elif any(tok in ['L', 'R', 'F', 'T'] for tok in answer_tokens):
|
| 92 |
+
task_id = 'C'
|
| 93 |
+
elif len(prompt_tokens) == 2 and prompt_tokens[0].isdigit() and prompt_tokens[1].isdigit():
|
| 94 |
+
task_id = 'A'
|
| 95 |
+
elif prompt_tokens[0].isdigit() and prompt_tokens[1] in ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']:
|
| 96 |
+
task_id = 'D'
|
| 97 |
+
elif prompt_tokens[0] in ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']:
|
| 98 |
+
task_id = 'F'
|
| 99 |
+
elif len(prompt_tokens) == 4 and all(token.isdigit() for token in prompt_tokens):
|
| 100 |
+
task_id = 'G'
|
| 101 |
+
elif prompt_tokens[0].isdigit():
|
| 102 |
+
if len(answer_tokens) == 5:
|
| 103 |
+
task_id = 'B'
|
| 104 |
+
|
| 105 |
+
if multitasks and task_id in task_stats_map:
|
| 106 |
+
task_stats_map[task_id]['total'] += 1
|
| 107 |
+
|
| 108 |
+
# Confidence tracking
|
| 109 |
+
is_high = 'HIGH-CONF' in line
|
| 110 |
+
is_low = 'LOW-CONF' in line
|
| 111 |
+
if is_high:
|
| 112 |
+
overall_high_conf += 1
|
| 113 |
+
if task_id in task_stats_map:
|
| 114 |
+
task_stats_map[task_id]['high_conf_mistake'] += 1
|
| 115 |
+
elif is_low:
|
| 116 |
+
overall_low_conf += 1
|
| 117 |
+
if task_id in task_stats_map:
|
| 118 |
+
task_stats_map[task_id]['low_conf_mistake'] += 1
|
| 119 |
+
|
| 120 |
+
if 'is illegal' in line or 'exceeds feasible count' in line or 'invalid index' in line or 'no feasible edges' in line:
|
| 121 |
+
illegal_direction += 1
|
| 122 |
+
if task_id in task_stats_map and 'illegal_direction' in task_stats_map[task_id]:
|
| 123 |
+
task_stats_map[task_id]['illegal_direction'] += 1
|
| 124 |
+
continue
|
| 125 |
+
|
| 126 |
+
if 'syntax error' in line:
|
| 127 |
+
syntax_error += 1
|
| 128 |
+
if task_id in task_stats_map:
|
| 129 |
+
task_stats_map[task_id]['syntax_error'] += 1
|
| 130 |
+
continue
|
| 131 |
+
|
| 132 |
+
if 'incorrect neighbor label' in line:
|
| 133 |
+
if task_id == 'B':
|
| 134 |
+
taskB_stats['incorrect_neighbor_label'] += 1
|
| 135 |
+
incorrect_target += 1
|
| 136 |
+
continue
|
| 137 |
+
|
| 138 |
+
if 'incorrect target node label' in line:
|
| 139 |
+
if task_id == 'B':
|
| 140 |
+
taskB_stats['incorrect_target_label'] += 1
|
| 141 |
+
incorrect_target += 1
|
| 142 |
+
continue
|
| 143 |
+
|
| 144 |
+
if 'incorrect target label' in line:
|
| 145 |
+
if task_id == 'F':
|
| 146 |
+
taskF_stats['incorrect_target_label'] += 1
|
| 147 |
+
incorrect_target += 1
|
| 148 |
+
continue
|
| 149 |
+
|
| 150 |
+
if 'incorrect label' in line:
|
| 151 |
+
if task_id == 'C':
|
| 152 |
+
taskC_stats['incorrect_label'] += 1
|
| 153 |
+
elif task_id == 'E':
|
| 154 |
+
taskE_stats['incorrect_label'] += 1
|
| 155 |
+
incorrect_target += 1
|
| 156 |
+
continue
|
| 157 |
+
|
| 158 |
+
if 'incorrect target node' in line:
|
| 159 |
+
incorrect_target += 1
|
| 160 |
+
if task_id in task_stats_map and 'incorrect_target' in task_stats_map[task_id]:
|
| 161 |
+
task_stats_map[task_id]['incorrect_target'] += 1
|
| 162 |
+
continue
|
| 163 |
+
|
| 164 |
+
correct += 1
|
| 165 |
+
if task_id in task_stats_map:
|
| 166 |
+
task_stats_map[task_id]['correct'] += 1
|
| 167 |
+
|
| 168 |
+
stats = {
|
| 169 |
+
'total': total,
|
| 170 |
+
'correct': correct,
|
| 171 |
+
'syntax_error': syntax_error,
|
| 172 |
+
'illegal_direction': illegal_direction,
|
| 173 |
+
'incorrect_target': incorrect_target,
|
| 174 |
+
'high_conf_mistake': overall_high_conf,
|
| 175 |
+
'low_conf_mistake': overall_low_conf
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
if multitasks:
|
| 179 |
+
stats['taskA'] = taskA_stats
|
| 180 |
+
stats['taskB'] = taskB_stats
|
| 181 |
+
stats['taskC'] = taskC_stats
|
| 182 |
+
stats['taskD'] = taskD_stats
|
| 183 |
+
stats['taskE'] = taskE_stats
|
| 184 |
+
stats['taskF'] = taskF_stats
|
| 185 |
+
stats['taskG'] = taskG_stats
|
| 186 |
+
stats['taskH'] = taskH_stats
|
| 187 |
+
|
| 188 |
+
return stats
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
if __name__ == "__main__":
|
| 192 |
+
parser = argparse.ArgumentParser(description='Analyze prediction results from test_maze.py')
|
| 193 |
+
parser.add_argument('--ckpt_iter', type=int, default=10000, help='Checkpoint iteration')
|
| 194 |
+
parser.add_argument('--model', type=str, default='transformer', choices=['transformer', 'transformer-rope', 'transformer-nextlat', 'mamba', 'mamba2', 'gated-deltanet', 'gru'],
|
| 195 |
+
help='Model architecture; selects the out/<model>/ directory')
|
| 196 |
+
parser.add_argument('--config', type=str, default='1_1_120', help='Model config')
|
| 197 |
+
parser.add_argument('--dataset', type=str, default='maze', help='Dataset name')
|
| 198 |
+
parser.add_argument('--num_nodes', type=int, default=100, help='Number of nodes')
|
| 199 |
+
parser.add_argument('--num_of_paths', type=int, default=20, help='Number of paths')
|
| 200 |
+
parser.add_argument('--multitasks', action=argparse.BooleanOptionalAction, default=True,
|
| 201 |
+
help='Use multitask data (default: True)')
|
| 202 |
+
parser.add_argument('--num_train_dataset', type=parse_count, default=50000,
|
| 203 |
+
help='Number of multitask training entries (supports K/M/B, default: 50000)')
|
| 204 |
+
parser.add_argument('--num_test_dataset', type=parse_count, default=10000,
|
| 205 |
+
help='Number of multitask test entries (supports K/M/B, default: 10000)')
|
| 206 |
+
parser.add_argument('--tasks', type=str, default='A1',
|
| 207 |
+
help='Task specification (e.g., A1, A1B1, A3B2, A1D1F1). Default: A1')
|
| 208 |
+
parser.add_argument('--CL', action=argparse.BooleanOptionalAction, default=False,
|
| 209 |
+
help='Task C turn-label mode (default: False)')
|
| 210 |
+
parser.add_argument('--batch_size', type=int, default=100,
|
| 211 |
+
help='Batch size used during prediction (matches test_maze.py)')
|
| 212 |
+
parser.add_argument('--num_iters', type=int, default=10,
|
| 213 |
+
help='Number of batches used during prediction (matches test_maze.py)')
|
| 214 |
+
parser.add_argument('--path_type', type=str, default='RWa', choices=['RWc', 'RWa', 'RWs'],
|
| 215 |
+
help='Path generation type: RWc (random walk with cycles), RWa (random walk acyclic, default), RWs (single source random walk).')
|
| 216 |
+
parser.add_argument('--partial', action='store_true', default=False,
|
| 217 |
+
help='Analyze partial prefix test results (default: False)')
|
| 218 |
+
parser.add_argument('--temperature', type=float, default=1.0,
|
| 219 |
+
help='Sampling temperature used during prediction (default: 1.0). Affects output filenames.')
|
| 220 |
+
# Add --no_task_tag argument
|
| 221 |
+
parser.add_argument('--no_task_tag', action='store_true', default=False,
|
| 222 |
+
help='Data files do not contain task identifiers (A, B, C, etc.). This should match the setting used during data generation and testing.')
|
| 223 |
+
parser.add_argument('--PostGRU', action='store_true', default=False,
|
| 224 |
+
help='Analyze PostGRU predictions (adds _PGR suffix to filenames)')
|
| 225 |
+
parser.add_argument('--NLS', action='store_true', default=False,
|
| 226 |
+
help='Analyze NLS predictions (adds _NLS suffix to filenames)')
|
| 227 |
+
args = parser.parse_args()
|
| 228 |
+
|
| 229 |
+
tasks_str = args.tasks
|
| 230 |
+
tasks_tag = f"{tasks_str}_CL" if args.CL else tasks_str
|
| 231 |
+
# Add path type tag for filenames (RWc = cyclic, RWa = acyclic, RWs = single source)
|
| 232 |
+
path_type_tag = args.path_type
|
| 233 |
+
tasks_tag = f"{tasks_tag}_{path_type_tag}"
|
| 234 |
+
# Add _NT_ tag to tasks_tag when no_task_tag is enabled
|
| 235 |
+
if args.no_task_tag:
|
| 236 |
+
tasks_tag = f"{tasks_tag}_NT"
|
| 237 |
+
# Add _NL tag for transformer-nextlat
|
| 238 |
+
if args.model == 'transformer-nextlat':
|
| 239 |
+
tasks_tag = f"{tasks_tag}_NL"
|
| 240 |
+
# Add _PGR tag when PostGRU is enabled
|
| 241 |
+
if args.PostGRU:
|
| 242 |
+
tasks_tag = f"{tasks_tag}_PGR"
|
| 243 |
+
# Add _NLS tag when NLS is enabled
|
| 244 |
+
if args.NLS:
|
| 245 |
+
tasks_tag = f"{tasks_tag}_NLS"
|
| 246 |
+
test_dataset_label = format_count(args.num_test_dataset)
|
| 247 |
+
run_test_label = args.batch_size * args.num_iters
|
| 248 |
+
nt_suffix = '_NT' if args.no_task_tag else ''
|
| 249 |
+
out_dir = f'out/{args.model.replace("-", "_")}/{args.dataset}_{args.config}_{args.num_nodes}{nt_suffix}/'
|
| 250 |
+
|
| 251 |
+
|
| 252 |
+
def pick_first_existing(paths):
|
| 253 |
+
for path in paths:
|
| 254 |
+
if os.path.exists(path):
|
| 255 |
+
return path
|
| 256 |
+
return paths[0]
|
| 257 |
+
|
| 258 |
+
|
| 259 |
+
# Add _partial suffix if partial mode is enabled
|
| 260 |
+
partial_suffix = '_partial' if args.partial else ''
|
| 261 |
+
# Add temperature suffix when temperature is not default (1.0)
|
| 262 |
+
temp_suffix = f'_t{args.temperature}' if args.temperature != 1.0 else ''
|
| 263 |
+
|
| 264 |
+
pred_candidates = (
|
| 265 |
+
[
|
| 266 |
+
os.path.join(out_dir, f'pred_test_{tasks_tag}_{args.ckpt_iter}_{run_test_label}{temp_suffix}{partial_suffix}.txt'),
|
| 267 |
+
# primary (matches test_maze.py)
|
| 268 |
+
os.path.join(out_dir, f'pred_test_{tasks_tag}_{args.ckpt_iter}_{test_dataset_label}{temp_suffix}{partial_suffix}.txt'),
|
| 269 |
+
os.path.join(out_dir,
|
| 270 |
+
f'pred_test_{tasks_tag}_{args.ckpt_iter}_{args.num_test_dataset}{temp_suffix}{partial_suffix}.txt'),
|
| 271 |
+
os.path.join(out_dir, f'pred_test_{tasks_str}_{args.ckpt_iter}_{run_test_label}{temp_suffix}{partial_suffix}.txt'),
|
| 272 |
+
os.path.join(out_dir, f'pred_test_{tasks_str}_{args.ckpt_iter}_{test_dataset_label}{temp_suffix}{partial_suffix}.txt'),
|
| 273 |
+
os.path.join(out_dir,
|
| 274 |
+
f'pred_test_{tasks_str}_{args.ckpt_iter}_{args.num_test_dataset}{temp_suffix}{partial_suffix}.txt'),
|
| 275 |
+
]
|
| 276 |
+
if args.multitasks else [
|
| 277 |
+
os.path.join(out_dir, f'pred_test_{args.ckpt_iter}_{args.num_of_paths}{temp_suffix}{partial_suffix}.txt')]
|
| 278 |
+
)
|
| 279 |
+
file_path = pick_first_existing(pred_candidates)
|
| 280 |
+
|
| 281 |
+
if os.path.exists(file_path):
|
| 282 |
+
# Ensure output directory exists
|
| 283 |
+
os.makedirs(out_dir, exist_ok=True)
|
| 284 |
+
|
| 285 |
+
# Analyze predictions
|
| 286 |
+
stats = analyze_maze_predictions(file_path, multitasks=args.multitasks, no_task_tag=args.no_task_tag)
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
def pct_and_se(count, total):
|
| 290 |
+
if total <= 0:
|
| 291 |
+
return 0.0, 0.0
|
| 292 |
+
p = count / total
|
| 293 |
+
se = math.sqrt(p * (1 - p) / total) * 100
|
| 294 |
+
return p * 100, se
|
| 295 |
+
|
| 296 |
+
|
| 297 |
+
# Format output
|
| 298 |
+
separator = "=" * 70
|
| 299 |
+
output_lines = [
|
| 300 |
+
separator,
|
| 301 |
+
"Accuracy Test Results",
|
| 302 |
+
separator,
|
| 303 |
+
f"Task tag: {'DISABLED' if args.no_task_tag else 'ENABLED'}",
|
| 304 |
+
f"Config: {args.config}",
|
| 305 |
+
f"Checkpoint iteration: {args.ckpt_iter}",
|
| 306 |
+
f"Number of nodes: {args.num_nodes}",
|
| 307 |
+
f"Task configuration: {args.tasks}" if args.multitasks else "",
|
| 308 |
+
separator,
|
| 309 |
+
]
|
| 310 |
+
|
| 311 |
+
# Overall statistics
|
| 312 |
+
total_preds = stats['total'] if stats['total'] > 0 else 1
|
| 313 |
+
corr_pct, corr_se = pct_and_se(stats['correct'], total_preds)
|
| 314 |
+
syn_pct, _ = pct_and_se(stats['syntax_error'], total_preds)
|
| 315 |
+
ill_pct, _ = pct_and_se(stats['illegal_direction'], total_preds)
|
| 316 |
+
tgt_pct, _ = pct_and_se(stats['incorrect_target'], total_preds)
|
| 317 |
+
high_pct, _ = pct_and_se(stats['high_conf_mistake'], total_preds)
|
| 318 |
+
low_pct, _ = pct_and_se(stats['low_conf_mistake'], total_preds)
|
| 319 |
+
|
| 320 |
+
output_lines.extend([
|
| 321 |
+
"OVERALL STATISTICS:",
|
| 322 |
+
f" Total predictions: {stats['total']}",
|
| 323 |
+
f" Correct (accuracy with standard error): {stats['correct']} ({corr_pct:.2f}% ± {corr_se:.2f}%)",
|
| 324 |
+
f" Syntax error: {stats['syntax_error']} ({syn_pct:.2f}%)",
|
| 325 |
+
f" Illegal direction: {stats['illegal_direction']} ({ill_pct:.2f}%)",
|
| 326 |
+
f" Incorrect target: {stats['incorrect_target']} ({tgt_pct:.2f}%)",
|
| 327 |
+
f" - High confidence mistakes: {stats['high_conf_mistake']} ({high_pct:.2f}%)",
|
| 328 |
+
f" - Low confidence mistakes: {stats['low_conf_mistake']} ({low_pct:.2f}%)",
|
| 329 |
+
])
|
| 330 |
+
|
| 331 |
+
# Per-task statistics if multitasks
|
| 332 |
+
if args.multitasks:
|
| 333 |
+
task_mapping = {
|
| 334 |
+
'taskA': ('A', 'Pathfinding'),
|
| 335 |
+
'taskB': ('B', 'Target Identification'),
|
| 336 |
+
'taskC': ('C', 'Turn-based pathfinding'),
|
| 337 |
+
'taskD': ('D', 'Pathfinding to label'),
|
| 338 |
+
'taskE': ('E', 'Pathfinding with labels'),
|
| 339 |
+
'taskF': ('F', 'Target label identification'),
|
| 340 |
+
'taskG': ('G', 'Reachability choice'),
|
| 341 |
+
'taskH': ('H', 'Relative clockwise-index path')
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
for key, (tid, name) in task_mapping.items():
|
| 345 |
+
if key in stats and stats[key]['total'] > 0:
|
| 346 |
+
s = stats[key]
|
| 347 |
+
t_total = s['total']
|
| 348 |
+
t_corr, t_se = pct_and_se(s['correct'], t_total)
|
| 349 |
+
t_syn, _ = pct_and_se(s['syntax_error'], t_total)
|
| 350 |
+
t_high, _ = pct_and_se(s['high_conf_mistake'], t_total)
|
| 351 |
+
t_low, _ = pct_and_se(s['low_conf_mistake'], t_total)
|
| 352 |
+
|
| 353 |
+
output_lines.extend([
|
| 354 |
+
"",
|
| 355 |
+
separator,
|
| 356 |
+
f"TASK {tid} ({name}) STATISTICS:",
|
| 357 |
+
f" Total: {t_total}",
|
| 358 |
+
f" Correct (accuracy with standard error): {s['correct']} ({t_corr:.2f}% ± {t_se:.2f}%)",
|
| 359 |
+
f" Syntax error: {s['syntax_error']} ({t_syn:.2f}%)",
|
| 360 |
+
])
|
| 361 |
+
|
| 362 |
+
if 'illegal_direction' in s:
|
| 363 |
+
t_ill, _ = pct_and_se(s['illegal_direction'], t_total)
|
| 364 |
+
output_lines.append(f" Illegal direction: {s['illegal_direction']} ({t_ill:.2f}%)")
|
| 365 |
+
|
| 366 |
+
if tid == 'B':
|
| 367 |
+
t_lbl, _ = pct_and_se(s['incorrect_target_label'], t_total)
|
| 368 |
+
t_nbr, _ = pct_and_se(s['incorrect_neighbor_label'], t_total)
|
| 369 |
+
output_lines.append(
|
| 370 |
+
f" Incorrect target node label: {s['incorrect_target_label']} ({t_lbl:.2f}%)")
|
| 371 |
+
output_lines.append(
|
| 372 |
+
f" Incorrect neighbor label: {s['incorrect_neighbor_label']} ({t_nbr:.2f}%)")
|
| 373 |
+
elif tid == 'F':
|
| 374 |
+
t_lbl, _ = pct_and_se(s['incorrect_target_label'], t_total)
|
| 375 |
+
output_lines.append(f" Incorrect target label: {s['incorrect_target_label']} ({t_lbl:.2f}%)")
|
| 376 |
+
else:
|
| 377 |
+
if 'incorrect_target' in s:
|
| 378 |
+
t_tgt, _ = pct_and_se(s['incorrect_target'], t_total)
|
| 379 |
+
output_lines.append(f" Incorrect target: {s['incorrect_target']} ({t_tgt:.2f}%)")
|
| 380 |
+
|
| 381 |
+
if 'incorrect_label' in s:
|
| 382 |
+
t_lbl, _ = pct_and_se(s['incorrect_label'], t_total)
|
| 383 |
+
lbl_text = "Incorrect label (CL mode)" if tid == 'C' else "Incorrect label"
|
| 384 |
+
output_lines.append(f" {lbl_text}: {s['incorrect_label']} ({t_lbl:.2f}%)")
|
| 385 |
+
|
| 386 |
+
output_lines.extend([
|
| 387 |
+
f" - High confidence mistakes: {s['high_conf_mistake']} ({t_high:.2f}%)",
|
| 388 |
+
f" - Low confidence mistakes: {s['low_conf_mistake']} ({t_low:.2f}%)",
|
| 389 |
+
])
|
| 390 |
+
|
| 391 |
+
output_lines.append(separator)
|
| 392 |
+
output_text = "\n".join(output_lines)
|
| 393 |
+
|
| 394 |
+
# Print to console
|
| 395 |
+
print("\n" + output_text + "\n")
|
| 396 |
+
|
| 397 |
+
# Save to file
|
| 398 |
+
output_file = os.path.join(
|
| 399 |
+
out_dir,
|
| 400 |
+
f"accuracy_{tasks_tag}_{args.ckpt_iter}_{args.num_test_dataset}{temp_suffix}{partial_suffix}.txt" if args.multitasks else f"accuracy_{args.ckpt_iter}_{args.num_of_paths}{temp_suffix}{partial_suffix}.txt"
|
| 401 |
+
)
|
| 402 |
+
with open(output_file, 'w') as f:
|
| 403 |
+
f.write(output_text + "\n")
|
| 404 |
+
|
| 405 |
+
print(f"Results saved to {output_file}")
|
| 406 |
+
else:
|
| 407 |
+
print(f"File {file_path} not found.")
|
analyze_simple.py
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import argparse
|
| 3 |
+
|
| 4 |
+
def analyze_predictions(file_path):
|
| 5 |
+
total = 0
|
| 6 |
+
correct = 0
|
| 7 |
+
incorrect_start_end = 0
|
| 8 |
+
non_existence = 0
|
| 9 |
+
wrong_syntax = 0
|
| 10 |
+
|
| 11 |
+
with open(file_path, 'r') as f:
|
| 12 |
+
for line in f:
|
| 13 |
+
line = line.strip()
|
| 14 |
+
if not line:
|
| 15 |
+
continue
|
| 16 |
+
total += 1
|
| 17 |
+
parts = line.split()
|
| 18 |
+
# Find where symbol starts (first non-digit, non-'x')
|
| 19 |
+
symbol_start = len(parts)
|
| 20 |
+
for i, p in enumerate(parts):
|
| 21 |
+
if not (p.isdigit() or p == 'x'):
|
| 22 |
+
symbol_start = i
|
| 23 |
+
break
|
| 24 |
+
symbol = ' '.join(parts[symbol_start:]).strip()
|
| 25 |
+
if symbol == '':
|
| 26 |
+
correct += 1
|
| 27 |
+
elif symbol == 'incorrect start/end':
|
| 28 |
+
incorrect_start_end += 1
|
| 29 |
+
elif symbol.startswith('non-existence path'):
|
| 30 |
+
non_existence += 1
|
| 31 |
+
elif symbol == 'wrong syntax':
|
| 32 |
+
wrong_syntax += 1
|
| 33 |
+
# else: other, but according to code, only these
|
| 34 |
+
|
| 35 |
+
print(f"Total paths: {total}")
|
| 36 |
+
print(f"Correct paths: {correct} ({correct/total*100:.2f}%)")
|
| 37 |
+
print(f"Incorrect start/end: {incorrect_start_end} ({incorrect_start_end/total*100:.2f}%)")
|
| 38 |
+
print(f"Non-existence path: {non_existence} ({non_existence/total*100:.2f}%)")
|
| 39 |
+
print(f"Wrong syntax: {wrong_syntax} ({wrong_syntax/total*100:.2f}%)")
|
| 40 |
+
|
| 41 |
+
if __name__ == "__main__":
|
| 42 |
+
parser = argparse.ArgumentParser(description='Analyze prediction results from test_simple.py')
|
| 43 |
+
parser.add_argument('--ckpt_iter', type=int, default=10000, help='Checkpoint iteration')
|
| 44 |
+
parser.add_argument('--config', type=str, default='1_1_120', help='Model config')
|
| 45 |
+
parser.add_argument('--dataset', type=str, default='simple_graph', help='Dataset name')
|
| 46 |
+
parser.add_argument('--num_nodes', type=int, default=100, help='Number of nodes')
|
| 47 |
+
parser.add_argument('--num_of_paths', type=int, default=20, help='Number of paths')
|
| 48 |
+
args = parser.parse_args()
|
| 49 |
+
|
| 50 |
+
out_dir = f'out/{args.dataset}_{args.config}_{args.num_nodes}/'
|
| 51 |
+
file_path = os.path.join(out_dir, f'pred_test_{args.ckpt_iter}.txt')
|
| 52 |
+
|
| 53 |
+
if os.path.exists(file_path):
|
| 54 |
+
analyze_predictions(file_path)
|
| 55 |
+
else:
|
| 56 |
+
print(f"File {file_path} not found.")
|
cli_utils.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import argparse
|
| 2 |
+
import random
|
| 3 |
+
import re
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def parse_count(value):
|
| 7 |
+
"""Parse integers with optional K/M/B suffixes (e.g., 50K, 3M)."""
|
| 8 |
+
if isinstance(value, int):
|
| 9 |
+
return value
|
| 10 |
+
if isinstance(value, str):
|
| 11 |
+
text = value.strip().replace('_', '').lower()
|
| 12 |
+
match = re.fullmatch(r'(\d+(?:\.\d+)?)([kmb]?)', text)
|
| 13 |
+
if not match:
|
| 14 |
+
raise argparse.ArgumentTypeError(f"Invalid count: {value}")
|
| 15 |
+
number, suffix = match.groups()
|
| 16 |
+
multipliers = {'': 1, 'k': 1_000, 'm': 1_000_000, 'b': 1_000_000_000}
|
| 17 |
+
return int(float(number) * multipliers[suffix])
|
| 18 |
+
raise argparse.ArgumentTypeError(f"Invalid count type: {type(value)}")
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
def format_count(value):
|
| 22 |
+
"""Format an integer count using K/M/B suffixes for filenames (e.g., 3000 -> 3K)."""
|
| 23 |
+
n = int(value)
|
| 24 |
+
for suffix, factor in [('B', 1_000_000_000), ('M', 1_000_000), ('K', 1_000)]:
|
| 25 |
+
if n >= factor:
|
| 26 |
+
if n % factor == 0:
|
| 27 |
+
return f"{n // factor}{suffix}"
|
| 28 |
+
short = n / factor
|
| 29 |
+
return f"{short:.1f}".rstrip('0').rstrip('.') + suffix
|
| 30 |
+
return str(n)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
def parse_task_distribution(tasks_str, default_task='A'):
|
| 34 |
+
"""Parse task weights like 'A1C1' into a dict of task -> weight."""
|
| 35 |
+
if tasks_str is None or tasks_str == '':
|
| 36 |
+
return {default_task: 1}
|
| 37 |
+
matches = re.findall(r'([A-I])(\d+)', tasks_str)
|
| 38 |
+
if not matches:
|
| 39 |
+
raise ValueError(f"Invalid task specification: '{tasks_str}'. Expected format like 'A1' or 'A1C1'.")
|
| 40 |
+
|
| 41 |
+
weights = {}
|
| 42 |
+
for task, count_str in matches:
|
| 43 |
+
if task in weights:
|
| 44 |
+
raise ValueError(f"Duplicate task ID: {task}")
|
| 45 |
+
count = int(count_str)
|
| 46 |
+
if count <= 0:
|
| 47 |
+
raise ValueError(f"Task {task} ratio must be positive, got {count}")
|
| 48 |
+
weights[task] = count
|
| 49 |
+
return weights if weights else {default_task: 1}
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
def sample_task(weights, allowed_tasks=None, default_task='A'):
|
| 53 |
+
"""Sample a task ID from a weight dict, respecting an allowed set."""
|
| 54 |
+
allowed_set = set(allowed_tasks) if allowed_tasks else set(weights.keys())
|
| 55 |
+
filtered = {k: v for k, v in weights.items() if k in allowed_set}
|
| 56 |
+
if not filtered:
|
| 57 |
+
filtered = {default_task: weights.get(default_task, 1)}
|
| 58 |
+
|
| 59 |
+
total = sum(filtered.values())
|
| 60 |
+
r = random.uniform(0, total)
|
| 61 |
+
upto = 0
|
| 62 |
+
for task, weight in filtered.items():
|
| 63 |
+
upto += weight
|
| 64 |
+
if upto >= r:
|
| 65 |
+
return task
|
| 66 |
+
return next(iter(filtered))
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
def directions_to_turns(direction_seq, start_orientation='E'):
|
| 70 |
+
"""Convert absolute NESW directions into relative turns (L/R/F/T) assuming starting orientation east."""
|
| 71 |
+
orientation = start_orientation
|
| 72 |
+
turns = []
|
| 73 |
+
left_of = {'N': 'W', 'W': 'S', 'S': 'E', 'E': 'N'}
|
| 74 |
+
right_of = {v: k for k, v in left_of.items()}
|
| 75 |
+
opposite_of = {'N': 'S', 'S': 'N', 'E': 'W', 'W': 'E'}
|
| 76 |
+
|
| 77 |
+
for direction in direction_seq:
|
| 78 |
+
if direction == orientation:
|
| 79 |
+
turn = 'F'
|
| 80 |
+
elif left_of[orientation] == direction:
|
| 81 |
+
turn = 'L'
|
| 82 |
+
elif right_of[orientation] == direction:
|
| 83 |
+
turn = 'R'
|
| 84 |
+
else:
|
| 85 |
+
turn = 'T'
|
| 86 |
+
turns.append(turn)
|
| 87 |
+
orientation = direction
|
| 88 |
+
|
| 89 |
+
return turns
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
def turns_to_directions(turn_seq, start_orientation='E'):
|
| 93 |
+
"""Convert relative turns back to absolute NESW directions."""
|
| 94 |
+
orientation = start_orientation
|
| 95 |
+
directions = []
|
| 96 |
+
left_of = {'N': 'W', 'W': 'S', 'S': 'E', 'E': 'N'}
|
| 97 |
+
right_of = {v: k for k, v in left_of.items()}
|
| 98 |
+
opposite_of = {'N': 'S', 'S': 'N', 'E': 'W', 'W': 'E'}
|
| 99 |
+
|
| 100 |
+
for turn in turn_seq:
|
| 101 |
+
if turn == 'F':
|
| 102 |
+
new_orientation = orientation
|
| 103 |
+
elif turn == 'L':
|
| 104 |
+
new_orientation = left_of[orientation]
|
| 105 |
+
elif turn == 'R':
|
| 106 |
+
new_orientation = right_of[orientation]
|
| 107 |
+
else: # 'T'
|
| 108 |
+
new_orientation = opposite_of[orientation]
|
| 109 |
+
directions.append(new_orientation)
|
| 110 |
+
orientation = new_orientation
|
| 111 |
+
|
| 112 |
+
return directions
|
data/maze/100/maze_A1_RWs_10_0.6.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
+---+---+---+ +---+---+---+---+ +
|
| 2 |
+
c |i |d c |h |h e |a |f |f
|
| 3 |
+
+---+ +---+ +---+ + +---+---+
|
| 4 |
+
c |f |g f b |a j j |d f
|
| 5 |
+
+ + +---+---+---+ +---+---+---+
|
| 6 |
+
|g |h |j j |d |j e |c |b |i
|
| 7 |
+
+---+ +---+ + +---+---+ +---+
|
| 8 |
+
d |d |f e i a |j |c i e
|
| 9 |
+
+ +---+ + + +---+---+---+ +
|
| 10 |
+
b |d |j |d e d e |d |f d
|
| 11 |
+
+---+---+ +---+---+ +---+---+ +
|
| 12 |
+
|g |h |j e f |d |b d |h a
|
| 13 |
+
+ +---+ +---+---+ + + +---+
|
| 14 |
+
|j |g e |f |c |j |d |b |a |f
|
| 15 |
+
+---+---+---+---+---+---+---+---+ +
|
| 16 |
+
h i c |d |j f |e |h f |j
|
| 17 |
+
+ + +---+ + +---+---+---+---+
|
| 18 |
+
a |d e g i |g |f |h |d a
|
| 19 |
+
+---+---+ + +---+ +---+ + +
|
| 20 |
+
c e g d h i i d b a
|
data/maze/100/maze_C1_RWs_10_0.6.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
+ +---+ +---+---+---+---+---+---+
|
| 2 |
+
b |j h h h j f e |f j
|
| 3 |
+
+---+---+---+---+---+---+ + +---+
|
| 4 |
+
f i |a |b |e a |a c |c |f
|
| 5 |
+
+ +---+---+---+---+---+---+---+---+
|
| 6 |
+
|i |d |c |b h |g b |b i |a
|
| 7 |
+
+---+---+---+ + +---+---+ +---+
|
| 8 |
+
|c f c i f |h f |b i c
|
| 9 |
+
+ +---+---+---+---+ + + +---+
|
| 10 |
+
a a j e |g |b |a |a |a |i
|
| 11 |
+
+---+---+---+ +---+---+ +---+---+
|
| 12 |
+
|d g |d |g |i e |a a |e d
|
| 13 |
+
+ +---+---+---+---+---+ + +---+
|
| 14 |
+
b i f a c |f i d |d j
|
| 15 |
+
+---+ +---+---+---+---+---+ + +
|
| 16 |
+
|b |e |j a |d j |g g |a |d
|
| 17 |
+
+---+---+---+---+---+---+ + +---+
|
| 18 |
+
|d |i f d h |g |i c |b |f
|
| 19 |
+
+ + + +---+---+---+---+ +---+
|
| 20 |
+
f d h e g f j h e h
|
data/maze/100/maze_E1_RWs_10_0.6.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
+ +---+---+ +---+---+---+ + +
|
| 2 |
+
|i |e |c |f |a |c i j d e
|
| 3 |
+
+---+---+ +---+---+---+---+ + +
|
| 4 |
+
c g |c |j d j i |i f c
|
| 5 |
+
+---+---+ +---+---+---+---+---+---+
|
| 6 |
+
j |i |b |d |j e |a c |h |g
|
| 7 |
+
+ +---+---+ + +---+---+---+ +
|
| 8 |
+
d |g f b c |f |c |i |b d
|
| 9 |
+
+---+---+---+---+ + + +---+---+
|
| 10 |
+
|i |h f |h |h |h |h |h |j |b
|
| 11 |
+
+---+---+ + +---+---+---+---+---+
|
| 12 |
+
e |e |d |e |f |d j |g |b |e
|
| 13 |
+
+ +---+ + + + +---+---+ +
|
| 14 |
+
|f |a e |e |f g g |h a |j
|
| 15 |
+
+---+---+ +---+ + +---+---+ +
|
| 16 |
+
|h d j f |i f i c |j i
|
| 17 |
+
+---+---+---+ +---+ + + +---+
|
| 18 |
+
|d |b |e |e |e |f |h |g |i |f
|
| 19 |
+
+ +---+ + +---+---+---+---+---+
|
| 20 |
+
d e j j c g b f e b
|
data/maze/100/maze_H1_RWs_10_0.6.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
+ +---+---+---+ + + +---+ +
|
| 2 |
+
e |c g c |h b h |c g |f
|
| 3 |
+
+---+---+---+---+---+ +---+ + +
|
| 4 |
+
|f d f |i c |a |b |c |d e
|
| 5 |
+
+ +---+---+---+---+ +---+---+---+
|
| 6 |
+
|i f |b j |f j |c |h |g b
|
| 7 |
+
+---+ +---+---+---+---+ + +---+
|
| 8 |
+
|e b g |i b |f |j |g |b |j
|
| 9 |
+
+---+ +---+---+---+ +---+---+---+
|
| 10 |
+
a c |g |e e d |j c |b |c
|
| 11 |
+
+---+---+ +---+ + +---+---+---+
|
| 12 |
+
i |e h |b a |a h |j a f
|
| 13 |
+
+ + + +---+ +---+ + +---+
|
| 14 |
+
|c a g j c b e |e d |b
|
| 15 |
+
+---+ +---+---+---+ + +---+ +
|
| 16 |
+
|b f |g d |g |i j |b e |d
|
| 17 |
+
+---+---+---+---+---+---+---+---+---+
|
| 18 |
+
|e |h |e |e i j |b |a |i |d
|
| 19 |
+
+---+---+ +---+---+---+---+ + +
|
| 20 |
+
h c e d b g j b f j
|
data/maze/100/maze_I1_RWs_10_0.6.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
+---+---+---+ +---+---+---+---+ +
|
| 2 |
+
c |i |d c |h |h e |a |f |f
|
| 3 |
+
+---+ +---+ +---+ + +---+---+
|
| 4 |
+
c |f |g f b |a j j |d f
|
| 5 |
+
+ + +---+---+---+ +---+---+---+
|
| 6 |
+
|g |h |j j |d |j e |c |b |i
|
| 7 |
+
+---+ +---+ + +---+---+ +---+
|
| 8 |
+
d |d |f e i a |j |c i e
|
| 9 |
+
+ +---+ + + +---+---+---+ +
|
| 10 |
+
b |d |j |d e d e |d |f d
|
| 11 |
+
+---+---+ +---+---+ +---+---+ +
|
| 12 |
+
|g |h |j e f |d |b d |h a
|
| 13 |
+
+ +---+ +---+---+ + + +---+
|
| 14 |
+
|j |g e |f |c |j |d |b |a |f
|
| 15 |
+
+---+---+---+---+---+---+---+---+ +
|
| 16 |
+
h i c |d |j f |e |h f |j
|
| 17 |
+
+ + +---+ + +---+---+---+---+
|
| 18 |
+
a |d e g i |g |f |h |d a
|
| 19 |
+
+---+---+ + +---+ +---+ + +
|
| 20 |
+
c e g d h i i d b a
|
data/maze/100/maze_graph_A1_RWs.graphml
ADDED
|
@@ -0,0 +1,520 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
|
| 3 |
+
<key id="d0" for="node" attr.name="label" attr.type="string" />
|
| 4 |
+
<graph edgedefault="directed">
|
| 5 |
+
<node id="0">
|
| 6 |
+
<data key="d0">c</data>
|
| 7 |
+
</node>
|
| 8 |
+
<node id="1">
|
| 9 |
+
<data key="d0">i</data>
|
| 10 |
+
</node>
|
| 11 |
+
<node id="2">
|
| 12 |
+
<data key="d0">d</data>
|
| 13 |
+
</node>
|
| 14 |
+
<node id="3">
|
| 15 |
+
<data key="d0">c</data>
|
| 16 |
+
</node>
|
| 17 |
+
<node id="4">
|
| 18 |
+
<data key="d0">h</data>
|
| 19 |
+
</node>
|
| 20 |
+
<node id="5">
|
| 21 |
+
<data key="d0">h</data>
|
| 22 |
+
</node>
|
| 23 |
+
<node id="6">
|
| 24 |
+
<data key="d0">e</data>
|
| 25 |
+
</node>
|
| 26 |
+
<node id="7">
|
| 27 |
+
<data key="d0">a</data>
|
| 28 |
+
</node>
|
| 29 |
+
<node id="8">
|
| 30 |
+
<data key="d0">f</data>
|
| 31 |
+
</node>
|
| 32 |
+
<node id="9">
|
| 33 |
+
<data key="d0">f</data>
|
| 34 |
+
</node>
|
| 35 |
+
<node id="10">
|
| 36 |
+
<data key="d0">c</data>
|
| 37 |
+
</node>
|
| 38 |
+
<node id="11">
|
| 39 |
+
<data key="d0">f</data>
|
| 40 |
+
</node>
|
| 41 |
+
<node id="12">
|
| 42 |
+
<data key="d0">g</data>
|
| 43 |
+
</node>
|
| 44 |
+
<node id="13">
|
| 45 |
+
<data key="d0">f</data>
|
| 46 |
+
</node>
|
| 47 |
+
<node id="14">
|
| 48 |
+
<data key="d0">b</data>
|
| 49 |
+
</node>
|
| 50 |
+
<node id="15">
|
| 51 |
+
<data key="d0">a</data>
|
| 52 |
+
</node>
|
| 53 |
+
<node id="16">
|
| 54 |
+
<data key="d0">j</data>
|
| 55 |
+
</node>
|
| 56 |
+
<node id="17">
|
| 57 |
+
<data key="d0">j</data>
|
| 58 |
+
</node>
|
| 59 |
+
<node id="18">
|
| 60 |
+
<data key="d0">d</data>
|
| 61 |
+
</node>
|
| 62 |
+
<node id="19">
|
| 63 |
+
<data key="d0">f</data>
|
| 64 |
+
</node>
|
| 65 |
+
<node id="20">
|
| 66 |
+
<data key="d0">g</data>
|
| 67 |
+
</node>
|
| 68 |
+
<node id="21">
|
| 69 |
+
<data key="d0">h</data>
|
| 70 |
+
</node>
|
| 71 |
+
<node id="22">
|
| 72 |
+
<data key="d0">j</data>
|
| 73 |
+
</node>
|
| 74 |
+
<node id="23">
|
| 75 |
+
<data key="d0">j</data>
|
| 76 |
+
</node>
|
| 77 |
+
<node id="24">
|
| 78 |
+
<data key="d0">d</data>
|
| 79 |
+
</node>
|
| 80 |
+
<node id="25">
|
| 81 |
+
<data key="d0">j</data>
|
| 82 |
+
</node>
|
| 83 |
+
<node id="26">
|
| 84 |
+
<data key="d0">e</data>
|
| 85 |
+
</node>
|
| 86 |
+
<node id="27">
|
| 87 |
+
<data key="d0">c</data>
|
| 88 |
+
</node>
|
| 89 |
+
<node id="28">
|
| 90 |
+
<data key="d0">b</data>
|
| 91 |
+
</node>
|
| 92 |
+
<node id="29">
|
| 93 |
+
<data key="d0">i</data>
|
| 94 |
+
</node>
|
| 95 |
+
<node id="30">
|
| 96 |
+
<data key="d0">d</data>
|
| 97 |
+
</node>
|
| 98 |
+
<node id="31">
|
| 99 |
+
<data key="d0">d</data>
|
| 100 |
+
</node>
|
| 101 |
+
<node id="32">
|
| 102 |
+
<data key="d0">f</data>
|
| 103 |
+
</node>
|
| 104 |
+
<node id="33">
|
| 105 |
+
<data key="d0">e</data>
|
| 106 |
+
</node>
|
| 107 |
+
<node id="34">
|
| 108 |
+
<data key="d0">i</data>
|
| 109 |
+
</node>
|
| 110 |
+
<node id="35">
|
| 111 |
+
<data key="d0">a</data>
|
| 112 |
+
</node>
|
| 113 |
+
<node id="36">
|
| 114 |
+
<data key="d0">j</data>
|
| 115 |
+
</node>
|
| 116 |
+
<node id="37">
|
| 117 |
+
<data key="d0">c</data>
|
| 118 |
+
</node>
|
| 119 |
+
<node id="38">
|
| 120 |
+
<data key="d0">i</data>
|
| 121 |
+
</node>
|
| 122 |
+
<node id="39">
|
| 123 |
+
<data key="d0">e</data>
|
| 124 |
+
</node>
|
| 125 |
+
<node id="40">
|
| 126 |
+
<data key="d0">b</data>
|
| 127 |
+
</node>
|
| 128 |
+
<node id="41">
|
| 129 |
+
<data key="d0">d</data>
|
| 130 |
+
</node>
|
| 131 |
+
<node id="42">
|
| 132 |
+
<data key="d0">j</data>
|
| 133 |
+
</node>
|
| 134 |
+
<node id="43">
|
| 135 |
+
<data key="d0">d</data>
|
| 136 |
+
</node>
|
| 137 |
+
<node id="44">
|
| 138 |
+
<data key="d0">e</data>
|
| 139 |
+
</node>
|
| 140 |
+
<node id="45">
|
| 141 |
+
<data key="d0">d</data>
|
| 142 |
+
</node>
|
| 143 |
+
<node id="46">
|
| 144 |
+
<data key="d0">e</data>
|
| 145 |
+
</node>
|
| 146 |
+
<node id="47">
|
| 147 |
+
<data key="d0">d</data>
|
| 148 |
+
</node>
|
| 149 |
+
<node id="48">
|
| 150 |
+
<data key="d0">f</data>
|
| 151 |
+
</node>
|
| 152 |
+
<node id="49">
|
| 153 |
+
<data key="d0">d</data>
|
| 154 |
+
</node>
|
| 155 |
+
<node id="50">
|
| 156 |
+
<data key="d0">g</data>
|
| 157 |
+
</node>
|
| 158 |
+
<node id="51">
|
| 159 |
+
<data key="d0">h</data>
|
| 160 |
+
</node>
|
| 161 |
+
<node id="52">
|
| 162 |
+
<data key="d0">j</data>
|
| 163 |
+
</node>
|
| 164 |
+
<node id="53">
|
| 165 |
+
<data key="d0">e</data>
|
| 166 |
+
</node>
|
| 167 |
+
<node id="54">
|
| 168 |
+
<data key="d0">f</data>
|
| 169 |
+
</node>
|
| 170 |
+
<node id="55">
|
| 171 |
+
<data key="d0">d</data>
|
| 172 |
+
</node>
|
| 173 |
+
<node id="56">
|
| 174 |
+
<data key="d0">b</data>
|
| 175 |
+
</node>
|
| 176 |
+
<node id="57">
|
| 177 |
+
<data key="d0">d</data>
|
| 178 |
+
</node>
|
| 179 |
+
<node id="58">
|
| 180 |
+
<data key="d0">h</data>
|
| 181 |
+
</node>
|
| 182 |
+
<node id="59">
|
| 183 |
+
<data key="d0">a</data>
|
| 184 |
+
</node>
|
| 185 |
+
<node id="60">
|
| 186 |
+
<data key="d0">j</data>
|
| 187 |
+
</node>
|
| 188 |
+
<node id="61">
|
| 189 |
+
<data key="d0">g</data>
|
| 190 |
+
</node>
|
| 191 |
+
<node id="62">
|
| 192 |
+
<data key="d0">e</data>
|
| 193 |
+
</node>
|
| 194 |
+
<node id="63">
|
| 195 |
+
<data key="d0">f</data>
|
| 196 |
+
</node>
|
| 197 |
+
<node id="64">
|
| 198 |
+
<data key="d0">c</data>
|
| 199 |
+
</node>
|
| 200 |
+
<node id="65">
|
| 201 |
+
<data key="d0">j</data>
|
| 202 |
+
</node>
|
| 203 |
+
<node id="66">
|
| 204 |
+
<data key="d0">d</data>
|
| 205 |
+
</node>
|
| 206 |
+
<node id="67">
|
| 207 |
+
<data key="d0">b</data>
|
| 208 |
+
</node>
|
| 209 |
+
<node id="68">
|
| 210 |
+
<data key="d0">a</data>
|
| 211 |
+
</node>
|
| 212 |
+
<node id="69">
|
| 213 |
+
<data key="d0">f</data>
|
| 214 |
+
</node>
|
| 215 |
+
<node id="70">
|
| 216 |
+
<data key="d0">h</data>
|
| 217 |
+
</node>
|
| 218 |
+
<node id="71">
|
| 219 |
+
<data key="d0">i</data>
|
| 220 |
+
</node>
|
| 221 |
+
<node id="72">
|
| 222 |
+
<data key="d0">c</data>
|
| 223 |
+
</node>
|
| 224 |
+
<node id="73">
|
| 225 |
+
<data key="d0">d</data>
|
| 226 |
+
</node>
|
| 227 |
+
<node id="74">
|
| 228 |
+
<data key="d0">j</data>
|
| 229 |
+
</node>
|
| 230 |
+
<node id="75">
|
| 231 |
+
<data key="d0">f</data>
|
| 232 |
+
</node>
|
| 233 |
+
<node id="76">
|
| 234 |
+
<data key="d0">e</data>
|
| 235 |
+
</node>
|
| 236 |
+
<node id="77">
|
| 237 |
+
<data key="d0">h</data>
|
| 238 |
+
</node>
|
| 239 |
+
<node id="78">
|
| 240 |
+
<data key="d0">f</data>
|
| 241 |
+
</node>
|
| 242 |
+
<node id="79">
|
| 243 |
+
<data key="d0">j</data>
|
| 244 |
+
</node>
|
| 245 |
+
<node id="80">
|
| 246 |
+
<data key="d0">a</data>
|
| 247 |
+
</node>
|
| 248 |
+
<node id="81">
|
| 249 |
+
<data key="d0">d</data>
|
| 250 |
+
</node>
|
| 251 |
+
<node id="82">
|
| 252 |
+
<data key="d0">e</data>
|
| 253 |
+
</node>
|
| 254 |
+
<node id="83">
|
| 255 |
+
<data key="d0">g</data>
|
| 256 |
+
</node>
|
| 257 |
+
<node id="84">
|
| 258 |
+
<data key="d0">i</data>
|
| 259 |
+
</node>
|
| 260 |
+
<node id="85">
|
| 261 |
+
<data key="d0">g</data>
|
| 262 |
+
</node>
|
| 263 |
+
<node id="86">
|
| 264 |
+
<data key="d0">f</data>
|
| 265 |
+
</node>
|
| 266 |
+
<node id="87">
|
| 267 |
+
<data key="d0">h</data>
|
| 268 |
+
</node>
|
| 269 |
+
<node id="88">
|
| 270 |
+
<data key="d0">d</data>
|
| 271 |
+
</node>
|
| 272 |
+
<node id="89">
|
| 273 |
+
<data key="d0">a</data>
|
| 274 |
+
</node>
|
| 275 |
+
<node id="90">
|
| 276 |
+
<data key="d0">c</data>
|
| 277 |
+
</node>
|
| 278 |
+
<node id="91">
|
| 279 |
+
<data key="d0">e</data>
|
| 280 |
+
</node>
|
| 281 |
+
<node id="92">
|
| 282 |
+
<data key="d0">g</data>
|
| 283 |
+
</node>
|
| 284 |
+
<node id="93">
|
| 285 |
+
<data key="d0">d</data>
|
| 286 |
+
</node>
|
| 287 |
+
<node id="94">
|
| 288 |
+
<data key="d0">h</data>
|
| 289 |
+
</node>
|
| 290 |
+
<node id="95">
|
| 291 |
+
<data key="d0">i</data>
|
| 292 |
+
</node>
|
| 293 |
+
<node id="96">
|
| 294 |
+
<data key="d0">i</data>
|
| 295 |
+
</node>
|
| 296 |
+
<node id="97">
|
| 297 |
+
<data key="d0">d</data>
|
| 298 |
+
</node>
|
| 299 |
+
<node id="98">
|
| 300 |
+
<data key="d0">b</data>
|
| 301 |
+
</node>
|
| 302 |
+
<node id="99">
|
| 303 |
+
<data key="d0">a</data>
|
| 304 |
+
</node>
|
| 305 |
+
<edge source="0" target="1" />
|
| 306 |
+
<edge source="1" target="0" />
|
| 307 |
+
<edge source="1" target="11" />
|
| 308 |
+
<edge source="1" target="2" />
|
| 309 |
+
<edge source="2" target="1" />
|
| 310 |
+
<edge source="2" target="12" />
|
| 311 |
+
<edge source="2" target="3" />
|
| 312 |
+
<edge source="3" target="2" />
|
| 313 |
+
<edge source="4" target="14" />
|
| 314 |
+
<edge source="4" target="5" />
|
| 315 |
+
<edge source="5" target="4" />
|
| 316 |
+
<edge source="5" target="15" />
|
| 317 |
+
<edge source="5" target="6" />
|
| 318 |
+
<edge source="6" target="5" />
|
| 319 |
+
<edge source="6" target="7" />
|
| 320 |
+
<edge source="7" target="6" />
|
| 321 |
+
<edge source="7" target="17" />
|
| 322 |
+
<edge source="7" target="8" />
|
| 323 |
+
<edge source="8" target="7" />
|
| 324 |
+
<edge source="8" target="18" />
|
| 325 |
+
<edge source="9" target="19" />
|
| 326 |
+
<edge source="10" target="11" />
|
| 327 |
+
<edge source="11" target="1" />
|
| 328 |
+
<edge source="11" target="10" />
|
| 329 |
+
<edge source="11" target="21" />
|
| 330 |
+
<edge source="12" target="2" />
|
| 331 |
+
<edge source="12" target="22" />
|
| 332 |
+
<edge source="12" target="13" />
|
| 333 |
+
<edge source="13" target="12" />
|
| 334 |
+
<edge source="14" target="4" />
|
| 335 |
+
<edge source="14" target="15" />
|
| 336 |
+
<edge source="15" target="5" />
|
| 337 |
+
<edge source="15" target="14" />
|
| 338 |
+
<edge source="15" target="25" />
|
| 339 |
+
<edge source="17" target="7" />
|
| 340 |
+
<edge source="17" target="18" />
|
| 341 |
+
<edge source="18" target="8" />
|
| 342 |
+
<edge source="18" target="17" />
|
| 343 |
+
<edge source="18" target="28" />
|
| 344 |
+
<edge source="18" target="19" />
|
| 345 |
+
<edge source="19" target="9" />
|
| 346 |
+
<edge source="19" target="18" />
|
| 347 |
+
<edge source="20" target="30" />
|
| 348 |
+
<edge source="21" target="11" />
|
| 349 |
+
<edge source="21" target="31" />
|
| 350 |
+
<edge source="22" target="12" />
|
| 351 |
+
<edge source="22" target="32" />
|
| 352 |
+
<edge source="22" target="23" />
|
| 353 |
+
<edge source="23" target="22" />
|
| 354 |
+
<edge source="23" target="24" />
|
| 355 |
+
<edge source="24" target="23" />
|
| 356 |
+
<edge source="24" target="34" />
|
| 357 |
+
<edge source="24" target="25" />
|
| 358 |
+
<edge source="25" target="15" />
|
| 359 |
+
<edge source="25" target="24" />
|
| 360 |
+
<edge source="25" target="35" />
|
| 361 |
+
<edge source="26" target="27" />
|
| 362 |
+
<edge source="27" target="26" />
|
| 363 |
+
<edge source="27" target="37" />
|
| 364 |
+
<edge source="27" target="28" />
|
| 365 |
+
<edge source="28" target="18" />
|
| 366 |
+
<edge source="28" target="27" />
|
| 367 |
+
<edge source="28" target="38" />
|
| 368 |
+
<edge source="28" target="29" />
|
| 369 |
+
<edge source="29" target="28" />
|
| 370 |
+
<edge source="29" target="39" />
|
| 371 |
+
<edge source="30" target="20" />
|
| 372 |
+
<edge source="30" target="31" />
|
| 373 |
+
<edge source="31" target="21" />
|
| 374 |
+
<edge source="31" target="30" />
|
| 375 |
+
<edge source="31" target="41" />
|
| 376 |
+
<edge source="32" target="22" />
|
| 377 |
+
<edge source="32" target="42" />
|
| 378 |
+
<edge source="32" target="33" />
|
| 379 |
+
<edge source="33" target="32" />
|
| 380 |
+
<edge source="34" target="24" />
|
| 381 |
+
<edge source="35" target="25" />
|
| 382 |
+
<edge source="35" target="36" />
|
| 383 |
+
<edge source="36" target="35" />
|
| 384 |
+
<edge source="36" target="46" />
|
| 385 |
+
<edge source="36" target="37" />
|
| 386 |
+
<edge source="37" target="27" />
|
| 387 |
+
<edge source="37" target="36" />
|
| 388 |
+
<edge source="37" target="47" />
|
| 389 |
+
<edge source="38" target="28" />
|
| 390 |
+
<edge source="38" target="39" />
|
| 391 |
+
<edge source="39" target="29" />
|
| 392 |
+
<edge source="39" target="38" />
|
| 393 |
+
<edge source="41" target="31" />
|
| 394 |
+
<edge source="41" target="51" />
|
| 395 |
+
<edge source="41" target="42" />
|
| 396 |
+
<edge source="42" target="32" />
|
| 397 |
+
<edge source="42" target="41" />
|
| 398 |
+
<edge source="42" target="52" />
|
| 399 |
+
<edge source="43" target="53" />
|
| 400 |
+
<edge source="45" target="46" />
|
| 401 |
+
<edge source="46" target="36" />
|
| 402 |
+
<edge source="46" target="45" />
|
| 403 |
+
<edge source="46" target="47" />
|
| 404 |
+
<edge source="47" target="37" />
|
| 405 |
+
<edge source="47" target="46" />
|
| 406 |
+
<edge source="47" target="57" />
|
| 407 |
+
<edge source="47" target="48" />
|
| 408 |
+
<edge source="48" target="47" />
|
| 409 |
+
<edge source="48" target="58" />
|
| 410 |
+
<edge source="50" target="60" />
|
| 411 |
+
<edge source="50" target="51" />
|
| 412 |
+
<edge source="51" target="41" />
|
| 413 |
+
<edge source="51" target="50" />
|
| 414 |
+
<edge source="51" target="61" />
|
| 415 |
+
<edge source="51" target="52" />
|
| 416 |
+
<edge source="52" target="42" />
|
| 417 |
+
<edge source="52" target="51" />
|
| 418 |
+
<edge source="52" target="62" />
|
| 419 |
+
<edge source="53" target="43" />
|
| 420 |
+
<edge source="53" target="54" />
|
| 421 |
+
<edge source="54" target="53" />
|
| 422 |
+
<edge source="54" target="55" />
|
| 423 |
+
<edge source="55" target="54" />
|
| 424 |
+
<edge source="55" target="65" />
|
| 425 |
+
<edge source="56" target="66" />
|
| 426 |
+
<edge source="56" target="57" />
|
| 427 |
+
<edge source="57" target="47" />
|
| 428 |
+
<edge source="57" target="56" />
|
| 429 |
+
<edge source="57" target="58" />
|
| 430 |
+
<edge source="58" target="48" />
|
| 431 |
+
<edge source="58" target="57" />
|
| 432 |
+
<edge source="58" target="68" />
|
| 433 |
+
<edge source="60" target="50" />
|
| 434 |
+
<edge source="60" target="70" />
|
| 435 |
+
<edge source="61" target="51" />
|
| 436 |
+
<edge source="61" target="71" />
|
| 437 |
+
<edge source="61" target="62" />
|
| 438 |
+
<edge source="62" target="52" />
|
| 439 |
+
<edge source="62" target="61" />
|
| 440 |
+
<edge source="63" target="73" />
|
| 441 |
+
<edge source="63" target="64" />
|
| 442 |
+
<edge source="64" target="63" />
|
| 443 |
+
<edge source="64" target="74" />
|
| 444 |
+
<edge source="64" target="65" />
|
| 445 |
+
<edge source="65" target="55" />
|
| 446 |
+
<edge source="65" target="64" />
|
| 447 |
+
<edge source="65" target="75" />
|
| 448 |
+
<edge source="66" target="56" />
|
| 449 |
+
<edge source="66" target="76" />
|
| 450 |
+
<edge source="67" target="77" />
|
| 451 |
+
<edge source="68" target="58" />
|
| 452 |
+
<edge source="68" target="78" />
|
| 453 |
+
<edge source="68" target="69" />
|
| 454 |
+
<edge source="69" target="68" />
|
| 455 |
+
<edge source="69" target="79" />
|
| 456 |
+
<edge source="70" target="60" />
|
| 457 |
+
<edge source="70" target="71" />
|
| 458 |
+
<edge source="71" target="61" />
|
| 459 |
+
<edge source="71" target="70" />
|
| 460 |
+
<edge source="71" target="72" />
|
| 461 |
+
<edge source="72" target="71" />
|
| 462 |
+
<edge source="72" target="73" />
|
| 463 |
+
<edge source="73" target="63" />
|
| 464 |
+
<edge source="73" target="72" />
|
| 465 |
+
<edge source="73" target="83" />
|
| 466 |
+
<edge source="73" target="74" />
|
| 467 |
+
<edge source="74" target="64" />
|
| 468 |
+
<edge source="74" target="73" />
|
| 469 |
+
<edge source="74" target="84" />
|
| 470 |
+
<edge source="74" target="75" />
|
| 471 |
+
<edge source="75" target="65" />
|
| 472 |
+
<edge source="75" target="74" />
|
| 473 |
+
<edge source="75" target="76" />
|
| 474 |
+
<edge source="76" target="66" />
|
| 475 |
+
<edge source="76" target="75" />
|
| 476 |
+
<edge source="76" target="86" />
|
| 477 |
+
<edge source="76" target="77" />
|
| 478 |
+
<edge source="77" target="67" />
|
| 479 |
+
<edge source="77" target="76" />
|
| 480 |
+
<edge source="77" target="87" />
|
| 481 |
+
<edge source="77" target="78" />
|
| 482 |
+
<edge source="78" target="68" />
|
| 483 |
+
<edge source="78" target="77" />
|
| 484 |
+
<edge source="79" target="69" />
|
| 485 |
+
<edge source="79" target="89" />
|
| 486 |
+
<edge source="81" target="91" />
|
| 487 |
+
<edge source="82" target="83" />
|
| 488 |
+
<edge source="83" target="73" />
|
| 489 |
+
<edge source="83" target="82" />
|
| 490 |
+
<edge source="84" target="74" />
|
| 491 |
+
<edge source="85" target="95" />
|
| 492 |
+
<edge source="85" target="86" />
|
| 493 |
+
<edge source="86" target="76" />
|
| 494 |
+
<edge source="86" target="85" />
|
| 495 |
+
<edge source="86" target="96" />
|
| 496 |
+
<edge source="86" target="87" />
|
| 497 |
+
<edge source="87" target="77" />
|
| 498 |
+
<edge source="87" target="86" />
|
| 499 |
+
<edge source="87" target="97" />
|
| 500 |
+
<edge source="87" target="88" />
|
| 501 |
+
<edge source="88" target="87" />
|
| 502 |
+
<edge source="88" target="98" />
|
| 503 |
+
<edge source="88" target="89" />
|
| 504 |
+
<edge source="89" target="79" />
|
| 505 |
+
<edge source="89" target="88" />
|
| 506 |
+
<edge source="90" target="91" />
|
| 507 |
+
<edge source="91" target="81" />
|
| 508 |
+
<edge source="91" target="90" />
|
| 509 |
+
<edge source="91" target="92" />
|
| 510 |
+
<edge source="92" target="91" />
|
| 511 |
+
<edge source="94" target="95" />
|
| 512 |
+
<edge source="95" target="85" />
|
| 513 |
+
<edge source="95" target="94" />
|
| 514 |
+
<edge source="96" target="86" />
|
| 515 |
+
<edge source="96" target="97" />
|
| 516 |
+
<edge source="97" target="87" />
|
| 517 |
+
<edge source="97" target="96" />
|
| 518 |
+
<edge source="98" target="88" />
|
| 519 |
+
</graph>
|
| 520 |
+
</graphml>
|
data/maze/100/maze_graph_C1_RWs.graphml
ADDED
|
@@ -0,0 +1,524 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version='1.0' encoding='utf-8'?>
|
| 2 |
+
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
|
| 3 |
+
<key id="d0" for="node" attr.name="label" attr.type="string" />
|
| 4 |
+
<graph edgedefault="directed">
|
| 5 |
+
<node id="0">
|
| 6 |
+
<data key="d0">b</data>
|
| 7 |
+
</node>
|
| 8 |
+
<node id="1">
|
| 9 |
+
<data key="d0">j</data>
|
| 10 |
+
</node>
|
| 11 |
+
<node id="2">
|
| 12 |
+
<data key="d0">h</data>
|
| 13 |
+
</node>
|
| 14 |
+
<node id="3">
|
| 15 |
+
<data key="d0">h</data>
|
| 16 |
+
</node>
|
| 17 |
+
<node id="4">
|
| 18 |
+
<data key="d0">h</data>
|
| 19 |
+
</node>
|
| 20 |
+
<node id="5">
|
| 21 |
+
<data key="d0">j</data>
|
| 22 |
+
</node>
|
| 23 |
+
<node id="6">
|
| 24 |
+
<data key="d0">f</data>
|
| 25 |
+
</node>
|
| 26 |
+
<node id="7">
|
| 27 |
+
<data key="d0">e</data>
|
| 28 |
+
</node>
|
| 29 |
+
<node id="8">
|
| 30 |
+
<data key="d0">f</data>
|
| 31 |
+
</node>
|
| 32 |
+
<node id="9">
|
| 33 |
+
<data key="d0">j</data>
|
| 34 |
+
</node>
|
| 35 |
+
<node id="10">
|
| 36 |
+
<data key="d0">f</data>
|
| 37 |
+
</node>
|
| 38 |
+
<node id="11">
|
| 39 |
+
<data key="d0">i</data>
|
| 40 |
+
</node>
|
| 41 |
+
<node id="12">
|
| 42 |
+
<data key="d0">a</data>
|
| 43 |
+
</node>
|
| 44 |
+
<node id="13">
|
| 45 |
+
<data key="d0">b</data>
|
| 46 |
+
</node>
|
| 47 |
+
<node id="14">
|
| 48 |
+
<data key="d0">e</data>
|
| 49 |
+
</node>
|
| 50 |
+
<node id="15">
|
| 51 |
+
<data key="d0">a</data>
|
| 52 |
+
</node>
|
| 53 |
+
<node id="16">
|
| 54 |
+
<data key="d0">a</data>
|
| 55 |
+
</node>
|
| 56 |
+
<node id="17">
|
| 57 |
+
<data key="d0">c</data>
|
| 58 |
+
</node>
|
| 59 |
+
<node id="18">
|
| 60 |
+
<data key="d0">c</data>
|
| 61 |
+
</node>
|
| 62 |
+
<node id="19">
|
| 63 |
+
<data key="d0">f</data>
|
| 64 |
+
</node>
|
| 65 |
+
<node id="20">
|
| 66 |
+
<data key="d0">i</data>
|
| 67 |
+
</node>
|
| 68 |
+
<node id="21">
|
| 69 |
+
<data key="d0">d</data>
|
| 70 |
+
</node>
|
| 71 |
+
<node id="22">
|
| 72 |
+
<data key="d0">c</data>
|
| 73 |
+
</node>
|
| 74 |
+
<node id="23">
|
| 75 |
+
<data key="d0">b</data>
|
| 76 |
+
</node>
|
| 77 |
+
<node id="24">
|
| 78 |
+
<data key="d0">h</data>
|
| 79 |
+
</node>
|
| 80 |
+
<node id="25">
|
| 81 |
+
<data key="d0">g</data>
|
| 82 |
+
</node>
|
| 83 |
+
<node id="26">
|
| 84 |
+
<data key="d0">b</data>
|
| 85 |
+
</node>
|
| 86 |
+
<node id="27">
|
| 87 |
+
<data key="d0">b</data>
|
| 88 |
+
</node>
|
| 89 |
+
<node id="28">
|
| 90 |
+
<data key="d0">i</data>
|
| 91 |
+
</node>
|
| 92 |
+
<node id="29">
|
| 93 |
+
<data key="d0">a</data>
|
| 94 |
+
</node>
|
| 95 |
+
<node id="30">
|
| 96 |
+
<data key="d0">c</data>
|
| 97 |
+
</node>
|
| 98 |
+
<node id="31">
|
| 99 |
+
<data key="d0">f</data>
|
| 100 |
+
</node>
|
| 101 |
+
<node id="32">
|
| 102 |
+
<data key="d0">c</data>
|
| 103 |
+
</node>
|
| 104 |
+
<node id="33">
|
| 105 |
+
<data key="d0">i</data>
|
| 106 |
+
</node>
|
| 107 |
+
<node id="34">
|
| 108 |
+
<data key="d0">f</data>
|
| 109 |
+
</node>
|
| 110 |
+
<node id="35">
|
| 111 |
+
<data key="d0">h</data>
|
| 112 |
+
</node>
|
| 113 |
+
<node id="36">
|
| 114 |
+
<data key="d0">f</data>
|
| 115 |
+
</node>
|
| 116 |
+
<node id="37">
|
| 117 |
+
<data key="d0">b</data>
|
| 118 |
+
</node>
|
| 119 |
+
<node id="38">
|
| 120 |
+
<data key="d0">i</data>
|
| 121 |
+
</node>
|
| 122 |
+
<node id="39">
|
| 123 |
+
<data key="d0">c</data>
|
| 124 |
+
</node>
|
| 125 |
+
<node id="40">
|
| 126 |
+
<data key="d0">a</data>
|
| 127 |
+
</node>
|
| 128 |
+
<node id="41">
|
| 129 |
+
<data key="d0">a</data>
|
| 130 |
+
</node>
|
| 131 |
+
<node id="42">
|
| 132 |
+
<data key="d0">j</data>
|
| 133 |
+
</node>
|
| 134 |
+
<node id="43">
|
| 135 |
+
<data key="d0">e</data>
|
| 136 |
+
</node>
|
| 137 |
+
<node id="44">
|
| 138 |
+
<data key="d0">g</data>
|
| 139 |
+
</node>
|
| 140 |
+
<node id="45">
|
| 141 |
+
<data key="d0">b</data>
|
| 142 |
+
</node>
|
| 143 |
+
<node id="46">
|
| 144 |
+
<data key="d0">a</data>
|
| 145 |
+
</node>
|
| 146 |
+
<node id="47">
|
| 147 |
+
<data key="d0">a</data>
|
| 148 |
+
</node>
|
| 149 |
+
<node id="48">
|
| 150 |
+
<data key="d0">a</data>
|
| 151 |
+
</node>
|
| 152 |
+
<node id="49">
|
| 153 |
+
<data key="d0">i</data>
|
| 154 |
+
</node>
|
| 155 |
+
<node id="50">
|
| 156 |
+
<data key="d0">d</data>
|
| 157 |
+
</node>
|
| 158 |
+
<node id="51">
|
| 159 |
+
<data key="d0">g</data>
|
| 160 |
+
</node>
|
| 161 |
+
<node id="52">
|
| 162 |
+
<data key="d0">d</data>
|
| 163 |
+
</node>
|
| 164 |
+
<node id="53">
|
| 165 |
+
<data key="d0">g</data>
|
| 166 |
+
</node>
|
| 167 |
+
<node id="54">
|
| 168 |
+
<data key="d0">i</data>
|
| 169 |
+
</node>
|
| 170 |
+
<node id="55">
|
| 171 |
+
<data key="d0">e</data>
|
| 172 |
+
</node>
|
| 173 |
+
<node id="56">
|
| 174 |
+
<data key="d0">a</data>
|
| 175 |
+
</node>
|
| 176 |
+
<node id="57">
|
| 177 |
+
<data key="d0">a</data>
|
| 178 |
+
</node>
|
| 179 |
+
<node id="58">
|
| 180 |
+
<data key="d0">e</data>
|
| 181 |
+
</node>
|
| 182 |
+
<node id="59">
|
| 183 |
+
<data key="d0">d</data>
|
| 184 |
+
</node>
|
| 185 |
+
<node id="60">
|
| 186 |
+
<data key="d0">b</data>
|
| 187 |
+
</node>
|
| 188 |
+
<node id="61">
|
| 189 |
+
<data key="d0">i</data>
|
| 190 |
+
</node>
|
| 191 |
+
<node id="62">
|
| 192 |
+
<data key="d0">f</data>
|
| 193 |
+
</node>
|
| 194 |
+
<node id="63">
|
| 195 |
+
<data key="d0">a</data>
|
| 196 |
+
</node>
|
| 197 |
+
<node id="64">
|
| 198 |
+
<data key="d0">c</data>
|
| 199 |
+
</node>
|
| 200 |
+
<node id="65">
|
| 201 |
+
<data key="d0">f</data>
|
| 202 |
+
</node>
|
| 203 |
+
<node id="66">
|
| 204 |
+
<data key="d0">i</data>
|
| 205 |
+
</node>
|
| 206 |
+
<node id="67">
|
| 207 |
+
<data key="d0">d</data>
|
| 208 |
+
</node>
|
| 209 |
+
<node id="68">
|
| 210 |
+
<data key="d0">d</data>
|
| 211 |
+
</node>
|
| 212 |
+
<node id="69">
|
| 213 |
+
<data key="d0">j</data>
|
| 214 |
+
</node>
|
| 215 |
+
<node id="70">
|
| 216 |
+
<data key="d0">b</data>
|
| 217 |
+
</node>
|
| 218 |
+
<node id="71">
|
| 219 |
+
<data key="d0">e</data>
|
| 220 |
+
</node>
|
| 221 |
+
<node id="72">
|
| 222 |
+
<data key="d0">j</data>
|
| 223 |
+
</node>
|
| 224 |
+
<node id="73">
|
| 225 |
+
<data key="d0">a</data>
|
| 226 |
+
</node>
|
| 227 |
+
<node id="74">
|
| 228 |
+
<data key="d0">d</data>
|
| 229 |
+
</node>
|
| 230 |
+
<node id="75">
|
| 231 |
+
<data key="d0">j</data>
|
| 232 |
+
</node>
|
| 233 |
+
<node id="76">
|
| 234 |
+
<data key="d0">g</data>
|
| 235 |
+
</node>
|
| 236 |
+
<node id="77">
|
| 237 |
+
<data key="d0">g</data>
|
| 238 |
+
</node>
|
| 239 |
+
<node id="78">
|
| 240 |
+
<data key="d0">a</data>
|
| 241 |
+
</node>
|
| 242 |
+
<node id="79">
|
| 243 |
+
<data key="d0">d</data>
|
| 244 |
+
</node>
|
| 245 |
+
<node id="80">
|
| 246 |
+
<data key="d0">d</data>
|
| 247 |
+
</node>
|
| 248 |
+
<node id="81">
|
| 249 |
+
<data key="d0">i</data>
|
| 250 |
+
</node>
|
| 251 |
+
<node id="82">
|
| 252 |
+
<data key="d0">f</data>
|
| 253 |
+
</node>
|
| 254 |
+
<node id="83">
|
| 255 |
+
<data key="d0">d</data>
|
| 256 |
+
</node>
|
| 257 |
+
<node id="84">
|
| 258 |
+
<data key="d0">h</data>
|
| 259 |
+
</node>
|
| 260 |
+
<node id="85">
|
| 261 |
+
<data key="d0">g</data>
|
| 262 |
+
</node>
|
| 263 |
+
<node id="86">
|
| 264 |
+
<data key="d0">i</data>
|
| 265 |
+
</node>
|
| 266 |
+
<node id="87">
|
| 267 |
+
<data key="d0">c</data>
|
| 268 |
+
</node>
|
| 269 |
+
<node id="88">
|
| 270 |
+
<data key="d0">b</data>
|
| 271 |
+
</node>
|
| 272 |
+
<node id="89">
|
| 273 |
+
<data key="d0">f</data>
|
| 274 |
+
</node>
|
| 275 |
+
<node id="90">
|
| 276 |
+
<data key="d0">f</data>
|
| 277 |
+
</node>
|
| 278 |
+
<node id="91">
|
| 279 |
+
<data key="d0">d</data>
|
| 280 |
+
</node>
|
| 281 |
+
<node id="92">
|
| 282 |
+
<data key="d0">h</data>
|
| 283 |
+
</node>
|
| 284 |
+
<node id="93">
|
| 285 |
+
<data key="d0">e</data>
|
| 286 |
+
</node>
|
| 287 |
+
<node id="94">
|
| 288 |
+
<data key="d0">g</data>
|
| 289 |
+
</node>
|
| 290 |
+
<node id="95">
|
| 291 |
+
<data key="d0">f</data>
|
| 292 |
+
</node>
|
| 293 |
+
<node id="96">
|
| 294 |
+
<data key="d0">j</data>
|
| 295 |
+
</node>
|
| 296 |
+
<node id="97">
|
| 297 |
+
<data key="d0">h</data>
|
| 298 |
+
</node>
|
| 299 |
+
<node id="98">
|
| 300 |
+
<data key="d0">e</data>
|
| 301 |
+
</node>
|
| 302 |
+
<node id="99">
|
| 303 |
+
<data key="d0">h</data>
|
| 304 |
+
</node>
|
| 305 |
+
<edge source="1" target="11" />
|
| 306 |
+
<edge source="1" target="2" />
|
| 307 |
+
<edge source="2" target="1" />
|
| 308 |
+
<edge source="3" target="4" />
|
| 309 |
+
<edge source="4" target="3" />
|
| 310 |
+
<edge source="4" target="5" />
|
| 311 |
+
<edge source="5" target="4" />
|
| 312 |
+
<edge source="5" target="6" />
|
| 313 |
+
<edge source="6" target="5" />
|
| 314 |
+
<edge source="6" target="7" />
|
| 315 |
+
<edge source="7" target="6" />
|
| 316 |
+
<edge source="7" target="8" />
|
| 317 |
+
<edge source="8" target="7" />
|
| 318 |
+
<edge source="8" target="18" />
|
| 319 |
+
<edge source="8" target="9" />
|
| 320 |
+
<edge source="9" target="8" />
|
| 321 |
+
<edge source="10" target="11" />
|
| 322 |
+
<edge source="11" target="1" />
|
| 323 |
+
<edge source="11" target="10" />
|
| 324 |
+
<edge source="11" target="12" />
|
| 325 |
+
<edge source="12" target="11" />
|
| 326 |
+
<edge source="12" target="22" />
|
| 327 |
+
<edge source="12" target="13" />
|
| 328 |
+
<edge source="13" target="12" />
|
| 329 |
+
<edge source="13" target="23" />
|
| 330 |
+
<edge source="13" target="14" />
|
| 331 |
+
<edge source="14" target="13" />
|
| 332 |
+
<edge source="14" target="24" />
|
| 333 |
+
<edge source="14" target="15" />
|
| 334 |
+
<edge source="15" target="14" />
|
| 335 |
+
<edge source="15" target="16" />
|
| 336 |
+
<edge source="16" target="15" />
|
| 337 |
+
<edge source="16" target="26" />
|
| 338 |
+
<edge source="18" target="8" />
|
| 339 |
+
<edge source="18" target="28" />
|
| 340 |
+
<edge source="18" target="19" />
|
| 341 |
+
<edge source="19" target="18" />
|
| 342 |
+
<edge source="19" target="29" />
|
| 343 |
+
<edge source="20" target="30" />
|
| 344 |
+
<edge source="21" target="31" />
|
| 345 |
+
<edge source="21" target="22" />
|
| 346 |
+
<edge source="22" target="12" />
|
| 347 |
+
<edge source="22" target="21" />
|
| 348 |
+
<edge source="22" target="32" />
|
| 349 |
+
<edge source="22" target="23" />
|
| 350 |
+
<edge source="23" target="13" />
|
| 351 |
+
<edge source="23" target="22" />
|
| 352 |
+
<edge source="23" target="33" />
|
| 353 |
+
<edge source="23" target="24" />
|
| 354 |
+
<edge source="24" target="14" />
|
| 355 |
+
<edge source="24" target="23" />
|
| 356 |
+
<edge source="24" target="25" />
|
| 357 |
+
<edge source="25" target="24" />
|
| 358 |
+
<edge source="25" target="35" />
|
| 359 |
+
<edge source="25" target="26" />
|
| 360 |
+
<edge source="26" target="16" />
|
| 361 |
+
<edge source="26" target="25" />
|
| 362 |
+
<edge source="26" target="27" />
|
| 363 |
+
<edge source="27" target="26" />
|
| 364 |
+
<edge source="27" target="37" />
|
| 365 |
+
<edge source="27" target="28" />
|
| 366 |
+
<edge source="28" target="18" />
|
| 367 |
+
<edge source="28" target="27" />
|
| 368 |
+
<edge source="28" target="29" />
|
| 369 |
+
<edge source="29" target="19" />
|
| 370 |
+
<edge source="29" target="28" />
|
| 371 |
+
<edge source="29" target="39" />
|
| 372 |
+
<edge source="30" target="20" />
|
| 373 |
+
<edge source="30" target="40" />
|
| 374 |
+
<edge source="30" target="31" />
|
| 375 |
+
<edge source="31" target="21" />
|
| 376 |
+
<edge source="31" target="30" />
|
| 377 |
+
<edge source="31" target="32" />
|
| 378 |
+
<edge source="32" target="22" />
|
| 379 |
+
<edge source="32" target="31" />
|
| 380 |
+
<edge source="32" target="33" />
|
| 381 |
+
<edge source="33" target="23" />
|
| 382 |
+
<edge source="33" target="32" />
|
| 383 |
+
<edge source="35" target="25" />
|
| 384 |
+
<edge source="35" target="45" />
|
| 385 |
+
<edge source="35" target="36" />
|
| 386 |
+
<edge source="36" target="35" />
|
| 387 |
+
<edge source="36" target="37" />
|
| 388 |
+
<edge source="37" target="27" />
|
| 389 |
+
<edge source="37" target="36" />
|
| 390 |
+
<edge source="37" target="47" />
|
| 391 |
+
<edge source="38" target="39" />
|
| 392 |
+
<edge source="39" target="29" />
|
| 393 |
+
<edge source="39" target="38" />
|
| 394 |
+
<edge source="40" target="30" />
|
| 395 |
+
<edge source="41" target="42" />
|
| 396 |
+
<edge source="42" target="41" />
|
| 397 |
+
<edge source="42" target="43" />
|
| 398 |
+
<edge source="43" target="42" />
|
| 399 |
+
<edge source="43" target="44" />
|
| 400 |
+
<edge source="44" target="43" />
|
| 401 |
+
<edge source="44" target="54" />
|
| 402 |
+
<edge source="44" target="45" />
|
| 403 |
+
<edge source="45" target="35" />
|
| 404 |
+
<edge source="45" target="44" />
|
| 405 |
+
<edge source="45" target="55" />
|
| 406 |
+
<edge source="46" target="56" />
|
| 407 |
+
<edge source="47" target="37" />
|
| 408 |
+
<edge source="47" target="57" />
|
| 409 |
+
<edge source="48" target="58" />
|
| 410 |
+
<edge source="48" target="49" />
|
| 411 |
+
<edge source="49" target="48" />
|
| 412 |
+
<edge source="49" target="59" />
|
| 413 |
+
<edge source="50" target="60" />
|
| 414 |
+
<edge source="50" target="51" />
|
| 415 |
+
<edge source="51" target="50" />
|
| 416 |
+
<edge source="51" target="52" />
|
| 417 |
+
<edge source="52" target="51" />
|
| 418 |
+
<edge source="52" target="62" />
|
| 419 |
+
<edge source="52" target="53" />
|
| 420 |
+
<edge source="53" target="52" />
|
| 421 |
+
<edge source="53" target="63" />
|
| 422 |
+
<edge source="54" target="44" />
|
| 423 |
+
<edge source="54" target="64" />
|
| 424 |
+
<edge source="54" target="55" />
|
| 425 |
+
<edge source="55" target="45" />
|
| 426 |
+
<edge source="55" target="54" />
|
| 427 |
+
<edge source="55" target="56" />
|
| 428 |
+
<edge source="56" target="46" />
|
| 429 |
+
<edge source="56" target="55" />
|
| 430 |
+
<edge source="56" target="66" />
|
| 431 |
+
<edge source="57" target="47" />
|
| 432 |
+
<edge source="57" target="58" />
|
| 433 |
+
<edge source="58" target="48" />
|
| 434 |
+
<edge source="58" target="57" />
|
| 435 |
+
<edge source="58" target="68" />
|
| 436 |
+
<edge source="58" target="59" />
|
| 437 |
+
<edge source="59" target="49" />
|
| 438 |
+
<edge source="59" target="58" />
|
| 439 |
+
<edge source="60" target="50" />
|
| 440 |
+
<edge source="61" target="62" />
|
| 441 |
+
<edge source="62" target="52" />
|
| 442 |
+
<edge source="62" target="61" />
|
| 443 |
+
<edge source="62" target="63" />
|
| 444 |
+
<edge source="63" target="53" />
|
| 445 |
+
<edge source="63" target="62" />
|
| 446 |
+
<edge source="63" target="64" />
|
| 447 |
+
<edge source="64" target="54" />
|
| 448 |
+
<edge source="64" target="63" />
|
| 449 |
+
<edge source="64" target="65" />
|
| 450 |
+
<edge source="65" target="64" />
|
| 451 |
+
<edge source="65" target="75" />
|
| 452 |
+
<edge source="65" target="66" />
|
| 453 |
+
<edge source="66" target="56" />
|
| 454 |
+
<edge source="66" target="65" />
|
| 455 |
+
<edge source="68" target="58" />
|
| 456 |
+
<edge source="68" target="78" />
|
| 457 |
+
<edge source="68" target="69" />
|
| 458 |
+
<edge source="69" target="68" />
|
| 459 |
+
<edge source="70" target="80" />
|
| 460 |
+
<edge source="70" target="71" />
|
| 461 |
+
<edge source="71" target="70" />
|
| 462 |
+
<edge source="71" target="81" />
|
| 463 |
+
<edge source="72" target="82" />
|
| 464 |
+
<edge source="72" target="73" />
|
| 465 |
+
<edge source="73" target="72" />
|
| 466 |
+
<edge source="73" target="74" />
|
| 467 |
+
<edge source="74" target="73" />
|
| 468 |
+
<edge source="74" target="84" />
|
| 469 |
+
<edge source="74" target="75" />
|
| 470 |
+
<edge source="75" target="65" />
|
| 471 |
+
<edge source="75" target="74" />
|
| 472 |
+
<edge source="75" target="76" />
|
| 473 |
+
<edge source="76" target="75" />
|
| 474 |
+
<edge source="76" target="86" />
|
| 475 |
+
<edge source="76" target="77" />
|
| 476 |
+
<edge source="77" target="76" />
|
| 477 |
+
<edge source="78" target="68" />
|
| 478 |
+
<edge source="78" target="88" />
|
| 479 |
+
<edge source="79" target="89" />
|
| 480 |
+
<edge source="80" target="70" />
|
| 481 |
+
<edge source="80" target="90" />
|
| 482 |
+
<edge source="80" target="81" />
|
| 483 |
+
<edge source="81" target="71" />
|
| 484 |
+
<edge source="81" target="80" />
|
| 485 |
+
<edge source="81" target="91" />
|
| 486 |
+
<edge source="81" target="82" />
|
| 487 |
+
<edge source="82" target="72" />
|
| 488 |
+
<edge source="82" target="81" />
|
| 489 |
+
<edge source="82" target="83" />
|
| 490 |
+
<edge source="83" target="82" />
|
| 491 |
+
<edge source="83" target="84" />
|
| 492 |
+
<edge source="84" target="74" />
|
| 493 |
+
<edge source="84" target="83" />
|
| 494 |
+
<edge source="84" target="85" />
|
| 495 |
+
<edge source="85" target="84" />
|
| 496 |
+
<edge source="85" target="95" />
|
| 497 |
+
<edge source="85" target="86" />
|
| 498 |
+
<edge source="86" target="76" />
|
| 499 |
+
<edge source="86" target="85" />
|
| 500 |
+
<edge source="86" target="96" />
|
| 501 |
+
<edge source="88" target="78" />
|
| 502 |
+
<edge source="88" target="98" />
|
| 503 |
+
<edge source="88" target="89" />
|
| 504 |
+
<edge source="89" target="79" />
|
| 505 |
+
<edge source="89" target="88" />
|
| 506 |
+
<edge source="89" target="99" />
|
| 507 |
+
<edge source="90" target="80" />
|
| 508 |
+
<edge source="91" target="81" />
|
| 509 |
+
<edge source="93" target="94" />
|
| 510 |
+
<edge source="94" target="93" />
|
| 511 |
+
<edge source="94" target="95" />
|
| 512 |
+
<edge source="95" target="85" />
|
| 513 |
+
<edge source="95" target="94" />
|
| 514 |
+
<edge source="95" target="96" />
|
| 515 |
+
<edge source="96" target="86" />
|
| 516 |
+
<edge source="96" target="95" />
|
| 517 |
+
<edge source="96" target="97" />
|
| 518 |
+
<edge source="97" target="96" />
|
| 519 |
+
<edge source="98" target="88" />
|
| 520 |
+
<edge source="98" target="99" />
|
| 521 |
+
<edge source="99" target="89" />
|
| 522 |
+
<edge source="99" target="98" />
|
| 523 |
+
</graph>
|
| 524 |
+
</graphml>
|
data/maze/100/maze_graph_E1_RWs.graphml
ADDED
|
@@ -0,0 +1,532 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version='1.0' encoding='utf-8'?>
|
| 2 |
+
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
|
| 3 |
+
<key id="d0" for="node" attr.name="label" attr.type="string" />
|
| 4 |
+
<graph edgedefault="directed">
|
| 5 |
+
<node id="0">
|
| 6 |
+
<data key="d0">i</data>
|
| 7 |
+
</node>
|
| 8 |
+
<node id="1">
|
| 9 |
+
<data key="d0">e</data>
|
| 10 |
+
</node>
|
| 11 |
+
<node id="2">
|
| 12 |
+
<data key="d0">c</data>
|
| 13 |
+
</node>
|
| 14 |
+
<node id="3">
|
| 15 |
+
<data key="d0">f</data>
|
| 16 |
+
</node>
|
| 17 |
+
<node id="4">
|
| 18 |
+
<data key="d0">a</data>
|
| 19 |
+
</node>
|
| 20 |
+
<node id="5">
|
| 21 |
+
<data key="d0">c</data>
|
| 22 |
+
</node>
|
| 23 |
+
<node id="6">
|
| 24 |
+
<data key="d0">i</data>
|
| 25 |
+
</node>
|
| 26 |
+
<node id="7">
|
| 27 |
+
<data key="d0">j</data>
|
| 28 |
+
</node>
|
| 29 |
+
<node id="8">
|
| 30 |
+
<data key="d0">d</data>
|
| 31 |
+
</node>
|
| 32 |
+
<node id="9">
|
| 33 |
+
<data key="d0">e</data>
|
| 34 |
+
</node>
|
| 35 |
+
<node id="10">
|
| 36 |
+
<data key="d0">c</data>
|
| 37 |
+
</node>
|
| 38 |
+
<node id="11">
|
| 39 |
+
<data key="d0">g</data>
|
| 40 |
+
</node>
|
| 41 |
+
<node id="12">
|
| 42 |
+
<data key="d0">c</data>
|
| 43 |
+
</node>
|
| 44 |
+
<node id="13">
|
| 45 |
+
<data key="d0">j</data>
|
| 46 |
+
</node>
|
| 47 |
+
<node id="14">
|
| 48 |
+
<data key="d0">d</data>
|
| 49 |
+
</node>
|
| 50 |
+
<node id="15">
|
| 51 |
+
<data key="d0">j</data>
|
| 52 |
+
</node>
|
| 53 |
+
<node id="16">
|
| 54 |
+
<data key="d0">i</data>
|
| 55 |
+
</node>
|
| 56 |
+
<node id="17">
|
| 57 |
+
<data key="d0">i</data>
|
| 58 |
+
</node>
|
| 59 |
+
<node id="18">
|
| 60 |
+
<data key="d0">f</data>
|
| 61 |
+
</node>
|
| 62 |
+
<node id="19">
|
| 63 |
+
<data key="d0">c</data>
|
| 64 |
+
</node>
|
| 65 |
+
<node id="20">
|
| 66 |
+
<data key="d0">j</data>
|
| 67 |
+
</node>
|
| 68 |
+
<node id="21">
|
| 69 |
+
<data key="d0">i</data>
|
| 70 |
+
</node>
|
| 71 |
+
<node id="22">
|
| 72 |
+
<data key="d0">b</data>
|
| 73 |
+
</node>
|
| 74 |
+
<node id="23">
|
| 75 |
+
<data key="d0">d</data>
|
| 76 |
+
</node>
|
| 77 |
+
<node id="24">
|
| 78 |
+
<data key="d0">j</data>
|
| 79 |
+
</node>
|
| 80 |
+
<node id="25">
|
| 81 |
+
<data key="d0">e</data>
|
| 82 |
+
</node>
|
| 83 |
+
<node id="26">
|
| 84 |
+
<data key="d0">a</data>
|
| 85 |
+
</node>
|
| 86 |
+
<node id="27">
|
| 87 |
+
<data key="d0">c</data>
|
| 88 |
+
</node>
|
| 89 |
+
<node id="28">
|
| 90 |
+
<data key="d0">h</data>
|
| 91 |
+
</node>
|
| 92 |
+
<node id="29">
|
| 93 |
+
<data key="d0">g</data>
|
| 94 |
+
</node>
|
| 95 |
+
<node id="30">
|
| 96 |
+
<data key="d0">d</data>
|
| 97 |
+
</node>
|
| 98 |
+
<node id="31">
|
| 99 |
+
<data key="d0">g</data>
|
| 100 |
+
</node>
|
| 101 |
+
<node id="32">
|
| 102 |
+
<data key="d0">f</data>
|
| 103 |
+
</node>
|
| 104 |
+
<node id="33">
|
| 105 |
+
<data key="d0">b</data>
|
| 106 |
+
</node>
|
| 107 |
+
<node id="34">
|
| 108 |
+
<data key="d0">c</data>
|
| 109 |
+
</node>
|
| 110 |
+
<node id="35">
|
| 111 |
+
<data key="d0">f</data>
|
| 112 |
+
</node>
|
| 113 |
+
<node id="36">
|
| 114 |
+
<data key="d0">c</data>
|
| 115 |
+
</node>
|
| 116 |
+
<node id="37">
|
| 117 |
+
<data key="d0">i</data>
|
| 118 |
+
</node>
|
| 119 |
+
<node id="38">
|
| 120 |
+
<data key="d0">b</data>
|
| 121 |
+
</node>
|
| 122 |
+
<node id="39">
|
| 123 |
+
<data key="d0">d</data>
|
| 124 |
+
</node>
|
| 125 |
+
<node id="40">
|
| 126 |
+
<data key="d0">i</data>
|
| 127 |
+
</node>
|
| 128 |
+
<node id="41">
|
| 129 |
+
<data key="d0">h</data>
|
| 130 |
+
</node>
|
| 131 |
+
<node id="42">
|
| 132 |
+
<data key="d0">f</data>
|
| 133 |
+
</node>
|
| 134 |
+
<node id="43">
|
| 135 |
+
<data key="d0">h</data>
|
| 136 |
+
</node>
|
| 137 |
+
<node id="44">
|
| 138 |
+
<data key="d0">h</data>
|
| 139 |
+
</node>
|
| 140 |
+
<node id="45">
|
| 141 |
+
<data key="d0">h</data>
|
| 142 |
+
</node>
|
| 143 |
+
<node id="46">
|
| 144 |
+
<data key="d0">h</data>
|
| 145 |
+
</node>
|
| 146 |
+
<node id="47">
|
| 147 |
+
<data key="d0">h</data>
|
| 148 |
+
</node>
|
| 149 |
+
<node id="48">
|
| 150 |
+
<data key="d0">j</data>
|
| 151 |
+
</node>
|
| 152 |
+
<node id="49">
|
| 153 |
+
<data key="d0">b</data>
|
| 154 |
+
</node>
|
| 155 |
+
<node id="50">
|
| 156 |
+
<data key="d0">e</data>
|
| 157 |
+
</node>
|
| 158 |
+
<node id="51">
|
| 159 |
+
<data key="d0">e</data>
|
| 160 |
+
</node>
|
| 161 |
+
<node id="52">
|
| 162 |
+
<data key="d0">d</data>
|
| 163 |
+
</node>
|
| 164 |
+
<node id="53">
|
| 165 |
+
<data key="d0">e</data>
|
| 166 |
+
</node>
|
| 167 |
+
<node id="54">
|
| 168 |
+
<data key="d0">f</data>
|
| 169 |
+
</node>
|
| 170 |
+
<node id="55">
|
| 171 |
+
<data key="d0">d</data>
|
| 172 |
+
</node>
|
| 173 |
+
<node id="56">
|
| 174 |
+
<data key="d0">j</data>
|
| 175 |
+
</node>
|
| 176 |
+
<node id="57">
|
| 177 |
+
<data key="d0">g</data>
|
| 178 |
+
</node>
|
| 179 |
+
<node id="58">
|
| 180 |
+
<data key="d0">b</data>
|
| 181 |
+
</node>
|
| 182 |
+
<node id="59">
|
| 183 |
+
<data key="d0">e</data>
|
| 184 |
+
</node>
|
| 185 |
+
<node id="60">
|
| 186 |
+
<data key="d0">f</data>
|
| 187 |
+
</node>
|
| 188 |
+
<node id="61">
|
| 189 |
+
<data key="d0">a</data>
|
| 190 |
+
</node>
|
| 191 |
+
<node id="62">
|
| 192 |
+
<data key="d0">e</data>
|
| 193 |
+
</node>
|
| 194 |
+
<node id="63">
|
| 195 |
+
<data key="d0">e</data>
|
| 196 |
+
</node>
|
| 197 |
+
<node id="64">
|
| 198 |
+
<data key="d0">f</data>
|
| 199 |
+
</node>
|
| 200 |
+
<node id="65">
|
| 201 |
+
<data key="d0">g</data>
|
| 202 |
+
</node>
|
| 203 |
+
<node id="66">
|
| 204 |
+
<data key="d0">g</data>
|
| 205 |
+
</node>
|
| 206 |
+
<node id="67">
|
| 207 |
+
<data key="d0">h</data>
|
| 208 |
+
</node>
|
| 209 |
+
<node id="68">
|
| 210 |
+
<data key="d0">a</data>
|
| 211 |
+
</node>
|
| 212 |
+
<node id="69">
|
| 213 |
+
<data key="d0">j</data>
|
| 214 |
+
</node>
|
| 215 |
+
<node id="70">
|
| 216 |
+
<data key="d0">h</data>
|
| 217 |
+
</node>
|
| 218 |
+
<node id="71">
|
| 219 |
+
<data key="d0">d</data>
|
| 220 |
+
</node>
|
| 221 |
+
<node id="72">
|
| 222 |
+
<data key="d0">j</data>
|
| 223 |
+
</node>
|
| 224 |
+
<node id="73">
|
| 225 |
+
<data key="d0">f</data>
|
| 226 |
+
</node>
|
| 227 |
+
<node id="74">
|
| 228 |
+
<data key="d0">i</data>
|
| 229 |
+
</node>
|
| 230 |
+
<node id="75">
|
| 231 |
+
<data key="d0">f</data>
|
| 232 |
+
</node>
|
| 233 |
+
<node id="76">
|
| 234 |
+
<data key="d0">i</data>
|
| 235 |
+
</node>
|
| 236 |
+
<node id="77">
|
| 237 |
+
<data key="d0">c</data>
|
| 238 |
+
</node>
|
| 239 |
+
<node id="78">
|
| 240 |
+
<data key="d0">j</data>
|
| 241 |
+
</node>
|
| 242 |
+
<node id="79">
|
| 243 |
+
<data key="d0">i</data>
|
| 244 |
+
</node>
|
| 245 |
+
<node id="80">
|
| 246 |
+
<data key="d0">d</data>
|
| 247 |
+
</node>
|
| 248 |
+
<node id="81">
|
| 249 |
+
<data key="d0">b</data>
|
| 250 |
+
</node>
|
| 251 |
+
<node id="82">
|
| 252 |
+
<data key="d0">e</data>
|
| 253 |
+
</node>
|
| 254 |
+
<node id="83">
|
| 255 |
+
<data key="d0">e</data>
|
| 256 |
+
</node>
|
| 257 |
+
<node id="84">
|
| 258 |
+
<data key="d0">e</data>
|
| 259 |
+
</node>
|
| 260 |
+
<node id="85">
|
| 261 |
+
<data key="d0">f</data>
|
| 262 |
+
</node>
|
| 263 |
+
<node id="86">
|
| 264 |
+
<data key="d0">h</data>
|
| 265 |
+
</node>
|
| 266 |
+
<node id="87">
|
| 267 |
+
<data key="d0">g</data>
|
| 268 |
+
</node>
|
| 269 |
+
<node id="88">
|
| 270 |
+
<data key="d0">i</data>
|
| 271 |
+
</node>
|
| 272 |
+
<node id="89">
|
| 273 |
+
<data key="d0">f</data>
|
| 274 |
+
</node>
|
| 275 |
+
<node id="90">
|
| 276 |
+
<data key="d0">d</data>
|
| 277 |
+
</node>
|
| 278 |
+
<node id="91">
|
| 279 |
+
<data key="d0">e</data>
|
| 280 |
+
</node>
|
| 281 |
+
<node id="92">
|
| 282 |
+
<data key="d0">j</data>
|
| 283 |
+
</node>
|
| 284 |
+
<node id="93">
|
| 285 |
+
<data key="d0">j</data>
|
| 286 |
+
</node>
|
| 287 |
+
<node id="94">
|
| 288 |
+
<data key="d0">c</data>
|
| 289 |
+
</node>
|
| 290 |
+
<node id="95">
|
| 291 |
+
<data key="d0">g</data>
|
| 292 |
+
</node>
|
| 293 |
+
<node id="96">
|
| 294 |
+
<data key="d0">b</data>
|
| 295 |
+
</node>
|
| 296 |
+
<node id="97">
|
| 297 |
+
<data key="d0">f</data>
|
| 298 |
+
</node>
|
| 299 |
+
<node id="98">
|
| 300 |
+
<data key="d0">e</data>
|
| 301 |
+
</node>
|
| 302 |
+
<node id="99">
|
| 303 |
+
<data key="d0">b</data>
|
| 304 |
+
</node>
|
| 305 |
+
<edge source="0" target="10" />
|
| 306 |
+
<edge source="1" target="11" />
|
| 307 |
+
<edge source="1" target="2" />
|
| 308 |
+
<edge source="2" target="1" />
|
| 309 |
+
<edge source="2" target="12" />
|
| 310 |
+
<edge source="2" target="3" />
|
| 311 |
+
<edge source="3" target="2" />
|
| 312 |
+
<edge source="3" target="13" />
|
| 313 |
+
<edge source="4" target="14" />
|
| 314 |
+
<edge source="4" target="5" />
|
| 315 |
+
<edge source="5" target="4" />
|
| 316 |
+
<edge source="5" target="15" />
|
| 317 |
+
<edge source="5" target="6" />
|
| 318 |
+
<edge source="6" target="5" />
|
| 319 |
+
<edge source="6" target="7" />
|
| 320 |
+
<edge source="7" target="6" />
|
| 321 |
+
<edge source="10" target="0" />
|
| 322 |
+
<edge source="10" target="11" />
|
| 323 |
+
<edge source="11" target="1" />
|
| 324 |
+
<edge source="11" target="10" />
|
| 325 |
+
<edge source="11" target="12" />
|
| 326 |
+
<edge source="12" target="2" />
|
| 327 |
+
<edge source="12" target="11" />
|
| 328 |
+
<edge source="12" target="22" />
|
| 329 |
+
<edge source="13" target="3" />
|
| 330 |
+
<edge source="13" target="23" />
|
| 331 |
+
<edge source="13" target="14" />
|
| 332 |
+
<edge source="14" target="4" />
|
| 333 |
+
<edge source="14" target="13" />
|
| 334 |
+
<edge source="14" target="15" />
|
| 335 |
+
<edge source="15" target="5" />
|
| 336 |
+
<edge source="15" target="14" />
|
| 337 |
+
<edge source="15" target="16" />
|
| 338 |
+
<edge source="16" target="15" />
|
| 339 |
+
<edge source="16" target="17" />
|
| 340 |
+
<edge source="17" target="16" />
|
| 341 |
+
<edge source="17" target="27" />
|
| 342 |
+
<edge source="20" target="21" />
|
| 343 |
+
<edge source="21" target="20" />
|
| 344 |
+
<edge source="21" target="31" />
|
| 345 |
+
<edge source="21" target="22" />
|
| 346 |
+
<edge source="22" target="12" />
|
| 347 |
+
<edge source="22" target="21" />
|
| 348 |
+
<edge source="22" target="32" />
|
| 349 |
+
<edge source="23" target="13" />
|
| 350 |
+
<edge source="23" target="33" />
|
| 351 |
+
<edge source="23" target="24" />
|
| 352 |
+
<edge source="24" target="23" />
|
| 353 |
+
<edge source="24" target="34" />
|
| 354 |
+
<edge source="24" target="25" />
|
| 355 |
+
<edge source="25" target="24" />
|
| 356 |
+
<edge source="25" target="26" />
|
| 357 |
+
<edge source="26" target="25" />
|
| 358 |
+
<edge source="26" target="36" />
|
| 359 |
+
<edge source="26" target="27" />
|
| 360 |
+
<edge source="27" target="17" />
|
| 361 |
+
<edge source="27" target="26" />
|
| 362 |
+
<edge source="27" target="28" />
|
| 363 |
+
<edge source="28" target="27" />
|
| 364 |
+
<edge source="28" target="38" />
|
| 365 |
+
<edge source="28" target="29" />
|
| 366 |
+
<edge source="29" target="28" />
|
| 367 |
+
<edge source="29" target="39" />
|
| 368 |
+
<edge source="31" target="21" />
|
| 369 |
+
<edge source="31" target="41" />
|
| 370 |
+
<edge source="31" target="32" />
|
| 371 |
+
<edge source="32" target="22" />
|
| 372 |
+
<edge source="32" target="31" />
|
| 373 |
+
<edge source="32" target="33" />
|
| 374 |
+
<edge source="33" target="23" />
|
| 375 |
+
<edge source="33" target="32" />
|
| 376 |
+
<edge source="34" target="24" />
|
| 377 |
+
<edge source="35" target="45" />
|
| 378 |
+
<edge source="35" target="36" />
|
| 379 |
+
<edge source="36" target="26" />
|
| 380 |
+
<edge source="36" target="35" />
|
| 381 |
+
<edge source="36" target="46" />
|
| 382 |
+
<edge source="36" target="37" />
|
| 383 |
+
<edge source="37" target="36" />
|
| 384 |
+
<edge source="37" target="47" />
|
| 385 |
+
<edge source="37" target="38" />
|
| 386 |
+
<edge source="38" target="28" />
|
| 387 |
+
<edge source="38" target="37" />
|
| 388 |
+
<edge source="38" target="48" />
|
| 389 |
+
<edge source="39" target="29" />
|
| 390 |
+
<edge source="40" target="50" />
|
| 391 |
+
<edge source="40" target="41" />
|
| 392 |
+
<edge source="41" target="31" />
|
| 393 |
+
<edge source="41" target="40" />
|
| 394 |
+
<edge source="41" target="51" />
|
| 395 |
+
<edge source="41" target="42" />
|
| 396 |
+
<edge source="42" target="41" />
|
| 397 |
+
<edge source="42" target="43" />
|
| 398 |
+
<edge source="43" target="42" />
|
| 399 |
+
<edge source="43" target="53" />
|
| 400 |
+
<edge source="43" target="44" />
|
| 401 |
+
<edge source="44" target="43" />
|
| 402 |
+
<edge source="44" target="54" />
|
| 403 |
+
<edge source="45" target="35" />
|
| 404 |
+
<edge source="45" target="55" />
|
| 405 |
+
<edge source="46" target="36" />
|
| 406 |
+
<edge source="46" target="56" />
|
| 407 |
+
<edge source="47" target="37" />
|
| 408 |
+
<edge source="47" target="57" />
|
| 409 |
+
<edge source="47" target="48" />
|
| 410 |
+
<edge source="48" target="38" />
|
| 411 |
+
<edge source="48" target="47" />
|
| 412 |
+
<edge source="48" target="58" />
|
| 413 |
+
<edge source="48" target="49" />
|
| 414 |
+
<edge source="49" target="48" />
|
| 415 |
+
<edge source="49" target="59" />
|
| 416 |
+
<edge source="50" target="40" />
|
| 417 |
+
<edge source="50" target="51" />
|
| 418 |
+
<edge source="51" target="41" />
|
| 419 |
+
<edge source="51" target="50" />
|
| 420 |
+
<edge source="51" target="61" />
|
| 421 |
+
<edge source="51" target="52" />
|
| 422 |
+
<edge source="52" target="51" />
|
| 423 |
+
<edge source="52" target="62" />
|
| 424 |
+
<edge source="53" target="43" />
|
| 425 |
+
<edge source="53" target="63" />
|
| 426 |
+
<edge source="54" target="44" />
|
| 427 |
+
<edge source="54" target="64" />
|
| 428 |
+
<edge source="54" target="55" />
|
| 429 |
+
<edge source="55" target="45" />
|
| 430 |
+
<edge source="55" target="54" />
|
| 431 |
+
<edge source="55" target="65" />
|
| 432 |
+
<edge source="55" target="56" />
|
| 433 |
+
<edge source="56" target="46" />
|
| 434 |
+
<edge source="56" target="55" />
|
| 435 |
+
<edge source="56" target="57" />
|
| 436 |
+
<edge source="57" target="47" />
|
| 437 |
+
<edge source="57" target="56" />
|
| 438 |
+
<edge source="57" target="67" />
|
| 439 |
+
<edge source="57" target="58" />
|
| 440 |
+
<edge source="58" target="48" />
|
| 441 |
+
<edge source="58" target="57" />
|
| 442 |
+
<edge source="58" target="68" />
|
| 443 |
+
<edge source="58" target="59" />
|
| 444 |
+
<edge source="59" target="49" />
|
| 445 |
+
<edge source="59" target="58" />
|
| 446 |
+
<edge source="59" target="69" />
|
| 447 |
+
<edge source="60" target="70" />
|
| 448 |
+
<edge source="61" target="51" />
|
| 449 |
+
<edge source="61" target="71" />
|
| 450 |
+
<edge source="61" target="62" />
|
| 451 |
+
<edge source="62" target="52" />
|
| 452 |
+
<edge source="62" target="61" />
|
| 453 |
+
<edge source="63" target="53" />
|
| 454 |
+
<edge source="63" target="73" />
|
| 455 |
+
<edge source="64" target="54" />
|
| 456 |
+
<edge source="64" target="74" />
|
| 457 |
+
<edge source="65" target="55" />
|
| 458 |
+
<edge source="66" target="67" />
|
| 459 |
+
<edge source="67" target="57" />
|
| 460 |
+
<edge source="67" target="66" />
|
| 461 |
+
<edge source="67" target="77" />
|
| 462 |
+
<edge source="67" target="68" />
|
| 463 |
+
<edge source="68" target="58" />
|
| 464 |
+
<edge source="68" target="67" />
|
| 465 |
+
<edge source="69" target="59" />
|
| 466 |
+
<edge source="69" target="79" />
|
| 467 |
+
<edge source="70" target="60" />
|
| 468 |
+
<edge source="70" target="80" />
|
| 469 |
+
<edge source="70" target="71" />
|
| 470 |
+
<edge source="71" target="61" />
|
| 471 |
+
<edge source="71" target="70" />
|
| 472 |
+
<edge source="71" target="72" />
|
| 473 |
+
<edge source="72" target="71" />
|
| 474 |
+
<edge source="73" target="63" />
|
| 475 |
+
<edge source="73" target="74" />
|
| 476 |
+
<edge source="74" target="64" />
|
| 477 |
+
<edge source="74" target="73" />
|
| 478 |
+
<edge source="74" target="84" />
|
| 479 |
+
<edge source="76" target="77" />
|
| 480 |
+
<edge source="77" target="67" />
|
| 481 |
+
<edge source="77" target="76" />
|
| 482 |
+
<edge source="77" target="78" />
|
| 483 |
+
<edge source="78" target="77" />
|
| 484 |
+
<edge source="78" target="88" />
|
| 485 |
+
<edge source="79" target="69" />
|
| 486 |
+
<edge source="80" target="70" />
|
| 487 |
+
<edge source="80" target="90" />
|
| 488 |
+
<edge source="80" target="81" />
|
| 489 |
+
<edge source="81" target="80" />
|
| 490 |
+
<edge source="81" target="91" />
|
| 491 |
+
<edge source="81" target="82" />
|
| 492 |
+
<edge source="82" target="81" />
|
| 493 |
+
<edge source="82" target="92" />
|
| 494 |
+
<edge source="82" target="83" />
|
| 495 |
+
<edge source="83" target="82" />
|
| 496 |
+
<edge source="83" target="93" />
|
| 497 |
+
<edge source="84" target="74" />
|
| 498 |
+
<edge source="84" target="94" />
|
| 499 |
+
<edge source="84" target="85" />
|
| 500 |
+
<edge source="85" target="84" />
|
| 501 |
+
<edge source="85" target="95" />
|
| 502 |
+
<edge source="86" target="96" />
|
| 503 |
+
<edge source="87" target="97" />
|
| 504 |
+
<edge source="88" target="78" />
|
| 505 |
+
<edge source="88" target="98" />
|
| 506 |
+
<edge source="88" target="89" />
|
| 507 |
+
<edge source="89" target="88" />
|
| 508 |
+
<edge source="89" target="99" />
|
| 509 |
+
<edge source="90" target="80" />
|
| 510 |
+
<edge source="91" target="81" />
|
| 511 |
+
<edge source="91" target="92" />
|
| 512 |
+
<edge source="92" target="82" />
|
| 513 |
+
<edge source="92" target="91" />
|
| 514 |
+
<edge source="93" target="83" />
|
| 515 |
+
<edge source="94" target="84" />
|
| 516 |
+
<edge source="94" target="95" />
|
| 517 |
+
<edge source="95" target="85" />
|
| 518 |
+
<edge source="95" target="94" />
|
| 519 |
+
<edge source="95" target="96" />
|
| 520 |
+
<edge source="96" target="86" />
|
| 521 |
+
<edge source="96" target="95" />
|
| 522 |
+
<edge source="96" target="97" />
|
| 523 |
+
<edge source="97" target="87" />
|
| 524 |
+
<edge source="97" target="96" />
|
| 525 |
+
<edge source="97" target="98" />
|
| 526 |
+
<edge source="98" target="88" />
|
| 527 |
+
<edge source="98" target="97" />
|
| 528 |
+
<edge source="98" target="99" />
|
| 529 |
+
<edge source="99" target="89" />
|
| 530 |
+
<edge source="99" target="98" />
|
| 531 |
+
</graph>
|
| 532 |
+
</graphml>
|
data/maze/100/maze_graph_H1_RWs.graphml
ADDED
|
@@ -0,0 +1,522 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version='1.0' encoding='utf-8'?>
|
| 2 |
+
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
|
| 3 |
+
<key id="d0" for="node" attr.name="label" attr.type="string" />
|
| 4 |
+
<graph edgedefault="directed">
|
| 5 |
+
<node id="0">
|
| 6 |
+
<data key="d0">e</data>
|
| 7 |
+
</node>
|
| 8 |
+
<node id="1">
|
| 9 |
+
<data key="d0">c</data>
|
| 10 |
+
</node>
|
| 11 |
+
<node id="2">
|
| 12 |
+
<data key="d0">g</data>
|
| 13 |
+
</node>
|
| 14 |
+
<node id="3">
|
| 15 |
+
<data key="d0">c</data>
|
| 16 |
+
</node>
|
| 17 |
+
<node id="4">
|
| 18 |
+
<data key="d0">h</data>
|
| 19 |
+
</node>
|
| 20 |
+
<node id="5">
|
| 21 |
+
<data key="d0">b</data>
|
| 22 |
+
</node>
|
| 23 |
+
<node id="6">
|
| 24 |
+
<data key="d0">h</data>
|
| 25 |
+
</node>
|
| 26 |
+
<node id="7">
|
| 27 |
+
<data key="d0">c</data>
|
| 28 |
+
</node>
|
| 29 |
+
<node id="8">
|
| 30 |
+
<data key="d0">g</data>
|
| 31 |
+
</node>
|
| 32 |
+
<node id="9">
|
| 33 |
+
<data key="d0">f</data>
|
| 34 |
+
</node>
|
| 35 |
+
<node id="10">
|
| 36 |
+
<data key="d0">f</data>
|
| 37 |
+
</node>
|
| 38 |
+
<node id="11">
|
| 39 |
+
<data key="d0">d</data>
|
| 40 |
+
</node>
|
| 41 |
+
<node id="12">
|
| 42 |
+
<data key="d0">f</data>
|
| 43 |
+
</node>
|
| 44 |
+
<node id="13">
|
| 45 |
+
<data key="d0">i</data>
|
| 46 |
+
</node>
|
| 47 |
+
<node id="14">
|
| 48 |
+
<data key="d0">c</data>
|
| 49 |
+
</node>
|
| 50 |
+
<node id="15">
|
| 51 |
+
<data key="d0">a</data>
|
| 52 |
+
</node>
|
| 53 |
+
<node id="16">
|
| 54 |
+
<data key="d0">b</data>
|
| 55 |
+
</node>
|
| 56 |
+
<node id="17">
|
| 57 |
+
<data key="d0">c</data>
|
| 58 |
+
</node>
|
| 59 |
+
<node id="18">
|
| 60 |
+
<data key="d0">d</data>
|
| 61 |
+
</node>
|
| 62 |
+
<node id="19">
|
| 63 |
+
<data key="d0">e</data>
|
| 64 |
+
</node>
|
| 65 |
+
<node id="20">
|
| 66 |
+
<data key="d0">i</data>
|
| 67 |
+
</node>
|
| 68 |
+
<node id="21">
|
| 69 |
+
<data key="d0">f</data>
|
| 70 |
+
</node>
|
| 71 |
+
<node id="22">
|
| 72 |
+
<data key="d0">b</data>
|
| 73 |
+
</node>
|
| 74 |
+
<node id="23">
|
| 75 |
+
<data key="d0">j</data>
|
| 76 |
+
</node>
|
| 77 |
+
<node id="24">
|
| 78 |
+
<data key="d0">f</data>
|
| 79 |
+
</node>
|
| 80 |
+
<node id="25">
|
| 81 |
+
<data key="d0">j</data>
|
| 82 |
+
</node>
|
| 83 |
+
<node id="26">
|
| 84 |
+
<data key="d0">c</data>
|
| 85 |
+
</node>
|
| 86 |
+
<node id="27">
|
| 87 |
+
<data key="d0">h</data>
|
| 88 |
+
</node>
|
| 89 |
+
<node id="28">
|
| 90 |
+
<data key="d0">g</data>
|
| 91 |
+
</node>
|
| 92 |
+
<node id="29">
|
| 93 |
+
<data key="d0">b</data>
|
| 94 |
+
</node>
|
| 95 |
+
<node id="30">
|
| 96 |
+
<data key="d0">e</data>
|
| 97 |
+
</node>
|
| 98 |
+
<node id="31">
|
| 99 |
+
<data key="d0">b</data>
|
| 100 |
+
</node>
|
| 101 |
+
<node id="32">
|
| 102 |
+
<data key="d0">g</data>
|
| 103 |
+
</node>
|
| 104 |
+
<node id="33">
|
| 105 |
+
<data key="d0">i</data>
|
| 106 |
+
</node>
|
| 107 |
+
<node id="34">
|
| 108 |
+
<data key="d0">b</data>
|
| 109 |
+
</node>
|
| 110 |
+
<node id="35">
|
| 111 |
+
<data key="d0">f</data>
|
| 112 |
+
</node>
|
| 113 |
+
<node id="36">
|
| 114 |
+
<data key="d0">j</data>
|
| 115 |
+
</node>
|
| 116 |
+
<node id="37">
|
| 117 |
+
<data key="d0">g</data>
|
| 118 |
+
</node>
|
| 119 |
+
<node id="38">
|
| 120 |
+
<data key="d0">b</data>
|
| 121 |
+
</node>
|
| 122 |
+
<node id="39">
|
| 123 |
+
<data key="d0">j</data>
|
| 124 |
+
</node>
|
| 125 |
+
<node id="40">
|
| 126 |
+
<data key="d0">a</data>
|
| 127 |
+
</node>
|
| 128 |
+
<node id="41">
|
| 129 |
+
<data key="d0">c</data>
|
| 130 |
+
</node>
|
| 131 |
+
<node id="42">
|
| 132 |
+
<data key="d0">g</data>
|
| 133 |
+
</node>
|
| 134 |
+
<node id="43">
|
| 135 |
+
<data key="d0">e</data>
|
| 136 |
+
</node>
|
| 137 |
+
<node id="44">
|
| 138 |
+
<data key="d0">e</data>
|
| 139 |
+
</node>
|
| 140 |
+
<node id="45">
|
| 141 |
+
<data key="d0">d</data>
|
| 142 |
+
</node>
|
| 143 |
+
<node id="46">
|
| 144 |
+
<data key="d0">j</data>
|
| 145 |
+
</node>
|
| 146 |
+
<node id="47">
|
| 147 |
+
<data key="d0">c</data>
|
| 148 |
+
</node>
|
| 149 |
+
<node id="48">
|
| 150 |
+
<data key="d0">b</data>
|
| 151 |
+
</node>
|
| 152 |
+
<node id="49">
|
| 153 |
+
<data key="d0">c</data>
|
| 154 |
+
</node>
|
| 155 |
+
<node id="50">
|
| 156 |
+
<data key="d0">i</data>
|
| 157 |
+
</node>
|
| 158 |
+
<node id="51">
|
| 159 |
+
<data key="d0">e</data>
|
| 160 |
+
</node>
|
| 161 |
+
<node id="52">
|
| 162 |
+
<data key="d0">h</data>
|
| 163 |
+
</node>
|
| 164 |
+
<node id="53">
|
| 165 |
+
<data key="d0">b</data>
|
| 166 |
+
</node>
|
| 167 |
+
<node id="54">
|
| 168 |
+
<data key="d0">a</data>
|
| 169 |
+
</node>
|
| 170 |
+
<node id="55">
|
| 171 |
+
<data key="d0">a</data>
|
| 172 |
+
</node>
|
| 173 |
+
<node id="56">
|
| 174 |
+
<data key="d0">h</data>
|
| 175 |
+
</node>
|
| 176 |
+
<node id="57">
|
| 177 |
+
<data key="d0">j</data>
|
| 178 |
+
</node>
|
| 179 |
+
<node id="58">
|
| 180 |
+
<data key="d0">a</data>
|
| 181 |
+
</node>
|
| 182 |
+
<node id="59">
|
| 183 |
+
<data key="d0">f</data>
|
| 184 |
+
</node>
|
| 185 |
+
<node id="60">
|
| 186 |
+
<data key="d0">c</data>
|
| 187 |
+
</node>
|
| 188 |
+
<node id="61">
|
| 189 |
+
<data key="d0">a</data>
|
| 190 |
+
</node>
|
| 191 |
+
<node id="62">
|
| 192 |
+
<data key="d0">g</data>
|
| 193 |
+
</node>
|
| 194 |
+
<node id="63">
|
| 195 |
+
<data key="d0">j</data>
|
| 196 |
+
</node>
|
| 197 |
+
<node id="64">
|
| 198 |
+
<data key="d0">c</data>
|
| 199 |
+
</node>
|
| 200 |
+
<node id="65">
|
| 201 |
+
<data key="d0">b</data>
|
| 202 |
+
</node>
|
| 203 |
+
<node id="66">
|
| 204 |
+
<data key="d0">e</data>
|
| 205 |
+
</node>
|
| 206 |
+
<node id="67">
|
| 207 |
+
<data key="d0">e</data>
|
| 208 |
+
</node>
|
| 209 |
+
<node id="68">
|
| 210 |
+
<data key="d0">d</data>
|
| 211 |
+
</node>
|
| 212 |
+
<node id="69">
|
| 213 |
+
<data key="d0">b</data>
|
| 214 |
+
</node>
|
| 215 |
+
<node id="70">
|
| 216 |
+
<data key="d0">b</data>
|
| 217 |
+
</node>
|
| 218 |
+
<node id="71">
|
| 219 |
+
<data key="d0">f</data>
|
| 220 |
+
</node>
|
| 221 |
+
<node id="72">
|
| 222 |
+
<data key="d0">g</data>
|
| 223 |
+
</node>
|
| 224 |
+
<node id="73">
|
| 225 |
+
<data key="d0">d</data>
|
| 226 |
+
</node>
|
| 227 |
+
<node id="74">
|
| 228 |
+
<data key="d0">g</data>
|
| 229 |
+
</node>
|
| 230 |
+
<node id="75">
|
| 231 |
+
<data key="d0">i</data>
|
| 232 |
+
</node>
|
| 233 |
+
<node id="76">
|
| 234 |
+
<data key="d0">j</data>
|
| 235 |
+
</node>
|
| 236 |
+
<node id="77">
|
| 237 |
+
<data key="d0">b</data>
|
| 238 |
+
</node>
|
| 239 |
+
<node id="78">
|
| 240 |
+
<data key="d0">e</data>
|
| 241 |
+
</node>
|
| 242 |
+
<node id="79">
|
| 243 |
+
<data key="d0">d</data>
|
| 244 |
+
</node>
|
| 245 |
+
<node id="80">
|
| 246 |
+
<data key="d0">e</data>
|
| 247 |
+
</node>
|
| 248 |
+
<node id="81">
|
| 249 |
+
<data key="d0">h</data>
|
| 250 |
+
</node>
|
| 251 |
+
<node id="82">
|
| 252 |
+
<data key="d0">e</data>
|
| 253 |
+
</node>
|
| 254 |
+
<node id="83">
|
| 255 |
+
<data key="d0">e</data>
|
| 256 |
+
</node>
|
| 257 |
+
<node id="84">
|
| 258 |
+
<data key="d0">i</data>
|
| 259 |
+
</node>
|
| 260 |
+
<node id="85">
|
| 261 |
+
<data key="d0">j</data>
|
| 262 |
+
</node>
|
| 263 |
+
<node id="86">
|
| 264 |
+
<data key="d0">b</data>
|
| 265 |
+
</node>
|
| 266 |
+
<node id="87">
|
| 267 |
+
<data key="d0">a</data>
|
| 268 |
+
</node>
|
| 269 |
+
<node id="88">
|
| 270 |
+
<data key="d0">i</data>
|
| 271 |
+
</node>
|
| 272 |
+
<node id="89">
|
| 273 |
+
<data key="d0">d</data>
|
| 274 |
+
</node>
|
| 275 |
+
<node id="90">
|
| 276 |
+
<data key="d0">h</data>
|
| 277 |
+
</node>
|
| 278 |
+
<node id="91">
|
| 279 |
+
<data key="d0">c</data>
|
| 280 |
+
</node>
|
| 281 |
+
<node id="92">
|
| 282 |
+
<data key="d0">e</data>
|
| 283 |
+
</node>
|
| 284 |
+
<node id="93">
|
| 285 |
+
<data key="d0">d</data>
|
| 286 |
+
</node>
|
| 287 |
+
<node id="94">
|
| 288 |
+
<data key="d0">b</data>
|
| 289 |
+
</node>
|
| 290 |
+
<node id="95">
|
| 291 |
+
<data key="d0">g</data>
|
| 292 |
+
</node>
|
| 293 |
+
<node id="96">
|
| 294 |
+
<data key="d0">j</data>
|
| 295 |
+
</node>
|
| 296 |
+
<node id="97">
|
| 297 |
+
<data key="d0">b</data>
|
| 298 |
+
</node>
|
| 299 |
+
<node id="98">
|
| 300 |
+
<data key="d0">f</data>
|
| 301 |
+
</node>
|
| 302 |
+
<node id="99">
|
| 303 |
+
<data key="d0">j</data>
|
| 304 |
+
</node>
|
| 305 |
+
<edge source="1" target="11" />
|
| 306 |
+
<edge source="1" target="2" />
|
| 307 |
+
<edge source="2" target="1" />
|
| 308 |
+
<edge source="2" target="3" />
|
| 309 |
+
<edge source="3" target="2" />
|
| 310 |
+
<edge source="3" target="4" />
|
| 311 |
+
<edge source="4" target="3" />
|
| 312 |
+
<edge source="4" target="14" />
|
| 313 |
+
<edge source="7" target="17" />
|
| 314 |
+
<edge source="7" target="8" />
|
| 315 |
+
<edge source="8" target="7" />
|
| 316 |
+
<edge source="9" target="19" />
|
| 317 |
+
<edge source="10" target="20" />
|
| 318 |
+
<edge source="10" target="11" />
|
| 319 |
+
<edge source="11" target="1" />
|
| 320 |
+
<edge source="11" target="10" />
|
| 321 |
+
<edge source="11" target="12" />
|
| 322 |
+
<edge source="12" target="11" />
|
| 323 |
+
<edge source="12" target="13" />
|
| 324 |
+
<edge source="13" target="12" />
|
| 325 |
+
<edge source="13" target="23" />
|
| 326 |
+
<edge source="13" target="14" />
|
| 327 |
+
<edge source="14" target="4" />
|
| 328 |
+
<edge source="14" target="13" />
|
| 329 |
+
<edge source="14" target="15" />
|
| 330 |
+
<edge source="15" target="14" />
|
| 331 |
+
<edge source="15" target="25" />
|
| 332 |
+
<edge source="16" target="26" />
|
| 333 |
+
<edge source="16" target="17" />
|
| 334 |
+
<edge source="17" target="7" />
|
| 335 |
+
<edge source="17" target="16" />
|
| 336 |
+
<edge source="17" target="27" />
|
| 337 |
+
<edge source="18" target="28" />
|
| 338 |
+
<edge source="19" target="9" />
|
| 339 |
+
<edge source="20" target="10" />
|
| 340 |
+
<edge source="20" target="30" />
|
| 341 |
+
<edge source="21" target="22" />
|
| 342 |
+
<edge source="22" target="21" />
|
| 343 |
+
<edge source="22" target="32" />
|
| 344 |
+
<edge source="22" target="23" />
|
| 345 |
+
<edge source="23" target="13" />
|
| 346 |
+
<edge source="23" target="22" />
|
| 347 |
+
<edge source="23" target="24" />
|
| 348 |
+
<edge source="24" target="23" />
|
| 349 |
+
<edge source="24" target="34" />
|
| 350 |
+
<edge source="24" target="25" />
|
| 351 |
+
<edge source="25" target="15" />
|
| 352 |
+
<edge source="25" target="24" />
|
| 353 |
+
<edge source="26" target="16" />
|
| 354 |
+
<edge source="26" target="36" />
|
| 355 |
+
<edge source="26" target="27" />
|
| 356 |
+
<edge source="27" target="17" />
|
| 357 |
+
<edge source="27" target="26" />
|
| 358 |
+
<edge source="27" target="37" />
|
| 359 |
+
<edge source="27" target="28" />
|
| 360 |
+
<edge source="28" target="18" />
|
| 361 |
+
<edge source="28" target="27" />
|
| 362 |
+
<edge source="28" target="38" />
|
| 363 |
+
<edge source="28" target="29" />
|
| 364 |
+
<edge source="29" target="28" />
|
| 365 |
+
<edge source="30" target="20" />
|
| 366 |
+
<edge source="30" target="40" />
|
| 367 |
+
<edge source="30" target="31" />
|
| 368 |
+
<edge source="31" target="30" />
|
| 369 |
+
<edge source="32" target="22" />
|
| 370 |
+
<edge source="32" target="33" />
|
| 371 |
+
<edge source="33" target="32" />
|
| 372 |
+
<edge source="33" target="43" />
|
| 373 |
+
<edge source="33" target="34" />
|
| 374 |
+
<edge source="34" target="24" />
|
| 375 |
+
<edge source="34" target="33" />
|
| 376 |
+
<edge source="34" target="35" />
|
| 377 |
+
<edge source="35" target="34" />
|
| 378 |
+
<edge source="35" target="45" />
|
| 379 |
+
<edge source="35" target="36" />
|
| 380 |
+
<edge source="36" target="26" />
|
| 381 |
+
<edge source="36" target="35" />
|
| 382 |
+
<edge source="36" target="46" />
|
| 383 |
+
<edge source="37" target="27" />
|
| 384 |
+
<edge source="37" target="47" />
|
| 385 |
+
<edge source="38" target="28" />
|
| 386 |
+
<edge source="38" target="48" />
|
| 387 |
+
<edge source="38" target="39" />
|
| 388 |
+
<edge source="39" target="38" />
|
| 389 |
+
<edge source="39" target="49" />
|
| 390 |
+
<edge source="40" target="30" />
|
| 391 |
+
<edge source="40" target="41" />
|
| 392 |
+
<edge source="41" target="40" />
|
| 393 |
+
<edge source="42" target="52" />
|
| 394 |
+
<edge source="42" target="43" />
|
| 395 |
+
<edge source="43" target="33" />
|
| 396 |
+
<edge source="43" target="42" />
|
| 397 |
+
<edge source="43" target="53" />
|
| 398 |
+
<edge source="43" target="44" />
|
| 399 |
+
<edge source="44" target="43" />
|
| 400 |
+
<edge source="44" target="45" />
|
| 401 |
+
<edge source="45" target="35" />
|
| 402 |
+
<edge source="45" target="44" />
|
| 403 |
+
<edge source="46" target="36" />
|
| 404 |
+
<edge source="46" target="56" />
|
| 405 |
+
<edge source="46" target="47" />
|
| 406 |
+
<edge source="47" target="37" />
|
| 407 |
+
<edge source="47" target="46" />
|
| 408 |
+
<edge source="47" target="48" />
|
| 409 |
+
<edge source="48" target="38" />
|
| 410 |
+
<edge source="48" target="47" />
|
| 411 |
+
<edge source="48" target="58" />
|
| 412 |
+
<edge source="48" target="49" />
|
| 413 |
+
<edge source="49" target="39" />
|
| 414 |
+
<edge source="49" target="48" />
|
| 415 |
+
<edge source="49" target="59" />
|
| 416 |
+
<edge source="50" target="51" />
|
| 417 |
+
<edge source="51" target="50" />
|
| 418 |
+
<edge source="51" target="61" />
|
| 419 |
+
<edge source="51" target="52" />
|
| 420 |
+
<edge source="52" target="42" />
|
| 421 |
+
<edge source="52" target="51" />
|
| 422 |
+
<edge source="53" target="43" />
|
| 423 |
+
<edge source="53" target="63" />
|
| 424 |
+
<edge source="53" target="54" />
|
| 425 |
+
<edge source="54" target="53" />
|
| 426 |
+
<edge source="55" target="65" />
|
| 427 |
+
<edge source="56" target="46" />
|
| 428 |
+
<edge source="56" target="57" />
|
| 429 |
+
<edge source="57" target="56" />
|
| 430 |
+
<edge source="57" target="67" />
|
| 431 |
+
<edge source="57" target="58" />
|
| 432 |
+
<edge source="58" target="48" />
|
| 433 |
+
<edge source="58" target="57" />
|
| 434 |
+
<edge source="58" target="59" />
|
| 435 |
+
<edge source="59" target="49" />
|
| 436 |
+
<edge source="59" target="58" />
|
| 437 |
+
<edge source="60" target="70" />
|
| 438 |
+
<edge source="61" target="51" />
|
| 439 |
+
<edge source="63" target="53" />
|
| 440 |
+
<edge source="63" target="64" />
|
| 441 |
+
<edge source="64" target="63" />
|
| 442 |
+
<edge source="65" target="55" />
|
| 443 |
+
<edge source="65" target="66" />
|
| 444 |
+
<edge source="66" target="65" />
|
| 445 |
+
<edge source="67" target="57" />
|
| 446 |
+
<edge source="67" target="77" />
|
| 447 |
+
<edge source="68" target="69" />
|
| 448 |
+
<edge source="69" target="68" />
|
| 449 |
+
<edge source="69" target="79" />
|
| 450 |
+
<edge source="70" target="60" />
|
| 451 |
+
<edge source="70" target="80" />
|
| 452 |
+
<edge source="70" target="71" />
|
| 453 |
+
<edge source="71" target="70" />
|
| 454 |
+
<edge source="72" target="82" />
|
| 455 |
+
<edge source="72" target="73" />
|
| 456 |
+
<edge source="73" target="72" />
|
| 457 |
+
<edge source="73" target="74" />
|
| 458 |
+
<edge source="74" target="73" />
|
| 459 |
+
<edge source="74" target="84" />
|
| 460 |
+
<edge source="74" target="75" />
|
| 461 |
+
<edge source="75" target="74" />
|
| 462 |
+
<edge source="75" target="85" />
|
| 463 |
+
<edge source="77" target="67" />
|
| 464 |
+
<edge source="77" target="87" />
|
| 465 |
+
<edge source="77" target="78" />
|
| 466 |
+
<edge source="78" target="77" />
|
| 467 |
+
<edge source="79" target="69" />
|
| 468 |
+
<edge source="79" target="89" />
|
| 469 |
+
<edge source="80" target="70" />
|
| 470 |
+
<edge source="80" target="90" />
|
| 471 |
+
<edge source="80" target="81" />
|
| 472 |
+
<edge source="81" target="80" />
|
| 473 |
+
<edge source="81" target="91" />
|
| 474 |
+
<edge source="81" target="82" />
|
| 475 |
+
<edge source="82" target="72" />
|
| 476 |
+
<edge source="82" target="81" />
|
| 477 |
+
<edge source="82" target="92" />
|
| 478 |
+
<edge source="82" target="83" />
|
| 479 |
+
<edge source="83" target="82" />
|
| 480 |
+
<edge source="83" target="93" />
|
| 481 |
+
<edge source="83" target="84" />
|
| 482 |
+
<edge source="84" target="74" />
|
| 483 |
+
<edge source="84" target="83" />
|
| 484 |
+
<edge source="84" target="85" />
|
| 485 |
+
<edge source="85" target="75" />
|
| 486 |
+
<edge source="85" target="84" />
|
| 487 |
+
<edge source="85" target="86" />
|
| 488 |
+
<edge source="86" target="85" />
|
| 489 |
+
<edge source="86" target="96" />
|
| 490 |
+
<edge source="86" target="87" />
|
| 491 |
+
<edge source="87" target="77" />
|
| 492 |
+
<edge source="87" target="86" />
|
| 493 |
+
<edge source="87" target="97" />
|
| 494 |
+
<edge source="87" target="88" />
|
| 495 |
+
<edge source="88" target="87" />
|
| 496 |
+
<edge source="88" target="98" />
|
| 497 |
+
<edge source="88" target="89" />
|
| 498 |
+
<edge source="89" target="79" />
|
| 499 |
+
<edge source="89" target="88" />
|
| 500 |
+
<edge source="89" target="99" />
|
| 501 |
+
<edge source="90" target="80" />
|
| 502 |
+
<edge source="90" target="91" />
|
| 503 |
+
<edge source="91" target="81" />
|
| 504 |
+
<edge source="91" target="90" />
|
| 505 |
+
<edge source="91" target="92" />
|
| 506 |
+
<edge source="92" target="82" />
|
| 507 |
+
<edge source="92" target="91" />
|
| 508 |
+
<edge source="93" target="83" />
|
| 509 |
+
<edge source="93" target="94" />
|
| 510 |
+
<edge source="94" target="93" />
|
| 511 |
+
<edge source="94" target="95" />
|
| 512 |
+
<edge source="95" target="94" />
|
| 513 |
+
<edge source="95" target="96" />
|
| 514 |
+
<edge source="96" target="86" />
|
| 515 |
+
<edge source="96" target="95" />
|
| 516 |
+
<edge source="96" target="97" />
|
| 517 |
+
<edge source="97" target="87" />
|
| 518 |
+
<edge source="97" target="96" />
|
| 519 |
+
<edge source="98" target="88" />
|
| 520 |
+
<edge source="99" target="89" />
|
| 521 |
+
</graph>
|
| 522 |
+
</graphml>
|
data/maze/100/maze_graph_I1_RWs.graphml
ADDED
|
@@ -0,0 +1,520 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version='1.0' encoding='utf-8'?>
|
| 2 |
+
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
|
| 3 |
+
<key id="d0" for="node" attr.name="label" attr.type="string" />
|
| 4 |
+
<graph edgedefault="directed">
|
| 5 |
+
<node id="0">
|
| 6 |
+
<data key="d0">c</data>
|
| 7 |
+
</node>
|
| 8 |
+
<node id="1">
|
| 9 |
+
<data key="d0">i</data>
|
| 10 |
+
</node>
|
| 11 |
+
<node id="2">
|
| 12 |
+
<data key="d0">d</data>
|
| 13 |
+
</node>
|
| 14 |
+
<node id="3">
|
| 15 |
+
<data key="d0">c</data>
|
| 16 |
+
</node>
|
| 17 |
+
<node id="4">
|
| 18 |
+
<data key="d0">h</data>
|
| 19 |
+
</node>
|
| 20 |
+
<node id="5">
|
| 21 |
+
<data key="d0">h</data>
|
| 22 |
+
</node>
|
| 23 |
+
<node id="6">
|
| 24 |
+
<data key="d0">e</data>
|
| 25 |
+
</node>
|
| 26 |
+
<node id="7">
|
| 27 |
+
<data key="d0">a</data>
|
| 28 |
+
</node>
|
| 29 |
+
<node id="8">
|
| 30 |
+
<data key="d0">f</data>
|
| 31 |
+
</node>
|
| 32 |
+
<node id="9">
|
| 33 |
+
<data key="d0">f</data>
|
| 34 |
+
</node>
|
| 35 |
+
<node id="10">
|
| 36 |
+
<data key="d0">c</data>
|
| 37 |
+
</node>
|
| 38 |
+
<node id="11">
|
| 39 |
+
<data key="d0">f</data>
|
| 40 |
+
</node>
|
| 41 |
+
<node id="12">
|
| 42 |
+
<data key="d0">g</data>
|
| 43 |
+
</node>
|
| 44 |
+
<node id="13">
|
| 45 |
+
<data key="d0">f</data>
|
| 46 |
+
</node>
|
| 47 |
+
<node id="14">
|
| 48 |
+
<data key="d0">b</data>
|
| 49 |
+
</node>
|
| 50 |
+
<node id="15">
|
| 51 |
+
<data key="d0">a</data>
|
| 52 |
+
</node>
|
| 53 |
+
<node id="16">
|
| 54 |
+
<data key="d0">j</data>
|
| 55 |
+
</node>
|
| 56 |
+
<node id="17">
|
| 57 |
+
<data key="d0">j</data>
|
| 58 |
+
</node>
|
| 59 |
+
<node id="18">
|
| 60 |
+
<data key="d0">d</data>
|
| 61 |
+
</node>
|
| 62 |
+
<node id="19">
|
| 63 |
+
<data key="d0">f</data>
|
| 64 |
+
</node>
|
| 65 |
+
<node id="20">
|
| 66 |
+
<data key="d0">g</data>
|
| 67 |
+
</node>
|
| 68 |
+
<node id="21">
|
| 69 |
+
<data key="d0">h</data>
|
| 70 |
+
</node>
|
| 71 |
+
<node id="22">
|
| 72 |
+
<data key="d0">j</data>
|
| 73 |
+
</node>
|
| 74 |
+
<node id="23">
|
| 75 |
+
<data key="d0">j</data>
|
| 76 |
+
</node>
|
| 77 |
+
<node id="24">
|
| 78 |
+
<data key="d0">d</data>
|
| 79 |
+
</node>
|
| 80 |
+
<node id="25">
|
| 81 |
+
<data key="d0">j</data>
|
| 82 |
+
</node>
|
| 83 |
+
<node id="26">
|
| 84 |
+
<data key="d0">e</data>
|
| 85 |
+
</node>
|
| 86 |
+
<node id="27">
|
| 87 |
+
<data key="d0">c</data>
|
| 88 |
+
</node>
|
| 89 |
+
<node id="28">
|
| 90 |
+
<data key="d0">b</data>
|
| 91 |
+
</node>
|
| 92 |
+
<node id="29">
|
| 93 |
+
<data key="d0">i</data>
|
| 94 |
+
</node>
|
| 95 |
+
<node id="30">
|
| 96 |
+
<data key="d0">d</data>
|
| 97 |
+
</node>
|
| 98 |
+
<node id="31">
|
| 99 |
+
<data key="d0">d</data>
|
| 100 |
+
</node>
|
| 101 |
+
<node id="32">
|
| 102 |
+
<data key="d0">f</data>
|
| 103 |
+
</node>
|
| 104 |
+
<node id="33">
|
| 105 |
+
<data key="d0">e</data>
|
| 106 |
+
</node>
|
| 107 |
+
<node id="34">
|
| 108 |
+
<data key="d0">i</data>
|
| 109 |
+
</node>
|
| 110 |
+
<node id="35">
|
| 111 |
+
<data key="d0">a</data>
|
| 112 |
+
</node>
|
| 113 |
+
<node id="36">
|
| 114 |
+
<data key="d0">j</data>
|
| 115 |
+
</node>
|
| 116 |
+
<node id="37">
|
| 117 |
+
<data key="d0">c</data>
|
| 118 |
+
</node>
|
| 119 |
+
<node id="38">
|
| 120 |
+
<data key="d0">i</data>
|
| 121 |
+
</node>
|
| 122 |
+
<node id="39">
|
| 123 |
+
<data key="d0">e</data>
|
| 124 |
+
</node>
|
| 125 |
+
<node id="40">
|
| 126 |
+
<data key="d0">b</data>
|
| 127 |
+
</node>
|
| 128 |
+
<node id="41">
|
| 129 |
+
<data key="d0">d</data>
|
| 130 |
+
</node>
|
| 131 |
+
<node id="42">
|
| 132 |
+
<data key="d0">j</data>
|
| 133 |
+
</node>
|
| 134 |
+
<node id="43">
|
| 135 |
+
<data key="d0">d</data>
|
| 136 |
+
</node>
|
| 137 |
+
<node id="44">
|
| 138 |
+
<data key="d0">e</data>
|
| 139 |
+
</node>
|
| 140 |
+
<node id="45">
|
| 141 |
+
<data key="d0">d</data>
|
| 142 |
+
</node>
|
| 143 |
+
<node id="46">
|
| 144 |
+
<data key="d0">e</data>
|
| 145 |
+
</node>
|
| 146 |
+
<node id="47">
|
| 147 |
+
<data key="d0">d</data>
|
| 148 |
+
</node>
|
| 149 |
+
<node id="48">
|
| 150 |
+
<data key="d0">f</data>
|
| 151 |
+
</node>
|
| 152 |
+
<node id="49">
|
| 153 |
+
<data key="d0">d</data>
|
| 154 |
+
</node>
|
| 155 |
+
<node id="50">
|
| 156 |
+
<data key="d0">g</data>
|
| 157 |
+
</node>
|
| 158 |
+
<node id="51">
|
| 159 |
+
<data key="d0">h</data>
|
| 160 |
+
</node>
|
| 161 |
+
<node id="52">
|
| 162 |
+
<data key="d0">j</data>
|
| 163 |
+
</node>
|
| 164 |
+
<node id="53">
|
| 165 |
+
<data key="d0">e</data>
|
| 166 |
+
</node>
|
| 167 |
+
<node id="54">
|
| 168 |
+
<data key="d0">f</data>
|
| 169 |
+
</node>
|
| 170 |
+
<node id="55">
|
| 171 |
+
<data key="d0">d</data>
|
| 172 |
+
</node>
|
| 173 |
+
<node id="56">
|
| 174 |
+
<data key="d0">b</data>
|
| 175 |
+
</node>
|
| 176 |
+
<node id="57">
|
| 177 |
+
<data key="d0">d</data>
|
| 178 |
+
</node>
|
| 179 |
+
<node id="58">
|
| 180 |
+
<data key="d0">h</data>
|
| 181 |
+
</node>
|
| 182 |
+
<node id="59">
|
| 183 |
+
<data key="d0">a</data>
|
| 184 |
+
</node>
|
| 185 |
+
<node id="60">
|
| 186 |
+
<data key="d0">j</data>
|
| 187 |
+
</node>
|
| 188 |
+
<node id="61">
|
| 189 |
+
<data key="d0">g</data>
|
| 190 |
+
</node>
|
| 191 |
+
<node id="62">
|
| 192 |
+
<data key="d0">e</data>
|
| 193 |
+
</node>
|
| 194 |
+
<node id="63">
|
| 195 |
+
<data key="d0">f</data>
|
| 196 |
+
</node>
|
| 197 |
+
<node id="64">
|
| 198 |
+
<data key="d0">c</data>
|
| 199 |
+
</node>
|
| 200 |
+
<node id="65">
|
| 201 |
+
<data key="d0">j</data>
|
| 202 |
+
</node>
|
| 203 |
+
<node id="66">
|
| 204 |
+
<data key="d0">d</data>
|
| 205 |
+
</node>
|
| 206 |
+
<node id="67">
|
| 207 |
+
<data key="d0">b</data>
|
| 208 |
+
</node>
|
| 209 |
+
<node id="68">
|
| 210 |
+
<data key="d0">a</data>
|
| 211 |
+
</node>
|
| 212 |
+
<node id="69">
|
| 213 |
+
<data key="d0">f</data>
|
| 214 |
+
</node>
|
| 215 |
+
<node id="70">
|
| 216 |
+
<data key="d0">h</data>
|
| 217 |
+
</node>
|
| 218 |
+
<node id="71">
|
| 219 |
+
<data key="d0">i</data>
|
| 220 |
+
</node>
|
| 221 |
+
<node id="72">
|
| 222 |
+
<data key="d0">c</data>
|
| 223 |
+
</node>
|
| 224 |
+
<node id="73">
|
| 225 |
+
<data key="d0">d</data>
|
| 226 |
+
</node>
|
| 227 |
+
<node id="74">
|
| 228 |
+
<data key="d0">j</data>
|
| 229 |
+
</node>
|
| 230 |
+
<node id="75">
|
| 231 |
+
<data key="d0">f</data>
|
| 232 |
+
</node>
|
| 233 |
+
<node id="76">
|
| 234 |
+
<data key="d0">e</data>
|
| 235 |
+
</node>
|
| 236 |
+
<node id="77">
|
| 237 |
+
<data key="d0">h</data>
|
| 238 |
+
</node>
|
| 239 |
+
<node id="78">
|
| 240 |
+
<data key="d0">f</data>
|
| 241 |
+
</node>
|
| 242 |
+
<node id="79">
|
| 243 |
+
<data key="d0">j</data>
|
| 244 |
+
</node>
|
| 245 |
+
<node id="80">
|
| 246 |
+
<data key="d0">a</data>
|
| 247 |
+
</node>
|
| 248 |
+
<node id="81">
|
| 249 |
+
<data key="d0">d</data>
|
| 250 |
+
</node>
|
| 251 |
+
<node id="82">
|
| 252 |
+
<data key="d0">e</data>
|
| 253 |
+
</node>
|
| 254 |
+
<node id="83">
|
| 255 |
+
<data key="d0">g</data>
|
| 256 |
+
</node>
|
| 257 |
+
<node id="84">
|
| 258 |
+
<data key="d0">i</data>
|
| 259 |
+
</node>
|
| 260 |
+
<node id="85">
|
| 261 |
+
<data key="d0">g</data>
|
| 262 |
+
</node>
|
| 263 |
+
<node id="86">
|
| 264 |
+
<data key="d0">f</data>
|
| 265 |
+
</node>
|
| 266 |
+
<node id="87">
|
| 267 |
+
<data key="d0">h</data>
|
| 268 |
+
</node>
|
| 269 |
+
<node id="88">
|
| 270 |
+
<data key="d0">d</data>
|
| 271 |
+
</node>
|
| 272 |
+
<node id="89">
|
| 273 |
+
<data key="d0">a</data>
|
| 274 |
+
</node>
|
| 275 |
+
<node id="90">
|
| 276 |
+
<data key="d0">c</data>
|
| 277 |
+
</node>
|
| 278 |
+
<node id="91">
|
| 279 |
+
<data key="d0">e</data>
|
| 280 |
+
</node>
|
| 281 |
+
<node id="92">
|
| 282 |
+
<data key="d0">g</data>
|
| 283 |
+
</node>
|
| 284 |
+
<node id="93">
|
| 285 |
+
<data key="d0">d</data>
|
| 286 |
+
</node>
|
| 287 |
+
<node id="94">
|
| 288 |
+
<data key="d0">h</data>
|
| 289 |
+
</node>
|
| 290 |
+
<node id="95">
|
| 291 |
+
<data key="d0">i</data>
|
| 292 |
+
</node>
|
| 293 |
+
<node id="96">
|
| 294 |
+
<data key="d0">i</data>
|
| 295 |
+
</node>
|
| 296 |
+
<node id="97">
|
| 297 |
+
<data key="d0">d</data>
|
| 298 |
+
</node>
|
| 299 |
+
<node id="98">
|
| 300 |
+
<data key="d0">b</data>
|
| 301 |
+
</node>
|
| 302 |
+
<node id="99">
|
| 303 |
+
<data key="d0">a</data>
|
| 304 |
+
</node>
|
| 305 |
+
<edge source="0" target="1" />
|
| 306 |
+
<edge source="1" target="0" />
|
| 307 |
+
<edge source="1" target="11" />
|
| 308 |
+
<edge source="1" target="2" />
|
| 309 |
+
<edge source="2" target="1" />
|
| 310 |
+
<edge source="2" target="12" />
|
| 311 |
+
<edge source="2" target="3" />
|
| 312 |
+
<edge source="3" target="2" />
|
| 313 |
+
<edge source="4" target="14" />
|
| 314 |
+
<edge source="4" target="5" />
|
| 315 |
+
<edge source="5" target="4" />
|
| 316 |
+
<edge source="5" target="15" />
|
| 317 |
+
<edge source="5" target="6" />
|
| 318 |
+
<edge source="6" target="5" />
|
| 319 |
+
<edge source="6" target="7" />
|
| 320 |
+
<edge source="7" target="6" />
|
| 321 |
+
<edge source="7" target="17" />
|
| 322 |
+
<edge source="7" target="8" />
|
| 323 |
+
<edge source="8" target="7" />
|
| 324 |
+
<edge source="8" target="18" />
|
| 325 |
+
<edge source="9" target="19" />
|
| 326 |
+
<edge source="10" target="11" />
|
| 327 |
+
<edge source="11" target="1" />
|
| 328 |
+
<edge source="11" target="10" />
|
| 329 |
+
<edge source="11" target="21" />
|
| 330 |
+
<edge source="12" target="2" />
|
| 331 |
+
<edge source="12" target="22" />
|
| 332 |
+
<edge source="12" target="13" />
|
| 333 |
+
<edge source="13" target="12" />
|
| 334 |
+
<edge source="14" target="4" />
|
| 335 |
+
<edge source="14" target="15" />
|
| 336 |
+
<edge source="15" target="5" />
|
| 337 |
+
<edge source="15" target="14" />
|
| 338 |
+
<edge source="15" target="25" />
|
| 339 |
+
<edge source="17" target="7" />
|
| 340 |
+
<edge source="17" target="18" />
|
| 341 |
+
<edge source="18" target="8" />
|
| 342 |
+
<edge source="18" target="17" />
|
| 343 |
+
<edge source="18" target="28" />
|
| 344 |
+
<edge source="18" target="19" />
|
| 345 |
+
<edge source="19" target="9" />
|
| 346 |
+
<edge source="19" target="18" />
|
| 347 |
+
<edge source="20" target="30" />
|
| 348 |
+
<edge source="21" target="11" />
|
| 349 |
+
<edge source="21" target="31" />
|
| 350 |
+
<edge source="22" target="12" />
|
| 351 |
+
<edge source="22" target="32" />
|
| 352 |
+
<edge source="22" target="23" />
|
| 353 |
+
<edge source="23" target="22" />
|
| 354 |
+
<edge source="23" target="24" />
|
| 355 |
+
<edge source="24" target="23" />
|
| 356 |
+
<edge source="24" target="34" />
|
| 357 |
+
<edge source="24" target="25" />
|
| 358 |
+
<edge source="25" target="15" />
|
| 359 |
+
<edge source="25" target="24" />
|
| 360 |
+
<edge source="25" target="35" />
|
| 361 |
+
<edge source="26" target="27" />
|
| 362 |
+
<edge source="27" target="26" />
|
| 363 |
+
<edge source="27" target="37" />
|
| 364 |
+
<edge source="27" target="28" />
|
| 365 |
+
<edge source="28" target="18" />
|
| 366 |
+
<edge source="28" target="27" />
|
| 367 |
+
<edge source="28" target="38" />
|
| 368 |
+
<edge source="28" target="29" />
|
| 369 |
+
<edge source="29" target="28" />
|
| 370 |
+
<edge source="29" target="39" />
|
| 371 |
+
<edge source="30" target="20" />
|
| 372 |
+
<edge source="30" target="31" />
|
| 373 |
+
<edge source="31" target="21" />
|
| 374 |
+
<edge source="31" target="30" />
|
| 375 |
+
<edge source="31" target="41" />
|
| 376 |
+
<edge source="32" target="22" />
|
| 377 |
+
<edge source="32" target="42" />
|
| 378 |
+
<edge source="32" target="33" />
|
| 379 |
+
<edge source="33" target="32" />
|
| 380 |
+
<edge source="34" target="24" />
|
| 381 |
+
<edge source="35" target="25" />
|
| 382 |
+
<edge source="35" target="36" />
|
| 383 |
+
<edge source="36" target="35" />
|
| 384 |
+
<edge source="36" target="46" />
|
| 385 |
+
<edge source="36" target="37" />
|
| 386 |
+
<edge source="37" target="27" />
|
| 387 |
+
<edge source="37" target="36" />
|
| 388 |
+
<edge source="37" target="47" />
|
| 389 |
+
<edge source="38" target="28" />
|
| 390 |
+
<edge source="38" target="39" />
|
| 391 |
+
<edge source="39" target="29" />
|
| 392 |
+
<edge source="39" target="38" />
|
| 393 |
+
<edge source="41" target="31" />
|
| 394 |
+
<edge source="41" target="51" />
|
| 395 |
+
<edge source="41" target="42" />
|
| 396 |
+
<edge source="42" target="32" />
|
| 397 |
+
<edge source="42" target="41" />
|
| 398 |
+
<edge source="42" target="52" />
|
| 399 |
+
<edge source="43" target="53" />
|
| 400 |
+
<edge source="45" target="46" />
|
| 401 |
+
<edge source="46" target="36" />
|
| 402 |
+
<edge source="46" target="45" />
|
| 403 |
+
<edge source="46" target="47" />
|
| 404 |
+
<edge source="47" target="37" />
|
| 405 |
+
<edge source="47" target="46" />
|
| 406 |
+
<edge source="47" target="57" />
|
| 407 |
+
<edge source="47" target="48" />
|
| 408 |
+
<edge source="48" target="47" />
|
| 409 |
+
<edge source="48" target="58" />
|
| 410 |
+
<edge source="50" target="60" />
|
| 411 |
+
<edge source="50" target="51" />
|
| 412 |
+
<edge source="51" target="41" />
|
| 413 |
+
<edge source="51" target="50" />
|
| 414 |
+
<edge source="51" target="61" />
|
| 415 |
+
<edge source="51" target="52" />
|
| 416 |
+
<edge source="52" target="42" />
|
| 417 |
+
<edge source="52" target="51" />
|
| 418 |
+
<edge source="52" target="62" />
|
| 419 |
+
<edge source="53" target="43" />
|
| 420 |
+
<edge source="53" target="54" />
|
| 421 |
+
<edge source="54" target="53" />
|
| 422 |
+
<edge source="54" target="55" />
|
| 423 |
+
<edge source="55" target="54" />
|
| 424 |
+
<edge source="55" target="65" />
|
| 425 |
+
<edge source="56" target="66" />
|
| 426 |
+
<edge source="56" target="57" />
|
| 427 |
+
<edge source="57" target="47" />
|
| 428 |
+
<edge source="57" target="56" />
|
| 429 |
+
<edge source="57" target="58" />
|
| 430 |
+
<edge source="58" target="48" />
|
| 431 |
+
<edge source="58" target="57" />
|
| 432 |
+
<edge source="58" target="68" />
|
| 433 |
+
<edge source="60" target="50" />
|
| 434 |
+
<edge source="60" target="70" />
|
| 435 |
+
<edge source="61" target="51" />
|
| 436 |
+
<edge source="61" target="71" />
|
| 437 |
+
<edge source="61" target="62" />
|
| 438 |
+
<edge source="62" target="52" />
|
| 439 |
+
<edge source="62" target="61" />
|
| 440 |
+
<edge source="63" target="73" />
|
| 441 |
+
<edge source="63" target="64" />
|
| 442 |
+
<edge source="64" target="63" />
|
| 443 |
+
<edge source="64" target="74" />
|
| 444 |
+
<edge source="64" target="65" />
|
| 445 |
+
<edge source="65" target="55" />
|
| 446 |
+
<edge source="65" target="64" />
|
| 447 |
+
<edge source="65" target="75" />
|
| 448 |
+
<edge source="66" target="56" />
|
| 449 |
+
<edge source="66" target="76" />
|
| 450 |
+
<edge source="67" target="77" />
|
| 451 |
+
<edge source="68" target="58" />
|
| 452 |
+
<edge source="68" target="78" />
|
| 453 |
+
<edge source="68" target="69" />
|
| 454 |
+
<edge source="69" target="68" />
|
| 455 |
+
<edge source="69" target="79" />
|
| 456 |
+
<edge source="70" target="60" />
|
| 457 |
+
<edge source="70" target="71" />
|
| 458 |
+
<edge source="71" target="61" />
|
| 459 |
+
<edge source="71" target="70" />
|
| 460 |
+
<edge source="71" target="72" />
|
| 461 |
+
<edge source="72" target="71" />
|
| 462 |
+
<edge source="72" target="73" />
|
| 463 |
+
<edge source="73" target="63" />
|
| 464 |
+
<edge source="73" target="72" />
|
| 465 |
+
<edge source="73" target="83" />
|
| 466 |
+
<edge source="73" target="74" />
|
| 467 |
+
<edge source="74" target="64" />
|
| 468 |
+
<edge source="74" target="73" />
|
| 469 |
+
<edge source="74" target="84" />
|
| 470 |
+
<edge source="74" target="75" />
|
| 471 |
+
<edge source="75" target="65" />
|
| 472 |
+
<edge source="75" target="74" />
|
| 473 |
+
<edge source="75" target="76" />
|
| 474 |
+
<edge source="76" target="66" />
|
| 475 |
+
<edge source="76" target="75" />
|
| 476 |
+
<edge source="76" target="86" />
|
| 477 |
+
<edge source="76" target="77" />
|
| 478 |
+
<edge source="77" target="67" />
|
| 479 |
+
<edge source="77" target="76" />
|
| 480 |
+
<edge source="77" target="87" />
|
| 481 |
+
<edge source="77" target="78" />
|
| 482 |
+
<edge source="78" target="68" />
|
| 483 |
+
<edge source="78" target="77" />
|
| 484 |
+
<edge source="79" target="69" />
|
| 485 |
+
<edge source="79" target="89" />
|
| 486 |
+
<edge source="81" target="91" />
|
| 487 |
+
<edge source="82" target="83" />
|
| 488 |
+
<edge source="83" target="73" />
|
| 489 |
+
<edge source="83" target="82" />
|
| 490 |
+
<edge source="84" target="74" />
|
| 491 |
+
<edge source="85" target="95" />
|
| 492 |
+
<edge source="85" target="86" />
|
| 493 |
+
<edge source="86" target="76" />
|
| 494 |
+
<edge source="86" target="85" />
|
| 495 |
+
<edge source="86" target="96" />
|
| 496 |
+
<edge source="86" target="87" />
|
| 497 |
+
<edge source="87" target="77" />
|
| 498 |
+
<edge source="87" target="86" />
|
| 499 |
+
<edge source="87" target="97" />
|
| 500 |
+
<edge source="87" target="88" />
|
| 501 |
+
<edge source="88" target="87" />
|
| 502 |
+
<edge source="88" target="98" />
|
| 503 |
+
<edge source="88" target="89" />
|
| 504 |
+
<edge source="89" target="79" />
|
| 505 |
+
<edge source="89" target="88" />
|
| 506 |
+
<edge source="90" target="91" />
|
| 507 |
+
<edge source="91" target="81" />
|
| 508 |
+
<edge source="91" target="90" />
|
| 509 |
+
<edge source="91" target="92" />
|
| 510 |
+
<edge source="92" target="91" />
|
| 511 |
+
<edge source="94" target="95" />
|
| 512 |
+
<edge source="95" target="85" />
|
| 513 |
+
<edge source="95" target="94" />
|
| 514 |
+
<edge source="96" target="86" />
|
| 515 |
+
<edge source="96" target="97" />
|
| 516 |
+
<edge source="97" target="87" />
|
| 517 |
+
<edge source="97" target="96" />
|
| 518 |
+
<edge source="98" target="88" />
|
| 519 |
+
</graph>
|
| 520 |
+
</graphml>
|
data/maze/100/meta_A1_RWs.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f17e1eb7e423deb66bb372367a8555b9bab843efe8cb7a8bde627874ea4d4b2
|
| 3 |
+
size 1787
|
data/maze/100/meta_C1_RWs.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f17e1eb7e423deb66bb372367a8555b9bab843efe8cb7a8bde627874ea4d4b2
|
| 3 |
+
size 1787
|
data/maze/100/meta_E1_RWs.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b4ef166a533d020bcb4d06c1b3284e4e4a78af3b0124d94d142dfc7209da8f3
|
| 3 |
+
size 1787
|
data/maze/100/meta_H1_RWs.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f17e1eb7e423deb66bb372367a8555b9bab843efe8cb7a8bde627874ea4d4b2
|
| 3 |
+
size 1787
|
data/maze/100/meta_I1_RWs.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f7615348444bb5f4988d8e680e19f183b84b80b91268e354df3c641737d88918
|
| 3 |
+
size 1797
|
data/maze/100/test_A1_RWs_10K.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/maze/100/test_A1_RWs_1K.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/maze/100/test_C1_RWs_100.txt
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
C 11 24 : F T T R L R R R L T T L L L R L L L R T L T L L T F T F L T R T T R F T F T L T T L L F R R R F L L L L T F T T
|
| 2 |
+
C 18 37 : L R T T T T T L T L T T T R L R R R R R F T T R T T T L F T R R R R F R T T T T T L T T L F T T L
|
| 3 |
+
C 31 23 : F F T T L T R R T T R T T F F T R R F T T T F F T T T R L T F T T
|
| 4 |
+
C 52 64 : T F L T T T T T R F T T R L F L T
|
| 5 |
+
C 63 45 : L T T L L L L T L L R L T R T T L T F L F F T F T F T T T F T T T T T F T F T F T F F F L R F L L F L F R T R T T T
|
| 6 |
+
C 83 80 : F T T T F T T T F F T R T R T T T L L F L T T T R F T F L R L T R F T F L T L L T F T F T T T F T L F F T R R T T T L L T F F T R T L L T F T T R T T R T L T T L F T R T R T T T
|
| 7 |
+
C 31 1 : F F T T L L T F L L L R T T T L T T L F R R T T T T T T T T T T T T T L T T T T L T T F T F R
|
| 8 |
+
C 14 22 : R R L R F F T T R T F T R F F T R L T F R T F T F T T T L L T L T
|
| 9 |
+
C 40 13 : L F T F T R L T L F T F F L T T T R L T T T T R T T L T T T F R R R R R R R F F L L T T L F R R T L L T R R F L T F
|
| 10 |
+
C 28 39 : T T F T F T L T T T L R R T
|
| 11 |
+
C 97 91 : T R T R R R L L F T L T R F F T T L L T F R T T T R L T F R T L T T T R T L L F T R T R L T F T F T T T T T R L T T T L T T T L T F T F
|
| 12 |
+
C 25 20 : T F F L T T L T T T T L L F L L L R F L T T T R L R T L L T T T R R F F T L T R T T L T F
|
| 13 |
+
C 60 61 : L R F F T T T L T L T R L T F
|
| 14 |
+
C 85 82 : T F F F T
|
| 15 |
+
C 39 21 : T T T T T T T T T T L F L L R F R L F L R R R T L L L T R R R R R F T L T R R T T T R T T T R L L L T R R T T T T R F T L R R R F R R R L R R
|
| 16 |
+
C 81 96 : L T F T L L T R R T T T R L T L F F R T R R T L T R R R T T T R T F F T T T T T R F T F
|
| 17 |
+
C 50 62 : F F R L L L F T F T L
|
| 18 |
+
C 98 89 : F L F T F R R T T R L T F R R T L L F T T T F R R F F R T R T T L T R T R L L T T T R R R R T L R T F T L F F L L T F T L T L T R T R R T T R T T T L L F T R T T L L L L R T L L T
|
| 19 |
+
C 83 80 : F L T T L F L R F T T R T T R T L T T T T T R R R
|
| 20 |
+
C 41 93 : F T T T T F T T T T T T F T F T T T F R F R F R R T L R T F L T L F R T R T L R T L T L F T T T L F L T R T R F F
|
| 21 |
+
C 73 52 : T L T T L F L R T F F L R L T T T T T F L T T T T T T L L R T R L R T T F R T L T F L T T L T F L T T T T T R F T T F R T R F T L R T T T L R T L
|
| 22 |
+
C 47 88 : R L F T T T F T R L T L F F T R T
|
| 23 |
+
C 54 75 : R R T F F T T T L R L R T L R
|
| 24 |
+
C 85 76 : R R T F L F R T
|
| 25 |
+
C 37 5 : R T T T T T F R F T R R T T T R L F F T F F F T F F F F T F T F F T F F F F T F F F F T T T F
|
| 26 |
+
C 4 7 : T T F T T F F F F T T T T T T T F F F T T T T T F T T F T T T T R T R T F F F T F F T F T
|
| 27 |
+
C 18 37 : F R F T F L R R T T T T T T T T T L F L L L L L L L T T T R T L L R F T R F T L T T T
|
| 28 |
+
C 25 11 : F T F F F L L L L F T F R R R F T R L L F L F T L F R F T F L F F T F L T R L T F L F R T
|
| 29 |
+
C 76 84 : T F T F T F T F F T L R L T R L R T F F L T R T F F T F R R F F F L T T T T T F R R F T F L T R T T T L T T L T T T R R L F T F T L R T L T T T R F R R T L R F R T T R T T L R F T F L L T T
|
| 30 |
+
C 2 45 : T L T R T T T T T L R T L R T T T L R T T T F T R T T T L R L R T T R T L R F R T L R R F R L F F R R T L F L L R L R T L R T F F L L F L T R F L
|
| 31 |
+
C 96 50 : F T T T F T T R R L R T L R F R R L T R L T R L R L T R F F F T L L F F T T L T R F T F T T L T T T T T R T L T R F T F T F F T L T R T L T L T T F T T T T L T R T L T R T
|
| 32 |
+
C 58 27 : R T L R T T F F T T
|
| 33 |
+
C 15 7 : T T F R L F F T R R R F T T R T L F L T T L L T R F L T T T F T F F F T T T F F R F L L T F R T L L R T L T R R R F T F L L T R T R L
|
| 34 |
+
C 19 24 : R T T R F L F T F R L T L R T L R F L T F T L L R F R T T T T T L L F F R T T L F F F T R L L R T F L T R T L R F L R T L T R T F F L R F F L L F F T F T T F T T T F L
|
| 35 |
+
C 39 56 : L T R T T T T T T T L T T L T T T R T L T L L L R T F L T F T T R T T T T T L L T T F T F L L L R L T T F T L T T F L F L R T L T R R T T F F R L F F T F T F L T T T T T R F R T R T T R L L R F
|
| 36 |
+
C 52 82 : R T R R R F T T T T T L R R R T L T L T F T F F R R F T R T T R F T T T T T F L R T T L T R F F L
|
| 37 |
+
C 31 63 : L T R L T F T T T L L T R T F T T F T F T T R R T T T L L L T L T T L F R T L F T R F F T T F T F F R L F F R R T L R T T T L R T L L F F F F R R T T T L T R F T R F F L R T T R F F
|
| 38 |
+
C 25 23 : T R T L F T F F
|
| 39 |
+
C 96 54 : L L F R R F R F T T T F T R F F T L T L R T L R L T F T T F T R R L F T T T F R T T L T T R F T F T T L T T L R
|
| 40 |
+
C 74 83 : R L T R T L T F F R T L F T F F T F T F R T T L T T L T R R R T F F
|
| 41 |
+
C 9 7 : T L F L R R T L L R T L L L R T F T F L F T F T T R F T T L L L R L F T F T T T T T T T T T F F F T T F T T T F T T T F T T T F T F T T T T T F F F
|
| 42 |
+
C 13 48 : F T L T L F T F R L T R T L F F F R F F T T L L T F F T R T R T L T T T R F
|
| 43 |
+
C 85 96 : F T T R L T F T
|
| 44 |
+
C 39 8 : T T T T T T T T T T L F T T L R R T F T R T
|
| 45 |
+
C 97 83 : T T T F F T L L T T F T T T F F R R R T R T F F T R L L T T R T T T L R L L F L T L T R R T F T R R T L L T F T F R L T T T R T L T F F T T T F T T L R L T F R T T R T L F T F F T L L T T R T R
|
| 46 |
+
C 73 56 : F R R T L T L R L L F R T F R R L F T F T L R L L L L F R T L T F R L T R T F R R T R T F T R F L F L R R L T L T T T T R R F
|
| 47 |
+
C 2 47 : T L L T R R T L T T T R T T T T T L T R T L L T R R T L L F R R F T F L T F T R L R F R L R R T T T R T T F L L T L T T T R T R R T L R T L R
|
| 48 |
+
C 86 54 : L T T T F T T R R L F T F T T T T T T F L T T R T L R F R L F T F F F F T L T R T T T F T R F L T F F F T F L L T F L L R R L T R L R T L L R R L T L R T L F T T
|
| 49 |
+
C 28 39 : T T L R T L L R T F T T T R T R R T L F L L L L L R T T T L R F R T
|
| 50 |
+
C 21 11 : R L F L L R T R L R R T L L R L R T F F T T T L T
|
| 51 |
+
C 41 62 : F T T F F F R R R R T F F F T F F F R L R R L T L F R T R F T T T T T L T L L T L T R T T L L T R T L T L F T F F R T L L T R R R F T T T T T L L F T F R R T T T T T L T T R R R F T L L T R
|
| 52 |
+
C 21 23 : R L T T F T F T F L T T F T R R R T L R T L T R T R T R R T R F F L L F T T T T T F T F L R T T F T T R R F R T L L R F L L L F R R F T L T R T R L R F T F T T F L
|
| 53 |
+
C 42 63 : T T T T F F T T T F F T F F T T R T L F F T T T F F F T L L F R T T T T R F R R L T L R R F F
|
| 54 |
+
C 84 93 : L T T L F L L F T F F L T R T F L T F T F T T T R R T L L T R F F T T F T T F T T F T T R R T L T T T T L F F T L L T T T R L R T R T T R L T T T R T R F F T T T T T T
|
| 55 |
+
C 93 61 : F T T F T T L L F F F F T T L T R R T F T L L T T T L T T F L T R F R T T R F T T R T T T T R T L R L L F R L F T F R R F T L L F L T T T R T L T T T R T T T L T T T T T R F F T T R T T R F
|
| 56 |
+
C 74 43 : T F T F F L R T F T F T F F T T F R T R T F L L F T R L F L F R T F F F T T T F F T F F T F
|
| 57 |
+
C 8 39 : F T T T T T L F R F R T L F L R T R T L R F T F L R L T R F L R
|
| 58 |
+
C 91 86 : L F T R L T T T T T R R T L T F T F R R T T T L T R R R R R R T T L L T L F L L T T T F F R T T T R T F R T L R T T
|
| 59 |
+
C 29 18 : R T L R F R T L L R T L R R T L T L T T F T F F T L F R T L F L F T T F T T T F F F T T T F T R L R T T T T T T F R T L T T F L R T T T
|
| 60 |
+
C 65 28 : T R R L T L R R T L T T L R T R L T R T R R T L F T F T T L T T F T F F R R R R L R F R T T T F R F L T T L L
|
| 61 |
+
C 47 99 : R T T T T L F L T R L F T T F L R R R R T T T L T R R T F T F R R F T F T R R T T R T L F T T T F
|
| 62 |
+
C 82 71 : T F L T T T F R T T R F T L R R
|
| 63 |
+
C 78 18 : L R T R F T R T R F T R T T T T T R R L L T R T T T T T T R T L T R F R F F T T R L R R T L L T T T R T T T
|
| 64 |
+
C 81 74 : L L T T T R L F T R R T L L T T F L T T
|
| 65 |
+
C 77 44 : T F T F T T T L F L T F F T F T F T F F T R F L R R L L T T F T L L L T L F T T T F F T
|
| 66 |
+
C 42 53 : F F R F T T T F L F T T F T T T F F T F F T F F R T T L T L R F R L F L T T T R T T F F R T T T L F F T F T T R L L L T T F F T F T T T T F R R T T R R R T T T L T
|
| 67 |
+
C 31 13 : T T T R T F T R F L F R R R L T T R R R L R F R L R T R F T F F F L T L R R R T L T T L R T L T L T R L R T T T R T T T F F
|
| 68 |
+
C 75 85 : T L R T T F R T L F F T T F L L F T T L R T T T F R L T T F T F R R T F F F R R T T F F F F T T T F T T R T L T R L T R R F T F L T T T L F T L R T R R R
|
| 69 |
+
C 61 54 : F F L T R R R R L F T F T T F T L L F F T F R R T L L T R R T L L F T F R T R T L L F T T L T L T R T R T T R L T T F T R T R T T R L F T R
|
| 70 |
+
C 15 30 : F T F F T T F T F T L F T F L T T T R F T L R R R R T F T F T F T L T R L R T T T T T L L F L L T T F L L T F L T F T L F T R R F T F F F L T R T L R L T T T T R T L R F R R T T F F L T R T
|
| 71 |
+
C 69 58 : T R L R T L R L T R T F F F L T R F F T T F L T
|
| 72 |
+
C 14 28 : R L F T F F L T F T T R F F T T R T L F F T T T F T T T L L F F F L R R F T L R F R T T T T T F T R L R R R T
|
| 73 |
+
C 65 93 : F L F T T T T T R T R R T L T T T R L L R T L R T L F T L F R T T F F T F L T L F T F F F T T T T
|
| 74 |
+
C 61 26 : F F F T F T F F F T F T R T L R R L T T F T F L T R T T F F L T T F R L T T F F T F T T F T T T L R T F L L L T L R R T L T T R T F R L F L L T F F R
|
| 75 |
+
C 97 84 : T T T T T T T T T F T L F T F L T F F T F F T R L L L F T T T T T R F R T L T R T T T T T L T R T T T T T F T F T T T F T F T F T R R F T F L L F L
|
| 76 |
+
C 29 35 : R R T L T R T L T T L F L R F
|
| 77 |
+
C 79 78 : R R L T F
|
| 78 |
+
C 29 33 : T T L L T R T L L T F R T L T T T T L R T T R R T L T F F F T T F R L L F
|
| 79 |
+
C 19 7 : T T T T R T T F R T T T L L T R T L R T T F L
|
| 80 |
+
C 60 53 : L T T R F T T F T T T L L L T T T T L T T L T R
|
| 81 |
+
C 24 45 : T R T L F T T F T T T L T L R R F R R T T L F T T R T L R F T T T T T F L R T T L T L T F T T R R T T T L
|
| 82 |
+
C 63 76 : T T F T R L F F T T L T R T T F F T L T T R T T T F T F T F L T L F R L F T F F F F L R T F T T T R R T T T T T T T T F F L L F T L R T L R T F R T R T F T R T T T L T T T F T T T T T T T L L R R T L
|
| 83 |
+
C 28 16 : T F F F T F L T T L T T T R T T T L T R L R R T T T T T L L T F L T R T L T R L T L R
|
| 84 |
+
C 58 37 : R F T F L R F L T T T
|
| 85 |
+
C 22 59 : T T L R F F F T F T T T F T T T T T T T T T T T T T F L L R F T F R F F T L R F R R F R F T T F L F T L L T R F T R R T L F L L T R
|
| 86 |
+
C 69 29 : T T T T T R T F F L L T F R R F F F R L T T L L R R T T F T F L R L T L T R T R R L L T T T R R F T T R F F R L R R T T T L R T F L R T T R T L L R T L T R F L T F T L L R T T T T
|
| 87 |
+
C 74 80 : T F L L T F F L T F R T T T T T T T L F T R R T R T F R T L R T T T R T T T L T L T R T T T F T R R R T L L F T R T F T F L L T R R F T L L T T T F T
|
| 88 |
+
C 50 23 : R T T T R F T F L T R F F T L R T F F T F T T T L L L T R R L L T R R T R R R R T T L T R T R T F F T T F T T L L R T R T L F F R F T F T L T T T R F F L T F R F F T F L R F F T T T F
|
| 89 |
+
C 21 37 : R L T F L T R T R T F T R L T R T L R F R R F F T L R T T R L L F R R L F T L L F T T T T T F T F L R L R T L R L F T F T R T L T R T R F T T L F T F R F L T
|
| 90 |
+
C 42 86 : F F R T T F R R L F T T F T T T T L T R T L T T T R F T T F T F T T T T F L T R F T T F R R T F F R L R F T T L T F R L R T L R R T T F T T T F F L L F T R L F T F R R T T
|
| 91 |
+
C 74 43 : R L R R F T F T T F L F R T T T F T T F F T T T F L L T R T T T T T T R L R T T T F T T F R R T T T F T R F T T L R R T F F R T L T T L F R R T L L L T R L T R T L T T
|
| 92 |
+
C 78 49 : L T F L L T F R T L L R F F T F T T F L R R R F F T F L R T F T F T L T R R R R R R R R R T T R R F T T F F L R T T T L F T L L T R F R T L F L T L T F R T T L T R T T T L L T
|
| 93 |
+
C 64 76 : L T T T L T T R R T T T F
|
| 94 |
+
C 23 14 : R R R T R R R L T L L L F F T F T F T F R R L T T R L T F T T T L L T T T T T T T L T T T T F T T L R L T R T T F L R R T T R R L T R R L R T L L L L T
|
| 95 |
+
C 96 54 : T R R T F F F T T F R T T T F T L R T T R T T R R L T R L T R L T F R R R T R T T T T T F T L F T R T T T T R T T F F L L R R T
|
| 96 |
+
C 48 78 : F T L T R R T L L F L T R T F T T F F T T L L T R T L T R T T T T T T R T T T T T T F F R T T T L F F L L F T T T R T T L T F
|
| 97 |
+
C 56 81 : L T F R L R T F F T T T F F L L R T T L F T R L L L T R R R R T T F T F T R R L T F T T L T F F T L L R L T R R F R T R L T R L R T T T L R F T L T F T T T F L T T L L T T F F T F F R T L
|
| 98 |
+
C 5 44 : F F T T T F F T F T F T T T F F F R F L L T T T R R T T F T F L R T T T F T F T L F L R T T F L R
|
| 99 |
+
C 98 68 : L F T L T R T F L L L L L T R F T L L T F T L L T F T L L T F T L R T L R R T L L L L L F T F T T R T T R F F T F F T F F R T R L T L R T T R R L L T
|
| 100 |
+
C 30 28 : F F F L L T L T R L R T F L L L R R R L R T F T R T T L L T T R F F R T L T T F F F T R F T F L L F R T F T F R R T T F F T T L L T F T T T T F R T T L F L R R R
|
data/maze/100/test_C1_RWs_10K.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/maze/100/test_E1_RWs_10K.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/maze/100/test_H1_RWs_10K.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/maze/100/test_I1_RWs_10K.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/maze/100/train_A1_RWs_500K.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:388cf2c5f45c60ddb2bb5901d804178cd4af45bf27661a19cb0b6fee59408b3c
|
| 3 |
+
size 129000000
|
data/maze/100/train_A1_RWs_500K.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d8cda5424503efbf95fe8762d86b37cc962e838af65d8b3c124585e479f30663
|
| 3 |
+
size 56839817
|
data/maze/100/train_C1_RWs_100.txt
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
| 1 |
+
C 42 4 : F T T T F T F T F T T T T T F F F L F L T R F R F F T F T T R T L F T F T T R L T R L F T T T T T F T F F T T T F F F L F L R T L F L T L F F L L R R T F F F F T T F T T T T T
|
| 2 |
+
C 64 66 : T T F R R F F T F T T F F F T L F R R L T F L R T T T F F T T F F L T T T T T R F F L R T T
|
| 3 |
+
C 82 81 : T T T F L T T T F T T T F T R L T T L L T T T R T L T R T T T L L R T F T
|
| 4 |
+
C 14 22 : T T T T T T F T T F R R T L T R T L L F L R F
|
| 5 |
+
C 23 49 : F T T F T F T F F L T L R R T R F T F F T T R F T F F F T F T F T L T R L F T R T T F T T R T T F L R T T F T T T F L T R T L T F T L L T R L R T L L R R R R R
|
| 6 |
+
C 11 14 : T T T T F T T R T L T T T R L F L R T F T R L F L T R L T L F F R T L R R T T T T R F R F
|
| 7 |
+
C 64 42 : T T F T R R F L T T T T T R F R T T L F T F F T F F T F F R T T L T T L T F T L F R R T L L F L T F R L R T L L F T L F T F T T R R L L T R R L L F L T T T T F
|
| 8 |
+
C 96 86 : T T L T R F T F L
|
| 9 |
+
C 61 62 : F L R T T T L
|
| 10 |
+
C 52 36 : F T T R L F R T L T F L F T R T L T T T F T L R L T T T L R F R F T T L T R F F L R L T R L T R T R L T T L F T T R F T F L
|
| 11 |
+
C 12 21 : T F T T T F T T R F T T T F T R T R L T F T L T L T R L
|
| 12 |
+
C 88 89 : R L T R F T L T T L T R T R T L T
|
| 13 |
+
C 44 54 : T T R T R R R R L T R F T F L F F T F T F T T T T T F T T F R
|
| 14 |
+
C 74 75 : T F L T T L T T F L T L R R T L R R R R L R L T F F T F F T F L L R F L F T F R L T L R R T R R L T T F T T L T T T R F F R L L T L R R L R T T T T T L L F T T L T R F T T R T L T F
|
| 15 |
+
C 49 59 : T T R T T T L L T T L
|
| 16 |
+
C 5 39 : T T F T T F T T F R F R F F T T T F F F L T T T F R T L T
|
| 17 |
+
C 23 58 : R R F R T T R R L L T T F L T R L F F T T L L T T T R L R T L R T L R F F L T T T R F T F L R L T L T T F T T F L L T T F T F T T R T T T L T R T L T T L R F F
|
| 18 |
+
C 12 11 : F R T L L R L L T T L F R R F R T T R L L T T L F L F R F F T F F T F F R R T L L T T F T T L L T T T F T L L T F F R T T T L T T F L T R F R R T L L F L L T R T L T F L R R F T T L
|
| 19 |
+
C 46 56 : R R T R T T T
|
| 20 |
+
C 15 14 : F T F F T
|
| 21 |
+
C 64 54 : T F R T R T T T F L L T T T T T T T R R F T F T F T T T T T F F T R L T R L T R T L T T F T T T F T T F F T L L T F T F F L T T T R T L T R F R L L T L F T F T L T T R T T T
|
| 22 |
+
C 73 55 : F R L T R T T L F T F F L L T R L R T T F L T R T L T F T F T F R R L R T T T F T T R R L F T F T F T T T R T T R T R T T T L T R L R R L F T R L F L T T R
|
| 23 |
+
C 13 56 : F R L T R R F T T T F L L F F R R T R T F L F L F R T R R R R T L F R T T R L L T T L F F F T F T R L T R T T R L F T
|
| 24 |
+
C 60 51 : L R T T T L T T T T T T T T T R
|
| 25 |
+
C 45 56 : T T L R F T F T F R F T T T F L T R T L F T F R T T F T T T F L F R T L T R L R L F T T T F T F F T T R T T T R T F T T R F R R T T T R T L T L F T T L R F F F R R F T T T T L R F T T T R L F R T
|
| 26 |
+
C 32 15 : T R R L R T L F L T R L L T T R L T T T F T F T T T T T R F L T T R L R F T T T T T L L R T R F T R L F F L F R R L L R T T T T L T F T L T L T F T L F F T R L L R T L R L T R T R T R F L R
|
| 27 |
+
C 10 42 : F F F R L L R T L R R T L L L F L R L R L T R L R L T T L F T L T L R F L L F L T F R L F T F F R R R L R F F R R L F F T F T T T
|
| 28 |
+
C 11 49 : L T R T L T L R T R T L L T R T L L R F T F L F T L R T R T R R R R R R F L T T T F T T T T T F T T T F T F T T T T T R F T R R L T L L L T T L L F F R T R F T T R F F T F L T R F L F L L T R R T L
|
| 29 |
+
C 7 8 : T F T F F F T F T R T R T T T T T F F T T F F T F F F F T T T
|
| 30 |
+
C 23 15 : F L T T T T L T F T F F L F R R T T R R R F R T L L T T T R L T T T R L R L T L R T T R F T L R F T T T R T T T L L R
|
| 31 |
+
C 62 50 : T T F F T F F T L L F L T T T T T T T R F R L T F T T T T T F T T L T T T T T L F T F T T T F T R R T L R R L L R T F F T T T F T F T F F T L R T F T R L L L L R T T T L L T T T F T T R T L F F
|
| 32 |
+
C 36 38 : F R T F R F R R
|
| 33 |
+
C 48 35 : F T L F T T T R T L L T T T L T T T F R L T T T T L T R R F R T T F L F L T F R T L T R T T T L F F R R T L F L T F R F R F R L T F L L T R T L T F R L T T T L F R L L L T R R R T T L L F T T R L F T
|
| 34 |
+
C 79 78 : R R T L T R R
|
| 35 |
+
C 65 74 : R R L R T F T R R L T T R T T L L T L T F T L F R L F T T T T T F R F R F F T T T L R R R R L T F R R F T L T R T L R R L F R R T F T F F T
|
| 36 |
+
C 20 30 : R F T R T R T F T F T T T T T T T T T T T T T F T F T F T R T T T R T F T F T
|
| 37 |
+
C 2 22 : T T T L T R T T T T T L T T R T F R R T
|
| 38 |
+
C 20 22 : R T T T T L F T F L T F T L F T T F T F R T L L
|
| 39 |
+
C 6 76 : F T T F R L T T R F R T L T T T R T L L R T T F T F T F R T L F R L F T L T L R L T L L T T T F T F T R R R T R L T F T T T F F F T F F T T F T T T F T F T L F R F R T R F T R F F R L L R R T F
|
| 40 |
+
C 5 4 : T T F T F T F T F F T F T F T F F T T T T F T T F R F L T T L L T R R T R T T R T T T L F T R T T T T T L L T T T R R T R T F T R R R R R T L T T T T L L T F L F F F F T T T T T
|
| 41 |
+
C 44 37 : F R T T R T T R L T R F T F L F T T F T F T F T T T T T T T F F T F F T T T F F F R T L L L L L L F L F T T L F T F T F T F T T T F T R R F R T T F
|
| 42 |
+
C 43 42 : T F T T T F T F T T T T T F F T F F T F T F T F T F T T T T T F T F T F F R T R T T T F F T T T T F T F F F T L T T L T R R L T R T T L L F L T R T T F R L T F T L L L L F F T T T T F T F T F T
|
| 43 |
+
C 62 52 : T T F T F T L L F L T T T R T L T T T T T R F
|
| 44 |
+
C 45 96 : T F T R L F L T T T F R L L F T T T T T L R T R L T R T
|
| 45 |
+
C 5 27 : T F T T T T T T T T T F T T F F T F T T T F T F F F T F T F T T T T T T T T T F T T F F F R F T F L F T F T T R F L T F F F T F R F F L T R F T T F R T T T F T F L R R T T F T L F
|
| 46 |
+
C 50 35 : F T L T R T L T T T R F T F T T T F F R T L T T F T T F T T L T T T T T T T T T T T T T R F F T L T L T R R T T T F T F T T T F F T F T F F T T T R R T R L F T F F L T T F T
|
| 47 |
+
C 81 86 : T T T L T R T T F T F R R T T R F T T T R F T T F F T R T T T L F
|
| 48 |
+
C 61 96 : F F F F T T R L F T L R T T T L R T L F T L F T F T F R R F F T T T T T T T F T T F T T L L R L F T F F T F F T T T F R L T T T R L L L L R T F T F T F T T L F L T F T T T F T T T F T L R T R
|
| 49 |
+
C 72 65 : F T T F F T T F T R T L F T F F T L
|
| 50 |
+
C 39 74 : T T T T L L F T T L T L F L T T F F L R R L L F T F F T F F T T T F F F T
|
| 51 |
+
C 23 39 : F F F L L T T T T T R L R T R L T T F T F R T T L T T F F T F L F T T R R L T T T R T T T F T T F F R R T T T L L F T L R R F T L T L T T T R R R T T R T T F T T
|
| 52 |
+
C 36 55 : F L T F T T T T T T F T F L T T F L R F F T T F T F F R T R R L L T R R T
|
| 53 |
+
C 2 30 : T L L T R T L F F T L R R R T F R R T L R T L R T T T L L F T L F L T R L T T L L F L T T L F L T R R T T L L L R T F R F T F T R T T T T T R
|
| 54 |
+
C 42 21 : T T T T T T F F F L R F L L R T T L T R R L L F L T F F L T T T R T L L T T R R T L T T L T R R T T T T T T R L L T R T L T R F T R T T R F F L R L F L R L R F T T R T T T T
|
| 55 |
+
C 36 51 : T L F L L T R F R T F R T T T L T T F T T T F T T R F F T L L F T T L T R F F R R R L
|
| 56 |
+
C 65 50 : R T L R R T R T T R R L R R F F F T T R R R R R L T T F L T R T T F F T F F T T T T L T R T L T R F T F
|
| 57 |
+
C 39 30 : L F T F T F T R F T F R T F T R R T T T R L T R T F T F L T R F T T R T R F R R T F F T T T F T L R L R F R T T T F T
|
| 58 |
+
C 66 54 : T T L F T F T L F L L T F T T F F T T T T T L T T T L F T F F T F F L
|
| 59 |
+
C 29 32 : T T L T R F T L F T L T T R R F T T T T F R T R F F R T R T T L L T
|
| 60 |
+
C 62 63 : F F T F F T L T R T L L T R L T F T L T R T L T L T R T T R T L L T F T L T T R T L R T F L L L T R R T T
|
| 61 |
+
C 30 1 : R T R F L T T R R R T T R F T L F T T T R L F R
|
| 62 |
+
C 48 59 : F T T T L R R F T F L T T F T T L L L T T L L L L R R F T F L F L T R T L T R R T T R T T T T R T L T R T T R F R F L T R F T T L F T L F T F T F T T T R T L F T F R T R T L T L T F L T L R R
|
| 63 |
+
C 8 3 : T F T T F T T T T F T T T F T F F T T T T
|
| 64 |
+
C 38 6 : F L T R T T T L F T R F T L T R T L F R T F F F F F T T T T T F F F T T F R T L F
|
| 65 |
+
C 27 12 : F T T F T T T F L F T L F T T R R T F T F T F R R F R L T R L F L T L L T R R T L F
|
| 66 |
+
C 5 27 : F T T T F F T T T T T T T F T T T F T T T T T F F T T F F F T T T T T L L T R T L R R F T T T T L T R F R T T R T L L F F T T R T L
|
| 67 |
+
C 44 89 : T F T F F L T T R F T F L T F L F T T T T R T L F R L F R T L T R F L R F F F L T T L
|
| 68 |
+
C 4 5 : T T T T F F T T F T T T T F F T F F T T F F F T T T T T F F F F T T T T F T F T T F F T T F T T T
|
| 69 |
+
C 31 30 : F L T R R T L T T F T R F R R F T L L R F R T F T F T T T T T T T F T F T
|
| 70 |
+
C 40 49 : L T T T T R L T R T F F T T T R F R F R R R T L L L L T R T F T F T T F T T T T F T F T F R L T T T T T F L L F L L T F L F R T T T L L T L R L T R T L R T R T T F L L R
|
| 71 |
+
C 47 68 : R L F T F T R L T R F R T L L L L T T L T R T T R T T R L F T
|
| 72 |
+
C 56 50 : R T F T F T L T T R L F T R F L R L T T F T T T T T F F F T F T L R F T T T F L R T F T F F T R L T T R T R F T L L F T R L L L F T T T R T R T T T F T R T R T T R R R L F T T T F R T T L L L F T T F
|
| 73 |
+
C 35 27 : L R L T T T L F F L T R T R R T L T R T T T L L F
|
| 74 |
+
C 66 74 : T L L T T F T T T F F
|
| 75 |
+
C 33 14 : T T T T T T T F F T L R R R R R L R F T F L T T L F L L L F R T L F R T F T T F T F R F T F L F T T R R T L T R T L T T T R T T T T T L L R F T F R R T T F T L T F L L F T F R R T L T T R F T T T F
|
| 76 |
+
C 99 58 : L F T R T T R T F L T T T R F T L T L L T T L F T R R F R T T T L T F F R R R T T R T L L T T L L
|
| 77 |
+
C 58 68 : R L T R T L T T T T T T T L T F R L L L T R T L L L T T T R F T F T R T L L L T T L F L T R R L L T T L R R T T T L L T L L L T R T T T L T R R F T T R T L F T R T T T F
|
| 78 |
+
C 57 11 : F T R T T T L F T R T F T L R F F L R L T T T T F T T F T R T L F F R R T L T R T L T R T L R T L T T T T R T T T T T L L T F T F T F T
|
| 79 |
+
C 8 6 : R T L F F F T T T F T F T T T T F T F T F T T T T T T T T T F F
|
| 80 |
+
C 97 65 : T T T R T R T L F T T L F L T L F T T L T T R R L T T L L F L R F R T T T T R F F F R T L L T R R T T T L F T R T R T T R R T L F T T T T T T T R T L T F T F T T T T T F T F T R F L R T L T R F F L
|
| 81 |
+
C 44 85 : F L R F R T L F L F T L F F T T T T F T F F R L F T R F T F T T L L T T T F T L F L L R R L L R L T T F T T T F R T L F T F T L F L R R T F T T T T R T L R L T F L R T F
|
| 82 |
+
C 80 94 : F T T F L T T R F T T R L R T L T F R R R R T F T R T T L T F F T F F T F F T T T F L T R
|
| 83 |
+
C 58 56 : F L L T R R F R F L F R T F R L T T L F
|
| 84 |
+
C 52 62 : F T L L L T T T T T L L R L L F F T T T F T T T F T T F T F F F L R T L T R T R L T R F F R L L T F T T F R L F T F T F L T T T T T T T T T T T T T R T L T T T R F F T F T F R L T F F T T T
|
| 85 |
+
C 88 89 : R L T R R R R R R L T T T R T T R T L T T T L T R R R R R T R F T F F L L F T
|
| 86 |
+
C 80 79 : L R R L F T F F L T F T T R R F T R T L T R L R F R L T R R T T L L R R T T T R R R T F F L F T F T F F T F T T F F F R F F T T L R L T L F L L T T
|
| 87 |
+
C 65 66 : R R T T F T F F T R T L T R R L T
|
| 88 |
+
C 26 37 : T L T R T L F T F T T T L F T T
|
| 89 |
+
C 26 46 : T L F F L T R L L F T R L T L L T R R T R T F T F T T T F L
|
| 90 |
+
C 49 59 : T L T R T L T T T R R R R T L T T L T T T T T
|
| 91 |
+
C 11 12 : T T L T L F T L L L R R T L F
|
| 92 |
+
C 20 15 : R T T F T F T F T R L T L F L R T R T T L T T F F T F R T T F R F R T F T T T R T L T T T R T T L T R R T L T T T L T R F L T T F R F T L L T R L F T R L T T F L L F T F F F T
|
| 93 |
+
C 32 38 : L F T T L T T R R T L L R R L L F L R F R L T R R L T L F F T F L T L R T T T R T F F F L L T R T L T T L L T F L R F L T R F L L T T F L L F L L T F F T R T L R T L T T T T T T R F T L R T T F R
|
| 94 |
+
C 32 21 : T R T L F T T L L T F L T R L R T T T L T T F L F F T F T T R R T L T T R R F R F T L L L L T T L T L T R T L L R T T T L R R T L T T T T T F F R T F T F T L L
|
| 95 |
+
C 62 64 : T T L T L F
|
| 96 |
+
C 39 9 : T T T T L L F T L T T F R T T T T T T T F T F T F T F T L F T R R R F T F T T T T T R T T F R
|
| 97 |
+
C 24 35 : F T T R T R F F L T T T T R R R F L R F
|
| 98 |
+
C 93 85 : F T T T T F L R T F R T T R T T T L T L F T F F F F T L F T T L T R F L F T L L R T L F T T T F T T T F T L L F T F F F T R T L F L R L T F T T T L L R T T F T T R T T L
|
| 99 |
+
C 47 51 : R T T T F F L F T T F T R F R F T F T T R L T R T T T L T T L T R T R T L F T T R T T L T R F R F F T L R R R R R T L L F T R L T T T R L F T F F T L T R R L
|
| 100 |
+
C 84 54 : T T L R L R T T L F T R F
|
| 101 |
+
C 64 45 : F F L L T R T F T T T R F T L L L L L
|
| 102 |
+
C 22 33 : L L T R F T L L L L T R T F T T T F T F L T
|
| 103 |
+
C 37 7 : T T L R L T L L L L T T T F R T F
|
| 104 |
+
C 16 25 : T T T F L R T L L L L F R T T T T T T T T T
|
| 105 |
+
C 91 81 : L L L T T T R L L L L R T T T
|
| 106 |
+
C 94 85 : T T F T F T T T F F L L L L T F T L L F T F
|
| 107 |
+
C 18 18 : F T T R T T T L L L L T F R T L F L
|
| 108 |
+
C 27 45 : F L T L L L L R F F L L T L R T
|
| 109 |
+
C 59 49 : T R R T T R T L L L L L L L T T L L T
|
| 110 |
+
C 79 37 : R R R F F R L L L L L T R F R F T T T T
|
| 111 |
+
C 37 32 : T F R L F F L L L L L R T
|
| 112 |
+
C 84 74 : F F R T L L L L L F R L F L L T R R F T T
|
| 113 |
+
C 59 69 : L L L T T L L L L F L
|
| 114 |
+
C 81 90 : L L L L L L L F
|
| 115 |
+
C 53 63 : R T L L L L T R F T L T L
|
| 116 |
+
C 19 8 : T L L L L R R T T T L F T F L T T F T F
|
| 117 |
+
C 72 80 : R T R T L R L T F L L L L T T T R L T
|
| 118 |
+
C 86 80 : T L L L L F F F F F T L T R L T T T T T
|
| 119 |
+
C 15 32 : F R R F F R T T L T R L L L L T R R T L T T F L R T R
|
| 120 |
+
C 29 8 : T T R T L T L L L L L L R L T
|
| 121 |
+
C 40 25 : L R L R R T T T L L L L L T L T R T F F T T F T T
|
| 122 |
+
C 89 99 : L T R L L L L T R R R T L T T T T
|
| 123 |
+
C 33 31 : T T T F T F T R R L L L L T F T T L R L T R T R T L
|
| 124 |
+
C 9 29 : T L F L L L L L
|
| 125 |
+
C 61 46 : F T T L T L L L L L T T F L T L F L F
|
| 126 |
+
C 23 14 : L L L L T L T R L T T L T R T R
|
| 127 |
+
C 49 68 : T T T L L L T R T L L L L L T R L L T
|
| 128 |
+
C 95 66 : F T R R T L L L L T R T L T L L R R
|
| 129 |
+
C 55 54 : L L L L T
|
| 130 |
+
C 35 18 : L L T F F F F L L L L R R T L F L
|
| 131 |
+
C 63 61 : T F T F L L L L L L L R
|
| 132 |
+
C 55 44 : L L L L L F F T F F T F T F R R
|
| 133 |
+
C 47 58 : R L F L L T R R T L L L L L L L L L T R
|
| 134 |
+
C 88 89 : R L L L L L L L T L T
|
| 135 |
+
C 33 24 : T R F R R T T L T R L L L L R R
|
| 136 |
+
C 32 32 : L L L L F L L L
|
| 137 |
+
C 88 28 : L F F F T L T R T T T L L L L T T R R F T T F R
|
| 138 |
+
C 93 84 : F T T T T F F L L L L T R L R L F L L F
|
| 139 |
+
C 84 74 : L L T R R T F R L F T F T L L L L L F L F F F T F
|
| 140 |
+
C 78 48 : L F T T R L L L L L L T T T T T R T L T R T L
|
| 141 |
+
C 33 22 : L L L L T R L L T T T R R T
|
| 142 |
+
C 20 21 : R T T L F L L L L T F L T F T T T L F F T F R
|
| 143 |
+
C 53 66 : R R T F T T L R L L L L L L L L F T T R T T
|
| 144 |
+
C 10 30 : F T T F T F T T T F R L L L L T L T R R L R
|
| 145 |
+
C 89 89 : L T F T L L L L
|
| 146 |
+
C 99 78 : T R T L L L L T F
|
| 147 |
+
C 49 58 : T L L L L L
|
| 148 |
+
C 61 51 : F T T F L L L L L L F T T
|
| 149 |
+
C 61 53 : F L R T L L L L F F T T T F F
|
| 150 |
+
C 77 95 : T L F L T T T R L L L L L L T T L T
|
| 151 |
+
C 54 56 : L T L L L L L F
|
| 152 |
+
C 55 56 : L L L L T T F
|
| 153 |
+
C 93 85 : F T T T T F F L L L L F T R F T R
|
| 154 |
+
C 21 32 : R R L T R F L L L L F T T T
|
| 155 |
+
C 40 20 : L T T T T R F F L L L L L R T F L R F R T T T T
|
| 156 |
+
C 94 96 : T T T T F F L L L L F T
|
| 157 |
+
C 53 64 : R T L L L L T L
|
| 158 |
+
C 30 21 : F F L L L L L L
|
| 159 |
+
C 29 37 : L L L L L T R F T F T F L F F T F
|
| 160 |
+
C 44 44 : R L L L L L F T R L F T R L L F T F R R
|
| 161 |
+
C 61 66 : F L T L L L L L F F F L T
|
| 162 |
+
C 47 58 : R L L R R T T T T T T T L L L L L T T L
|
| 163 |
+
C 49 78 : T T R T L L L L L T T T R R L F F T
|
| 164 |
+
C 33 11 : L F R F T F F L R L L L L T L L F T
|
| 165 |
+
C 7 24 : T F T F F R F L L L L R F F T T F F T
|
| 166 |
+
C 7 18 : T T F F T L F L L L L T R R T L
|
| 167 |
+
C 89 98 : L T R L L L L L
|
| 168 |
+
C 95 97 : L R T L L L L T T T R L
|
| 169 |
+
C 21 14 : R L L L L T T L L F R R T T T L T F F T
|
| 170 |
+
C 85 81 : T F F F R T T L L L L L L L L L T R R R R T L L
|
| 171 |
+
C 96 96 : L L L L
|
| 172 |
+
C 1 23 : R L T T R L L L L T R T L F L L R T
|
| 173 |
+
C 88 99 : R T T L L L L L
|
| 174 |
+
C 50 62 : F F T T R L L L L
|
| 175 |
+
C 9 38 : T L T T F L L L L T R T T R F R T T
|
| 176 |
+
C 62 42 : F F L R F L T R R L L L L L L F R T L F T F T F R T F F
|
| 177 |
+
C 28 19 : L R R T T T L L L L
|
| 178 |
+
C 21 31 : F R L L L L R
|
| 179 |
+
C 55 25 : F T R L L L L F F R T
|
| 180 |
+
C 69 48 : T R R L L L L L L
|
| 181 |
+
C 13 13 : T T F T L R L L L L L T T T R L
|
| 182 |
+
C 13 23 : R L L L L
|
| 183 |
+
C 37 37 : L R T L F F L L R R T L L L L L T R R R R R R F R F
|
| 184 |
+
C 26 11 : L T T L T R L T F F R L L L L L L T L F
|
| 185 |
+
C 56 56 : T F T L L F T T T R L L L L L F R T F T
|
| 186 |
+
C 77 95 : T T T L F T L L L L L L
|
| 187 |
+
C 70 70 : R F T R F F F T F F F T L L L L T T F F T F F R R T
|
| 188 |
+
C 79 89 : R T T R L L L L T R R T T T T T L F T
|
| 189 |
+
C 29 18 : T F T L F L T R F L L L L L T R R T
|
| 190 |
+
C 72 91 : R R R T F T F L L L L L L F T R R
|
| 191 |
+
C 77 83 : T L F R T L L L L T T L F T R F F F T
|
| 192 |
+
C 37 18 : L R L R T L L L L L T R T L L T R R T L T R T
|
| 193 |
+
C 33 32 : T T T R T T T L L L L R R T T R R
|
| 194 |
+
C 90 91 : L T T R L L L L L T F T T
|
| 195 |
+
C 46 43 : R R R L L L L L L T L
|
| 196 |
+
C 18 39 : F T L L L L L R F F F F T F T T F F F F R
|
| 197 |
+
C 84 93 : L T L R L L L L L L T T T R F F T T
|
| 198 |
+
C 29 15 : L L L L R T L F F R L T T F T F T T T
|
| 199 |
+
C 49 48 : T L T R R T L L L L L T T
|
| 200 |
+
C 51 52 : F R L L L L L F T F R
|
| 201 |
+
C 51 61 : T T T T F R L T T L L L L T F
|
| 202 |
+
C 88 89 : F R T L L L T T L L L L L L R T L R T F T T T T T
|
| 203 |
+
C 58 89 : L T L L L L F L T T T L F L
|
| 204 |
+
C 1 31 : R R T L T T T L R T T F L L L L L T R L L L T
|
| 205 |
+
C 29 29 : L L L L R T L F T F
|
| 206 |
+
C 15 21 : T F L L L L T R L R T L F F T L T R F
|
| 207 |
+
C 90 71 : L F R T L T R T L L L L L L T T F T R T T
|
| 208 |
+
C 61 52 : F F L L L L L L F F T F
|
| 209 |
+
C 12 12 : F R T L L L L L F F T F F T
|
| 210 |
+
C 5 28 : F F F R F L L L L T T T T
|
| 211 |
+
C 19 7 : R T L L L L T R R T T F L
|
| 212 |
+
C 33 32 : L T T T T L L L L L F L R T T R T L T T F
|
| 213 |
+
C 55 45 : L L L L T T F R T L R
|
| 214 |
+
C 15 26 : F T T R L F L T L L L L R F
|
| 215 |
+
C 96 96 : L L L L
|
| 216 |
+
C 59 59 : L L L L
|
| 217 |
+
C 96 85 : L L L L L L L T
|
| 218 |
+
C 73 84 : T L L F L T L R L L L L T T L L T T F T R F
|
| 219 |
+
C 90 91 : L F R T L L L L L L R
|
| 220 |
+
C 85 96 : R L L L L L L T L T
|
| 221 |
+
C 33 30 : L L L L L L T R R T T F F R T
|
| 222 |
+
C 54 19 : L T T T F T R L L L L L F F R F R T R L R
|
| 223 |
+
C 14 14 : T F L L L L T F
|
| 224 |
+
C 98 89 : L T T T L T T L L L L L L T R T
|
| 225 |
+
C 23 32 : F T F L L L L L
|
| 226 |
+
C 24 23 : L L L L T T L R T L R L T
|
| 227 |
+
C 49 59 : R R F T T T T T F L L L L L L T R R T
|
| 228 |
+
C 33 22 : T T L L T T R T L L L L T L T R F T
|
| 229 |
+
C 88 78 : F L T F T L L L L T R R F F T T T
|
| 230 |
+
C 42 45 : T T T T F F F T T L T R L L L L L T R
|
| 231 |
+
C 48 47 : R L L L L R R
|
| 232 |
+
C 96 82 : L L L L F T F F F T F F L L F F F
|
| 233 |
+
C 19 29 : T T R R T L L L L L L T R F T L R R R T T T T F T
|
| 234 |
+
C 20 30 : R L L T L L L L L L T T F R F T F L R L R
|
| 235 |
+
C 39 38 : L F L L L L T T L L L R R
|
| 236 |
+
C 66 44 : T T T T L L F R R T L L L L
|
| 237 |
+
C 49 49 : R R R T L L L L T R R T
|
| 238 |
+
C 18 39 : R L L L L L R
|
| 239 |
+
C 24 30 : T F T T L L L L F L R R T T T F T
|
| 240 |
+
C 5 36 : F F F F T L L T L L L L T R R T T F L R
|
| 241 |
+
C 37 18 : T T T T R T F R L T L L L L T R R R F T F T R T T
|
| 242 |
+
C 10 32 : F F R F L L L L R T F L R T F L T L L L F T
|
| 243 |
+
C 71 91 : T L L L L T R R R T L R
|
| 244 |
+
C 70 82 : F T L L L L T R F T R
|
| 245 |
+
C 42 66 : T T T T F F R L L L L T R T T T L F T R F R
|
| 246 |
+
C 98 99 : L T T T L L L L L L F T R R T F L
|
| 247 |
+
C 45 36 : T F F T F R L L L L L L F R T L T R
|
| 248 |
+
C 8 18 : F T T T L F L L L L R T T L R T T T L R L
|
| 249 |
+
C 42 56 : T T F F F R R T L L L L T L L R T R L T R T L T T L T
|
| 250 |
+
C 41 64 : F T T F T T T T F R L L L L F
|
| 251 |
+
C 59 48 : L L L L L L L L T F T L
|
| 252 |
+
C 23 11 : T R R R F R T L R L L T T L L L L F F
|
| 253 |
+
C 65 62 : T F F F T F L L L L T F T
|
| 254 |
+
C 7 27 : T T F F T F T R L T L T R R T L L L L T T T F R T L L T T F
|
| 255 |
+
C 25 21 : T F F F L L L L
|
| 256 |
+
C 6 8 : F T T T T F R F L L L L L L L R T T L T R T R T
|
| 257 |
+
C 81 70 : L L L L L L L L L L T T
|
| 258 |
+
C 89 88 : L T F T L L L L T T F T T T F R T L L L L T R
|
| 259 |
+
C 33 11 : L L L L L L T L L F
|
| 260 |
+
C 55 44 : L F T R L L L L T T L F R T L R T R
|
| 261 |
+
C 14 1 : T F L L L L F R
|
| 262 |
+
C 74 94 : R T T L R L T T L L L L T F
|
| 263 |
+
C 88 99 : R L L L L L
|
| 264 |
+
C 24 25 : L L L L F F T
|
| 265 |
+
C 24 24 : L L L L F T
|
| 266 |
+
C 64 54 : F T T R T L F T T F T L L L L F F T R
|
| 267 |
+
C 89 89 : T L L L L R T L L T
|
| 268 |
+
C 14 16 : R T L L L L T T R F T T T T T T
|
| 269 |
+
C 97 85 : T F T T F T T T F L L L L F T R L
|
| 270 |
+
C 80 81 : L T L L L L T T T R R R T
|
| 271 |
+
C 89 89 : L T T T F R T T T T T L L L L T R R R T T T F T
|
| 272 |
+
C 91 71 : L R L T R R L L L L L L T R
|
| 273 |
+
C 29 6 : L L L L L L T T T R T T T L R L F F T
|
| 274 |
+
C 20 33 : R F T F T L L T L L L L L F
|
| 275 |
+
C 72 70 : R T R T L R R L L L L T R R
|
| 276 |
+
C 86 74 : R L T T T F T L L L L L F T T L F
|
| 277 |
+
C 35 54 : R R L L L L L L T R T T R R R L T
|
| 278 |
+
C 71 72 : T L L L L L T T T R R L L
|
| 279 |
+
C 93 86 : F F F T T L L L L L F T T T
|
| 280 |
+
C 33 25 : L L L L T F R T L L L L L F L R F
|
| 281 |
+
C 31 13 : F L F T L F L L L L L L
|
| 282 |
+
C 55 27 : L L L L F T F T L F F R F
|
| 283 |
+
C 63 55 : F L F T L F R T F T R R L L L L T
|
| 284 |
+
C 12 45 : R R T R L L L L T R L R R L R L F T T T F L
|
| 285 |
+
C 86 85 : R R T L L L L T T F T R T R R
|
| 286 |
+
C 25 13 : T R L L L L L
|
| 287 |
+
C 78 49 : R T T T F T T F R L L L L L T R T L
|
| 288 |
+
C 71 94 : R F T R F F L T L R L L L L T T T T T T T T T T T T L T F
|
| 289 |
+
C 90 81 : L T T R L L L L T T R T
|
| 290 |
+
C 63 62 : L L L L T T T
|
| 291 |
+
C 50 63 : R T R F R L L L L T L T T T R T R R R T F L T R
|
| 292 |
+
C 53 53 : R T L L L L
|
| 293 |
+
C 99 98 : L L L L T T T
|
| 294 |
+
C 63 53 : T R L T F T L L L L F T T T T F T F F
|
| 295 |
+
C 15 13 : T F L L L L T T F L L L
|
| 296 |
+
C 63 52 : L T L L R T L R R L L L L L L T L T R L T T T F T L
|
| 297 |
+
C 21 21 : R L L L L R L T R T T L
|
| 298 |
+
C 26 19 : T L T R F F F L L L L L
|
| 299 |
+
C 18 35 : R R F F L L T L R L L L L F F T F F R T F R T
|
| 300 |
+
C 23 22 : F T T L L T T L L L L L L F R T L F R T R
|
data/maze/100/train_C1_RWs_10M.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f61e18a319c19cd0fd195bb137bc80e4884e0aee1423fa7c24b2f30c9b121082
|
| 3 |
+
size 2580000000
|
data/maze/100/train_C1_RWs_10M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:46e886b808c04989e1ef9b6bfc2b477d09260a6fd7bbf5179a4f678ce6129fb0
|
| 3 |
+
size 1136936300
|
data/maze/100/train_C1_RWs_500K.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30ba4e3b32009237da05444b5392cac253a9059e2dc5671975acba16334db7c3
|
| 3 |
+
size 129000000
|
data/maze/100/train_C1_RWs_500K.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a03510e92cdfc04b1dbde08ef7e1b98060b92a56eea9e7a9247be49451fe62d
|
| 3 |
+
size 56431106
|
data/maze/100/train_E1_RWs_500K.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5676d7d588400d3bc8c5194ccaf22da87f23d04a53b00ff26ba69de332690bb8
|
| 3 |
+
size 225000000
|
data/maze/100/train_E1_RWs_500K.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d41e1d6fc1b12545929b6e2e66acc1b864ad7ed5517b665a0eeb196e9aa4f686
|
| 3 |
+
size 91127539
|
data/maze/100/train_H1_RWs_10M.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a974da897e8ba8c84bf9966cef2626eb09e850c1daade05a073f217de63941a4
|
| 3 |
+
size 2580000000
|
data/maze/100/train_H1_RWs_10M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d332814e333452c36e7e48fab8f71d5b3da8e2707c8291e5954d1d6671008364
|
| 3 |
+
size 1135542770
|
data/maze/100/train_I1_RWs_10M.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eafb794d2654c3315ee14f89353fd1d2d46a92d9a72a413671a40ee6848e3d60
|
| 3 |
+
size 2580000000
|
data/maze/100/train_I1_RWs_10M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94106631193b1ff9b51d782d3e577e61f1a1cc313ca9746d7e4efa7c4b54464d
|
| 3 |
+
size 1134435361
|
data/maze/100/val_A1_RWs_10K.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5257317a14b2967f9e0e907dc65b4e917fb64436a9da555862c105e0bc0b85ae
|
| 3 |
+
size 2580000
|
data/maze/100/val_A1_RWs_1K.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1f4aff60224a2f1095311df2cd1bbba705683a47abd385873a3c85f9a6158ef5
|
| 3 |
+
size 258000
|
data/maze/100/val_C1_RWs_10K.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a577be487e14d730b192bf251fa03d0ada4b285885bb9745dfd504d3ca1aca0e
|
| 3 |
+
size 2580000
|
data/maze/100/val_E1_RWs_10K.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1367fcd972f578a42f7d710f6e00fec6014b82e86daaec022c589fd14ba81c9
|
| 3 |
+
size 4500000
|
data/maze/100/val_H1_RWs_10K.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:89ffe8c0b18b472430875c01856f4cabe1a4a1726d024c97bd6b51546148304e
|
| 3 |
+
size 2580000
|
data/maze/100/val_I1_RWs_10K.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d6100ea04ea792eb4c8140bbbe52b31a283f95842ff33b62758958a8081a2cef
|
| 3 |
+
size 2580000
|
data/maze/create_maze.py
ADDED
|
@@ -0,0 +1,447 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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 4 |
+
import argparse
|
| 5 |
+
import numpy
|
| 6 |
+
|
| 7 |
+
def generate_maze(n, edge_prob):
|
| 8 |
+
# Create a directed grid graph with random edge removal
|
| 9 |
+
G = nx.DiGraph()
|
| 10 |
+
for i in range(n*n):
|
| 11 |
+
G.add_node(i)
|
| 12 |
+
|
| 13 |
+
# Add edges with probability edge_prob
|
| 14 |
+
for i in range(n):
|
| 15 |
+
for j in range(n):
|
| 16 |
+
node = i*n + j
|
| 17 |
+
# # up
|
| 18 |
+
# if i > 0 and random.random() < edge_prob:
|
| 19 |
+
# G.add_edge(node, (i-1)*n + j)
|
| 20 |
+
# G.add_edge((i-1)*n + j, node)
|
| 21 |
+
# down
|
| 22 |
+
if i < n-1 and random.random() < edge_prob:
|
| 23 |
+
G.add_edge(node, (i+1)*n + j)
|
| 24 |
+
G.add_edge((i+1)*n + j, node)
|
| 25 |
+
# # left
|
| 26 |
+
# if j > 0 and random.random() < edge_prob:
|
| 27 |
+
# G.add_edge(node, i*n + j-1)
|
| 28 |
+
# G.add_edge(i*n + j-1, node)
|
| 29 |
+
# right
|
| 30 |
+
if j < n-1 and random.random() < edge_prob:
|
| 31 |
+
G.add_edge(node, i*n + j+1)
|
| 32 |
+
G.add_edge(i*n + j+1, node)
|
| 33 |
+
|
| 34 |
+
return G
|
| 35 |
+
|
| 36 |
+
def print_grid(G, n, file=None):
|
| 37 |
+
def write_line(text):
|
| 38 |
+
if file is None:
|
| 39 |
+
print(text, end="")
|
| 40 |
+
else:
|
| 41 |
+
file.write(text)
|
| 42 |
+
|
| 43 |
+
for i in range(n-1):
|
| 44 |
+
# Print row edges
|
| 45 |
+
for j in range(n):
|
| 46 |
+
write_line("+")
|
| 47 |
+
if j < n-1 and G.has_edge(i*n + j, i*n + j+1):
|
| 48 |
+
write_line("---")
|
| 49 |
+
elif j < n-1:
|
| 50 |
+
write_line(" ")
|
| 51 |
+
write_line("\n")
|
| 52 |
+
|
| 53 |
+
# Print column edges
|
| 54 |
+
for j in range(n):
|
| 55 |
+
if G.has_edge(i*n + j, (i+1)*n + j):
|
| 56 |
+
write_line("|")
|
| 57 |
+
else:
|
| 58 |
+
write_line(" ")
|
| 59 |
+
if j < n-1:
|
| 60 |
+
write_line(" ")
|
| 61 |
+
write_line("\n")
|
| 62 |
+
|
| 63 |
+
# Print bottom border
|
| 64 |
+
for j in range(n):
|
| 65 |
+
write_line("+")
|
| 66 |
+
if j < n-1 and G.has_edge((n-1)*n + j, (n-1)*n + j+1):
|
| 67 |
+
write_line("---")
|
| 68 |
+
elif j < n-1:
|
| 69 |
+
write_line(" ")
|
| 70 |
+
write_line("\n")
|
| 71 |
+
|
| 72 |
+
def get_reachable_nodes(G, target_node):
|
| 73 |
+
# Get the transitive closure of the graph
|
| 74 |
+
TC = nx.transitive_closure(G)
|
| 75 |
+
# Find the predecessors in the transitive closure (nodes that can reach the target_node)
|
| 76 |
+
reachable_from = TC.predecessors(target_node)
|
| 77 |
+
return list(reachable_from)
|
| 78 |
+
|
| 79 |
+
def obtain_reachability():
|
| 80 |
+
reachability = {}
|
| 81 |
+
pairs = 0
|
| 82 |
+
for node in maze_graph.nodes():
|
| 83 |
+
reachability[node] = get_reachable_nodes(maze_graph, node)
|
| 84 |
+
pairs += len(reachability[node])
|
| 85 |
+
return reachability, pairs
|
| 86 |
+
|
| 87 |
+
def random_walk(source_node, target_node):
|
| 88 |
+
stack = [source_node]
|
| 89 |
+
visited = [] # to eliminate cycles
|
| 90 |
+
|
| 91 |
+
while stack != []:
|
| 92 |
+
cur_node = stack.pop()
|
| 93 |
+
visited.append(cur_node)
|
| 94 |
+
if cur_node == target_node:
|
| 95 |
+
return visited
|
| 96 |
+
|
| 97 |
+
adj = list(maze_graph.successors(cur_node))
|
| 98 |
+
anc = list(reachability[target_node])
|
| 99 |
+
anc.append(target_node)
|
| 100 |
+
|
| 101 |
+
remaining = [element for element in adj if element in anc and element not in visited] #if we want the path to contain cycles, we should remove "and element not in visited"
|
| 102 |
+
|
| 103 |
+
if len(remaining) == 0:
|
| 104 |
+
return random_walk(source_node, target_node) # for non-DAGs
|
| 105 |
+
|
| 106 |
+
next_node = random.choice(remaining)
|
| 107 |
+
stack.append(next_node)
|
| 108 |
+
|
| 109 |
+
return visited
|
| 110 |
+
|
| 111 |
+
def seq2act(path):
|
| 112 |
+
actions = []
|
| 113 |
+
for i in range(1, len(path)):
|
| 114 |
+
diff = path[i] - path[i-1]
|
| 115 |
+
if diff == -n:
|
| 116 |
+
actions.append('N')
|
| 117 |
+
elif diff == n:
|
| 118 |
+
actions.append('S')
|
| 119 |
+
elif diff == -1:
|
| 120 |
+
actions.append('W')
|
| 121 |
+
elif diff == 1:
|
| 122 |
+
actions.append('E')
|
| 123 |
+
return actions
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
def wall_directions(node):
|
| 127 |
+
"""Return the list of NESW directions that hit a wall from `node`.
|
| 128 |
+
|
| 129 |
+
A direction is a "wall" when the adjacent in-grid cell exists but there is
|
| 130 |
+
no edge to it in the maze graph (i.e. the move is illegal).
|
| 131 |
+
"""
|
| 132 |
+
i, j = divmod(node, n)
|
| 133 |
+
dirs = []
|
| 134 |
+
# North
|
| 135 |
+
if i > 0 and not maze_graph.has_edge(node, (i - 1) * n + j):
|
| 136 |
+
dirs.append('N')
|
| 137 |
+
# South
|
| 138 |
+
if i < n - 1 and not maze_graph.has_edge(node, (i + 1) * n + j):
|
| 139 |
+
dirs.append('S')
|
| 140 |
+
# West
|
| 141 |
+
if j > 0 and not maze_graph.has_edge(node, i * n + (j - 1)):
|
| 142 |
+
dirs.append('W')
|
| 143 |
+
# East
|
| 144 |
+
if j < n - 1 and not maze_graph.has_edge(node, i * n + (j + 1)):
|
| 145 |
+
dirs.append('E')
|
| 146 |
+
return dirs
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
def corrupt_one_token(path):
|
| 150 |
+
"""Turn a correct node path into a wrong (wall-hitting) action sequence.
|
| 151 |
+
|
| 152 |
+
Takes the correct actions of `path` and replaces ONE move (at a random
|
| 153 |
+
position, not necessarily the last) with an illegal direction that hits a
|
| 154 |
+
wall from that move's starting cell. The remaining tokens are kept as-is.
|
| 155 |
+
Returns the corrupted action list, or None if no position can be corrupted.
|
| 156 |
+
"""
|
| 157 |
+
actions = seq2act(path)
|
| 158 |
+
if not actions:
|
| 159 |
+
return None
|
| 160 |
+
# actions[i] is the move taken from node path[i]; try positions in random
|
| 161 |
+
# order until we find one that has a wall to bump into.
|
| 162 |
+
idxs = list(range(len(actions)))
|
| 163 |
+
random.shuffle(idxs)
|
| 164 |
+
for i in idxs:
|
| 165 |
+
walls = wall_directions(path[i]) # illegal dirs from path[i]; excludes the legal actions[i]
|
| 166 |
+
if walls:
|
| 167 |
+
d = random.choice(walls)
|
| 168 |
+
return actions[:i] + [d] + actions[i + 1:]
|
| 169 |
+
return None
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
def select_task(tasks_config, is_train=True):
|
| 173 |
+
"""
|
| 174 |
+
Randomly select a task based on the configured percentages.
|
| 175 |
+
For training: uses 'train' percentage from tasks_config
|
| 176 |
+
For testing: uses 'test' percentage from tasks_config
|
| 177 |
+
Returns the selected task ID.
|
| 178 |
+
"""
|
| 179 |
+
key = 'train' if is_train else 'test'
|
| 180 |
+
percentages = [(task_id, config[key]) for task_id, config in tasks_config.items()]
|
| 181 |
+
|
| 182 |
+
# Generate random number between 0 and 100
|
| 183 |
+
rand = random.random() * 100
|
| 184 |
+
cumsum = 0
|
| 185 |
+
|
| 186 |
+
for task_id, pct in percentages:
|
| 187 |
+
cumsum += pct
|
| 188 |
+
if rand < cumsum:
|
| 189 |
+
return task_id
|
| 190 |
+
|
| 191 |
+
# Fallback to the last task if rounding errors occur
|
| 192 |
+
return percentages[-1][0]
|
| 193 |
+
|
| 194 |
+
def create_dataset(i, tasks_config):
|
| 195 |
+
train_set = []
|
| 196 |
+
test_set = []
|
| 197 |
+
train_num_per_pair = max(i,1)
|
| 198 |
+
for target_node in range(num_nodes):
|
| 199 |
+
cnt = 0 # to avoid some target not appear in training dataset
|
| 200 |
+
for source_node in range(num_nodes):
|
| 201 |
+
if source_node == target_node:
|
| 202 |
+
continue
|
| 203 |
+
if (data[source_node][target_node] == 1):
|
| 204 |
+
if maze_graph.has_edge(source_node, target_node):
|
| 205 |
+
task_id = select_task(tasks_config, is_train=True)
|
| 206 |
+
if task_id == 'A':
|
| 207 |
+
train_set.append(['A', source_node, target_node] + seq2act([source_node, target_node]))
|
| 208 |
+
else:
|
| 209 |
+
print(f"Error: Task {task_id} is not yet defined. Skipping training data generation for this entry.")
|
| 210 |
+
|
| 211 |
+
for ii in range(train_num_per_pair):
|
| 212 |
+
task_id = select_task(tasks_config, is_train=True)
|
| 213 |
+
if task_id == 'A':
|
| 214 |
+
train_set.append(['A', source_node, target_node] + seq2act(random_walk(source_node, target_node)) )
|
| 215 |
+
else:
|
| 216 |
+
print(f"Error: Task {task_id} is not yet defined. Skipping training data generation for this entry.")
|
| 217 |
+
|
| 218 |
+
if (data[source_node][target_node] == -1):
|
| 219 |
+
task_id = select_task(tasks_config, is_train=False)
|
| 220 |
+
if task_id == 'A':
|
| 221 |
+
test_set.append(['A', source_node, target_node] + seq2act(random_walk(source_node, target_node)))
|
| 222 |
+
else:
|
| 223 |
+
print(f"Error: Task {task_id} is not yet defined. Skipping test data generation for this entry.")
|
| 224 |
+
|
| 225 |
+
return train_set, test_set
|
| 226 |
+
|
| 227 |
+
def add_x(train_set, test_set, tasks_config):
|
| 228 |
+
cnt = 0
|
| 229 |
+
for target_node in range(num_nodes):
|
| 230 |
+
for source_node in range(num_nodes):
|
| 231 |
+
if source_node == target_node:
|
| 232 |
+
continue
|
| 233 |
+
if source_node not in reachability[target_node]:
|
| 234 |
+
cnt += 1
|
| 235 |
+
|
| 236 |
+
prob_in_test = len(test_set) / cnt * 0.2
|
| 237 |
+
prob_in_train = min(len(train_set) / cnt * 0.2, 1 - prob_in_test)
|
| 238 |
+
train_repeat = max(int(len(train_set) / cnt * 0.15 / prob_in_train), 1)
|
| 239 |
+
print(prob_in_train, prob_in_test, train_repeat)
|
| 240 |
+
|
| 241 |
+
for target_node in range(num_nodes):
|
| 242 |
+
for source_node in range(num_nodes):
|
| 243 |
+
if source_node == target_node:
|
| 244 |
+
continue
|
| 245 |
+
if source_node not in reachability[target_node]:
|
| 246 |
+
coin = random.random()
|
| 247 |
+
if coin < prob_in_train:
|
| 248 |
+
for _ in range(train_repeat):
|
| 249 |
+
task_id = select_task(tasks_config, is_train=True)
|
| 250 |
+
if task_id == 'A':
|
| 251 |
+
train_set.append(['A', source_node, target_node, 'x'])
|
| 252 |
+
else:
|
| 253 |
+
print(f"Error: Task {task_id} is not yet defined. Skipping training data generation for this entry.")
|
| 254 |
+
|
| 255 |
+
elif coin > 1 - prob_in_test:
|
| 256 |
+
task_id = select_task(tasks_config, is_train=False)
|
| 257 |
+
if task_id == 'A':
|
| 258 |
+
test_set.append(['A', source_node, target_node, 'x'])
|
| 259 |
+
else:
|
| 260 |
+
print(f"Error: Task {task_id} is not yet defined. Skipping test data generation for this entry.")
|
| 261 |
+
|
| 262 |
+
return train_set, test_set
|
| 263 |
+
|
| 264 |
+
|
| 265 |
+
def add_wrong_paths(train_set, test_set, tasks_config, wrong_ratio):
|
| 266 |
+
"""Append wall-hitting wrong paths to the datasets.
|
| 267 |
+
|
| 268 |
+
Each wrong path is built from a CORRECT path (source -> target) by replacing
|
| 269 |
+
ONE move token (at a random position, not necessarily the last) with an
|
| 270 |
+
illegal direction that hits a wall, then appending 'x' at the end.
|
| 271 |
+
Format: ['A', source, target, <moves with one illegal move somewhere>, 'x'].
|
| 272 |
+
During training only the final 'x' token is supervised (see train_maze.py /
|
| 273 |
+
get_batch); every other token is masked out of the loss, so the model is
|
| 274 |
+
not taught to imitate the wrong trajectory and must inspect the whole
|
| 275 |
+
sequence to flag that a wall was hit.
|
| 276 |
+
"""
|
| 277 |
+
if wrong_ratio <= 0:
|
| 278 |
+
return train_set, test_set
|
| 279 |
+
|
| 280 |
+
num_train_wrong = int(len(train_set) * wrong_ratio)
|
| 281 |
+
num_test_wrong = int(len(test_set) * wrong_ratio)
|
| 282 |
+
|
| 283 |
+
# Collect reachable (source, target) pairs, split like the correct data.
|
| 284 |
+
train_pairs = []
|
| 285 |
+
test_pairs = []
|
| 286 |
+
for target_node in range(num_nodes):
|
| 287 |
+
for source_node in range(num_nodes):
|
| 288 |
+
if source_node == target_node:
|
| 289 |
+
continue
|
| 290 |
+
if source_node in reachability[target_node]:
|
| 291 |
+
if data[source_node][target_node] == 1:
|
| 292 |
+
train_pairs.append((source_node, target_node))
|
| 293 |
+
elif data[source_node][target_node] == -1:
|
| 294 |
+
test_pairs.append((source_node, target_node))
|
| 295 |
+
|
| 296 |
+
def gen_wrong(pairs, count, is_train):
|
| 297 |
+
out = []
|
| 298 |
+
if not pairs or count <= 0:
|
| 299 |
+
return out
|
| 300 |
+
attempts = 0
|
| 301 |
+
max_attempts = count * 50 + 100
|
| 302 |
+
while len(out) < count and attempts < max_attempts:
|
| 303 |
+
attempts += 1
|
| 304 |
+
source_node, target_node = random.choice(pairs)
|
| 305 |
+
path = random_walk(source_node, target_node)
|
| 306 |
+
if not path or len(path) < 2:
|
| 307 |
+
continue
|
| 308 |
+
corrupted = corrupt_one_token(path)
|
| 309 |
+
if corrupted is None:
|
| 310 |
+
continue
|
| 311 |
+
task_id = select_task(tasks_config, is_train=is_train)
|
| 312 |
+
if task_id != 'A':
|
| 313 |
+
continue
|
| 314 |
+
out.append(['A', source_node, target_node] + corrupted + ['x'])
|
| 315 |
+
return out
|
| 316 |
+
|
| 317 |
+
train_wrong = gen_wrong(train_pairs, num_train_wrong, True)
|
| 318 |
+
test_wrong = gen_wrong(test_pairs, num_test_wrong, False)
|
| 319 |
+
print(f'Added {len(train_wrong)} wrong (wall-hit) paths to train, {len(test_wrong)} to test.')
|
| 320 |
+
return train_set + train_wrong, test_set + test_wrong
|
| 321 |
+
|
| 322 |
+
|
| 323 |
+
def obtain_stats(dataset):
|
| 324 |
+
max_len = 0
|
| 325 |
+
pairs = set()
|
| 326 |
+
|
| 327 |
+
for data in dataset:
|
| 328 |
+
max_len = max(max_len, len(data))
|
| 329 |
+
pairs.add((data[0],data[-1]))
|
| 330 |
+
|
| 331 |
+
len_stats = [0]*(max_len + 1)
|
| 332 |
+
|
| 333 |
+
for data in dataset:
|
| 334 |
+
length = len(data)
|
| 335 |
+
len_stats[length] += 1
|
| 336 |
+
|
| 337 |
+
print('number of source target pairs:', len(pairs))
|
| 338 |
+
for ii in range(3, len(len_stats)):
|
| 339 |
+
print(f'There are {len_stats[ii]} paths with length {ii-3}')
|
| 340 |
+
|
| 341 |
+
|
| 342 |
+
def format_data(data):
|
| 343 |
+
# Format: task_id source target [remaining_tokens]
|
| 344 |
+
return ' '.join(str(token) for token in data) + '\n'
|
| 345 |
+
|
| 346 |
+
def write_dataset(dataset, file_name):
|
| 347 |
+
with open(file_name, "w") as file:
|
| 348 |
+
for data in dataset:
|
| 349 |
+
file.write(format_data(data))
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
def parse_tasks(tasks_str):
|
| 353 |
+
"""
|
| 354 |
+
Parse task specification string into a dictionary.
|
| 355 |
+
Format: "TaskID:train_percent:test_percent,TaskID:train_percent:test_percent,..."
|
| 356 |
+
Example: "A:50:50,B:30:30,C:20:20"
|
| 357 |
+
Returns: {"A": {"train": 50, "test": 50}, "B": {"train": 30, "test": 30}, ...}
|
| 358 |
+
Validates that all training percentages sum to 100% and all test percentages sum to 100%.
|
| 359 |
+
"""
|
| 360 |
+
tasks = {}
|
| 361 |
+
for task_spec in tasks_str.split(','):
|
| 362 |
+
parts = task_spec.strip().split(':')
|
| 363 |
+
if len(parts) != 3:
|
| 364 |
+
raise ValueError(f"Invalid task specification: {task_spec}. Expected format: TaskID:train_percent:test_percent")
|
| 365 |
+
task_id, train_pct, test_pct = parts[0].strip(), int(parts[1].strip()), int(parts[2].strip())
|
| 366 |
+
if task_id in tasks:
|
| 367 |
+
raise ValueError(f"Duplicate task ID: {task_id}")
|
| 368 |
+
tasks[task_id] = {"train": train_pct, "test": test_pct}
|
| 369 |
+
|
| 370 |
+
# Validate that percentages sum to 100%
|
| 371 |
+
total_train = sum(config["train"] for config in tasks.values())
|
| 372 |
+
total_test = sum(config["test"] for config in tasks.values())
|
| 373 |
+
|
| 374 |
+
if total_train != 100:
|
| 375 |
+
raise ValueError(f"Training task percentages must sum to 100%, but got {total_train}%")
|
| 376 |
+
if total_test != 100:
|
| 377 |
+
raise ValueError(f"Test task percentages must sum to 100%, but got {total_test}%")
|
| 378 |
+
|
| 379 |
+
return tasks
|
| 380 |
+
|
| 381 |
+
|
| 382 |
+
if __name__ == "__main__":
|
| 383 |
+
parser = argparse.ArgumentParser(description='Generate a maze based on the given parameters.')
|
| 384 |
+
parser.add_argument('--grid_size', type=int, default=10, help='Size of the grid (n x n)')
|
| 385 |
+
parser.add_argument('--edge_prob', type=float, default=0.6, help='Probability to keep an edge in the grid graph')
|
| 386 |
+
parser.add_argument('--chance_in_train', type=float, default=0.5, help='Chance of a pair being in the training set')
|
| 387 |
+
parser.add_argument('--num_of_paths', type=int, default=20, help='Number of paths per pair nodes in training dataset')
|
| 388 |
+
parser.add_argument('--wrong_ratio', type=float, default=0.0,
|
| 389 |
+
help='Fraction of extra wall-hitting wrong paths to add, relative to the '
|
| 390 |
+
'number of correct paths (e.g. 0.2 = +20%%). Each wrong path ends in '
|
| 391 |
+
'an illegal move + "x"; only the "x" step is supervised during training. '
|
| 392 |
+
'Default 0.0 (disabled).')
|
| 393 |
+
# Multi-task specification: comma-separated task identifiers with their train/test percentages
|
| 394 |
+
# Format: "TaskID:train_percent:test_percent,TaskID:train_percent:test_percent,..."
|
| 395 |
+
# Example: "A:100:100" or "A:50:50,B:30:30,C:20:20"
|
| 396 |
+
# Default is Task A (pathfinding) with 100% in both train and test datasets
|
| 397 |
+
parser.add_argument('--tasks', type=str, default='A:100:100',
|
| 398 |
+
help='Task identifiers with percentages. Format: "TaskID:train_pct:test_pct,TaskID:train_pct:test_pct,..." (default: A:100:100)')
|
| 399 |
+
|
| 400 |
+
args = parser.parse_args()
|
| 401 |
+
|
| 402 |
+
# Parse task specifications
|
| 403 |
+
tasks_config = parse_tasks(args.tasks)
|
| 404 |
+
|
| 405 |
+
n = args.grid_size
|
| 406 |
+
edge_prob = args.edge_prob
|
| 407 |
+
num_nodes = n * n
|
| 408 |
+
chance_in_train = args.chance_in_train
|
| 409 |
+
num_of_paths = args.num_of_paths
|
| 410 |
+
|
| 411 |
+
maze_graph = generate_maze(n, edge_prob)
|
| 412 |
+
|
| 413 |
+
folder_name = os.path.join(os.path.dirname(__file__), f'{num_nodes}')
|
| 414 |
+
if not os.path.exists(folder_name):
|
| 415 |
+
os.makedirs(folder_name)
|
| 416 |
+
|
| 417 |
+
# Save grid visualization to file
|
| 418 |
+
grid_file_path = os.path.join(folder_name, f'maze_{n}_{edge_prob}_{num_of_paths}.txt')
|
| 419 |
+
with open(grid_file_path, 'w') as f:
|
| 420 |
+
print_grid(maze_graph, n, file=f)
|
| 421 |
+
|
| 422 |
+
print_grid(maze_graph, n)
|
| 423 |
+
reachability, feasible_pairs = obtain_reachability()
|
| 424 |
+
|
| 425 |
+
data = numpy.zeros([num_nodes,num_nodes])
|
| 426 |
+
for target_node in range(num_nodes):
|
| 427 |
+
cnt = 0 # to avoid some target not appear in training dataset
|
| 428 |
+
for source_node in range(num_nodes):
|
| 429 |
+
if source_node == target_node:
|
| 430 |
+
continue
|
| 431 |
+
if source_node in reachability[target_node]:
|
| 432 |
+
if (maze_graph.has_edge(source_node, target_node)) or random.random() < chance_in_train or cnt < 1:
|
| 433 |
+
data[source_node][target_node] = 1
|
| 434 |
+
cnt += 1
|
| 435 |
+
else:
|
| 436 |
+
data[source_node][target_node] = -1
|
| 437 |
+
|
| 438 |
+
train_set, test_set = create_dataset(num_of_paths, tasks_config)
|
| 439 |
+
|
| 440 |
+
train_set, test_set = add_wrong_paths(train_set, test_set, tasks_config, args.wrong_ratio)
|
| 441 |
+
|
| 442 |
+
obtain_stats(train_set)
|
| 443 |
+
print('number of source target pairs:', len(test_set))
|
| 444 |
+
|
| 445 |
+
write_dataset(train_set, os.path.join(folder_name, f'train_{num_of_paths}.txt'))
|
| 446 |
+
write_dataset(test_set, os.path.join(folder_name, f'test.txt'))
|
| 447 |
+
nx.write_graphml(maze_graph, os.path.join(folder_name, f'maze_graph.graphml'))
|
data/maze/create_multitask_maze.py
ADDED
|
@@ -0,0 +1,1204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import networkx as nx
|
| 2 |
+
import random
|
| 3 |
+
import os
|
| 4 |
+
import sys
|
| 5 |
+
import argparse
|
| 6 |
+
import numpy
|
| 7 |
+
import math
|
| 8 |
+
from tqdm import tqdm
|
| 9 |
+
|
| 10 |
+
# Ensure project root is importable when running this script directly
|
| 11 |
+
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
| 12 |
+
from cli_utils import parse_count, format_count, parse_task_distribution
|
| 13 |
+
|
| 14 |
+
# Default: 10 lowercase letters for node labels (can be overridden via --num_labels)
|
| 15 |
+
NODE_LABELS = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
def make_label_list(num_labels):
|
| 19 |
+
"""Generate a list of label strings for the given count.
|
| 20 |
+
|
| 21 |
+
Up to 26: single lowercase letters (a-z).
|
| 22 |
+
Above 26: l0, l1, l2, ... (prefixed to avoid collision with directions/tasks).
|
| 23 |
+
"""
|
| 24 |
+
if num_labels <= 26:
|
| 25 |
+
return [chr(ord('a') + i) for i in range(num_labels)]
|
| 26 |
+
else:
|
| 27 |
+
return [f'l{i}' for i in range(num_labels)]
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def generate_maze(n, edge_prob):
|
| 31 |
+
# Create a directed grid graph with random edge removal
|
| 32 |
+
G = nx.DiGraph()
|
| 33 |
+
for i in range(n * n):
|
| 34 |
+
# Assign a random label from NODE_LABELS to each node
|
| 35 |
+
label = random.choice(NODE_LABELS)
|
| 36 |
+
G.add_node(i, label=label)
|
| 37 |
+
|
| 38 |
+
# Add edges with probability edge_prob
|
| 39 |
+
for i in range(n):
|
| 40 |
+
for j in range(n):
|
| 41 |
+
node = i * n + j
|
| 42 |
+
# # up
|
| 43 |
+
# if i > 0 and random.random() < edge_prob:
|
| 44 |
+
# G.add_edge(node, (i-1)*n + j)
|
| 45 |
+
# G.add_edge((i-1)*n + j, node)
|
| 46 |
+
# down
|
| 47 |
+
if i < n - 1 and random.random() < edge_prob:
|
| 48 |
+
G.add_edge(node, (i + 1) * n + j)
|
| 49 |
+
G.add_edge((i + 1) * n + j, node)
|
| 50 |
+
# # left
|
| 51 |
+
# if j > 0 and random.random() < edge_prob:
|
| 52 |
+
# G.add_edge(node, i*n + j-1)
|
| 53 |
+
# G.add_edge(i*n + j-1, node)
|
| 54 |
+
# right
|
| 55 |
+
if j < n - 1 and random.random() < edge_prob:
|
| 56 |
+
G.add_edge(node, i * n + j + 1)
|
| 57 |
+
G.add_edge(i * n + j + 1, node)
|
| 58 |
+
|
| 59 |
+
return G
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
def print_grid(G, n, file=None):
|
| 63 |
+
def write_line(text):
|
| 64 |
+
if file is None:
|
| 65 |
+
print(text, end="")
|
| 66 |
+
else:
|
| 67 |
+
file.write(text)
|
| 68 |
+
|
| 69 |
+
for i in range(n - 1):
|
| 70 |
+
# Print row edges
|
| 71 |
+
for j in range(n):
|
| 72 |
+
write_line("+")
|
| 73 |
+
if j < n - 1 and G.has_edge(i * n + j, i * n + j + 1):
|
| 74 |
+
write_line("---")
|
| 75 |
+
elif j < n - 1:
|
| 76 |
+
write_line(" ")
|
| 77 |
+
write_line("\n")
|
| 78 |
+
|
| 79 |
+
# Print column edges and node labels (shifted one position to the right)
|
| 80 |
+
# First, print the edge and leading space
|
| 81 |
+
for j in range(n):
|
| 82 |
+
if G.has_edge(i * n + j, (i + 1) * n + j):
|
| 83 |
+
write_line("|")
|
| 84 |
+
else:
|
| 85 |
+
write_line(" ")
|
| 86 |
+
|
| 87 |
+
# Print label with spacing
|
| 88 |
+
# Print label of node (i, j) in the current cell (shifted right in the output)
|
| 89 |
+
label = G.nodes[i * n + j]['label']
|
| 90 |
+
write_line(f"{label} ")
|
| 91 |
+
write_line("\n")
|
| 92 |
+
|
| 93 |
+
# Print bottom border
|
| 94 |
+
for j in range(n):
|
| 95 |
+
write_line("+")
|
| 96 |
+
if j < n - 1 and G.has_edge((n - 1) * n + j, (n - 1) * n + j + 1):
|
| 97 |
+
write_line("---")
|
| 98 |
+
elif j < n - 1:
|
| 99 |
+
write_line(" ")
|
| 100 |
+
write_line("\n")
|
| 101 |
+
|
| 102 |
+
# Print labels for the last row nodes
|
| 103 |
+
for j in range(n):
|
| 104 |
+
# Print label of node (n-1, j) below the border
|
| 105 |
+
label = G.nodes[(n - 1) * n + j]['label']
|
| 106 |
+
write_line(f" {label} ")
|
| 107 |
+
write_line("\n")
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
def get_reachable_nodes(G, target_node):
|
| 111 |
+
# Get the transitive closure of the graph
|
| 112 |
+
TC = nx.transitive_closure(G)
|
| 113 |
+
# Find the predecessors in the transitive closure (nodes that can reach the target_node)
|
| 114 |
+
reachable_from = TC.predecessors(target_node)
|
| 115 |
+
return list(reachable_from)
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
def obtain_reachability():
|
| 119 |
+
reachability = {}
|
| 120 |
+
pairs = 0
|
| 121 |
+
for node in maze_graph.nodes():
|
| 122 |
+
reachability[node] = get_reachable_nodes(maze_graph, node)
|
| 123 |
+
pairs += len(reachability[node])
|
| 124 |
+
return reachability, pairs
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
def random_walk(source_node, target_node, allow_cycles=False):
|
| 128 |
+
"""Generate a random walk from source_node to target_node.
|
| 129 |
+
|
| 130 |
+
Args:
|
| 131 |
+
source_node: Starting node
|
| 132 |
+
target_node: Target node
|
| 133 |
+
allow_cycles: If False (default), path is acyclic. If True, path can contain cycles.
|
| 134 |
+
|
| 135 |
+
Returns:
|
| 136 |
+
List of nodes in the path, or empty list if no path found
|
| 137 |
+
"""
|
| 138 |
+
stack = [source_node]
|
| 139 |
+
visited = [] # to track visited nodes for acyclic constraint
|
| 140 |
+
|
| 141 |
+
while stack != []:
|
| 142 |
+
cur_node = stack.pop()
|
| 143 |
+
visited.append(cur_node)
|
| 144 |
+
if cur_node == target_node:
|
| 145 |
+
return visited
|
| 146 |
+
|
| 147 |
+
adj = list(maze_graph.successors(cur_node))
|
| 148 |
+
anc = list(reachability[target_node])
|
| 149 |
+
anc.append(target_node)
|
| 150 |
+
|
| 151 |
+
if allow_cycles:
|
| 152 |
+
# Allow cycles: only check if node is reachable to target
|
| 153 |
+
remaining = [element for element in adj if element in anc]
|
| 154 |
+
else:
|
| 155 |
+
# Acyclic: check both reachability and no previous visits
|
| 156 |
+
remaining = [element for element in adj if element in anc and element not in visited]
|
| 157 |
+
|
| 158 |
+
if len(remaining) == 0:
|
| 159 |
+
return [] # no path found from this start/target
|
| 160 |
+
|
| 161 |
+
next_node = random.choice(remaining)
|
| 162 |
+
stack.append(next_node)
|
| 163 |
+
|
| 164 |
+
return visited
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
def random_walk_ss(source_node, num_steps):
|
| 168 |
+
"""Generate a single-source random walk of a fixed number of steps.
|
| 169 |
+
|
| 170 |
+
Args:
|
| 171 |
+
source_node: Starting node
|
| 172 |
+
num_steps: Number of steps to take
|
| 173 |
+
|
| 174 |
+
Returns:
|
| 175 |
+
List of nodes in the path
|
| 176 |
+
"""
|
| 177 |
+
path = [source_node]
|
| 178 |
+
current = source_node
|
| 179 |
+
for _ in range(num_steps):
|
| 180 |
+
neighbors = list(maze_graph.successors(current))
|
| 181 |
+
if not neighbors:
|
| 182 |
+
break
|
| 183 |
+
current = random.choice(neighbors)
|
| 184 |
+
path.append(current)
|
| 185 |
+
return path
|
| 186 |
+
|
| 187 |
+
|
| 188 |
+
def seq2act(path):
|
| 189 |
+
actions = []
|
| 190 |
+
for i in range(1, len(path)):
|
| 191 |
+
diff = path[i] - path[i - 1]
|
| 192 |
+
if diff == -n:
|
| 193 |
+
actions.append('N')
|
| 194 |
+
elif diff == n:
|
| 195 |
+
actions.append('S')
|
| 196 |
+
elif diff == -1:
|
| 197 |
+
actions.append('W')
|
| 198 |
+
elif diff == 1:
|
| 199 |
+
actions.append('E')
|
| 200 |
+
return actions
|
| 201 |
+
|
| 202 |
+
|
| 203 |
+
def seq2turn(path, start_orientation='E'):
|
| 204 |
+
"""Convert an absolute direction path to relative turns.
|
| 205 |
+
|
| 206 |
+
Each output token both turns and advances one step:
|
| 207 |
+
- F: keep facing direction and move forward
|
| 208 |
+
- L: turn left then move
|
| 209 |
+
- R: turn right then move
|
| 210 |
+
- T: turn around then move
|
| 211 |
+
"""
|
| 212 |
+
|
| 213 |
+
absolute_actions = seq2act(path)
|
| 214 |
+
turns = []
|
| 215 |
+
|
| 216 |
+
left_of = {'N': 'W', 'W': 'S', 'S': 'E', 'E': 'N'}
|
| 217 |
+
right_of = {v: k for k, v in left_of.items()}
|
| 218 |
+
opposite_of = {'N': 'S', 'S': 'N', 'E': 'W', 'W': 'E'}
|
| 219 |
+
|
| 220 |
+
orientation = start_orientation
|
| 221 |
+
for action in absolute_actions:
|
| 222 |
+
if action == orientation:
|
| 223 |
+
turns.append('F')
|
| 224 |
+
elif action == left_of[orientation]:
|
| 225 |
+
turns.append('L')
|
| 226 |
+
elif action == right_of[orientation]:
|
| 227 |
+
turns.append('R')
|
| 228 |
+
elif action == opposite_of[orientation]:
|
| 229 |
+
turns.append('T')
|
| 230 |
+
else:
|
| 231 |
+
# Should not happen if the grid uses only NESW moves
|
| 232 |
+
continue
|
| 233 |
+
orientation = action
|
| 234 |
+
|
| 235 |
+
return turns
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
def random_walk_with_cycles(start_node, walk_length):
|
| 239 |
+
path = [start_node]
|
| 240 |
+
current = start_node
|
| 241 |
+
for _ in range(walk_length):
|
| 242 |
+
neighbors = list(maze_graph.successors(current))
|
| 243 |
+
if not neighbors:
|
| 244 |
+
break
|
| 245 |
+
current = random.choice(neighbors)
|
| 246 |
+
path.append(current)
|
| 247 |
+
return path
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
def shortest_path_to_label(source_node, target_label):
|
| 251 |
+
best_path = None
|
| 252 |
+
best_len = None
|
| 253 |
+
best_target = None
|
| 254 |
+
for node_id, attrs in maze_graph.nodes(data=True):
|
| 255 |
+
if attrs.get('label') != target_label:
|
| 256 |
+
continue
|
| 257 |
+
if node_id == source_node:
|
| 258 |
+
continue
|
| 259 |
+
if source_node not in reachability.get(node_id, []):
|
| 260 |
+
continue
|
| 261 |
+
try:
|
| 262 |
+
path = nx.shortest_path(maze_graph, source_node, node_id)
|
| 263 |
+
except nx.NetworkXNoPath:
|
| 264 |
+
continue
|
| 265 |
+
path_len = len(path)
|
| 266 |
+
if best_len is None or path_len < best_len or (path_len == best_len and node_id < best_target):
|
| 267 |
+
best_len = path_len
|
| 268 |
+
best_path = path
|
| 269 |
+
best_target = node_id
|
| 270 |
+
return best_path
|
| 271 |
+
|
| 272 |
+
|
| 273 |
+
def select_task(tasks_config, is_train=True):
|
| 274 |
+
"""
|
| 275 |
+
Randomly select a task based on the configured percentages.
|
| 276 |
+
For training: uses 'train' percentage from tasks_config
|
| 277 |
+
For testing: uses 'test' percentage from tasks_config
|
| 278 |
+
Returns the selected task ID.
|
| 279 |
+
"""
|
| 280 |
+
key = 'train' if is_train else 'test'
|
| 281 |
+
percentages = [(task_id, config[key]) for task_id, config in tasks_config.items()]
|
| 282 |
+
|
| 283 |
+
# Generate random number between 0 and 100
|
| 284 |
+
rand = random.random() * 100
|
| 285 |
+
cumsum = 0
|
| 286 |
+
|
| 287 |
+
for task_id, pct in percentages:
|
| 288 |
+
cumsum += pct
|
| 289 |
+
if rand < cumsum:
|
| 290 |
+
return task_id
|
| 291 |
+
|
| 292 |
+
# Fallback to the last task if rounding errors occur
|
| 293 |
+
return percentages[-1][0]
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
def _generate_one_entry(tasks_config, is_train):
|
| 297 |
+
"""Generate a single multitask data entry. Returns None on failure or unknown task."""
|
| 298 |
+
task_id = select_task(tasks_config, is_train=is_train)
|
| 299 |
+
if task_id == 'A':
|
| 300 |
+
return create_data_entry_taskA(is_train=is_train)
|
| 301 |
+
elif task_id == 'B':
|
| 302 |
+
return create_data_entry_taskB(is_train=is_train)
|
| 303 |
+
elif task_id == 'C':
|
| 304 |
+
return create_data_entry_taskC(is_train=is_train)
|
| 305 |
+
elif task_id == 'D':
|
| 306 |
+
return create_data_entry_taskD(is_train=is_train)
|
| 307 |
+
elif task_id == 'E':
|
| 308 |
+
return create_data_entry_taskE(is_train=is_train)
|
| 309 |
+
elif task_id == 'F':
|
| 310 |
+
return create_data_entry_taskF(is_train=is_train)
|
| 311 |
+
elif task_id == 'G':
|
| 312 |
+
return create_data_entry_taskG(is_train=is_train)
|
| 313 |
+
elif task_id == 'H':
|
| 314 |
+
return create_data_entry_taskH(is_train=is_train)
|
| 315 |
+
elif task_id == 'I':
|
| 316 |
+
return create_data_entry_taskI(is_train=is_train)
|
| 317 |
+
else:
|
| 318 |
+
print(f"Warning: Unknown task ID '{task_id}'. Skipping this entry.")
|
| 319 |
+
return None
|
| 320 |
+
|
| 321 |
+
|
| 322 |
+
def _worker_init(seed_base):
|
| 323 |
+
"""Reseed RNGs in each worker so processes produce independent streams."""
|
| 324 |
+
pid = os.getpid()
|
| 325 |
+
random.seed(seed_base + pid)
|
| 326 |
+
numpy.random.seed((seed_base + pid) % (2 ** 31))
|
| 327 |
+
|
| 328 |
+
|
| 329 |
+
def _worker_generate_batch(args_tuple):
|
| 330 |
+
"""Worker entry point: generate `count` entries in this process."""
|
| 331 |
+
count, tasks_config, is_train = args_tuple
|
| 332 |
+
out = []
|
| 333 |
+
for _ in range(count):
|
| 334 |
+
entry = _generate_one_entry(tasks_config, is_train)
|
| 335 |
+
if entry is not None:
|
| 336 |
+
out.append(entry)
|
| 337 |
+
return out
|
| 338 |
+
|
| 339 |
+
|
| 340 |
+
def create_multitask_dataset(num_of_data, tasks_config, is_train=True):
|
| 341 |
+
"""
|
| 342 |
+
Generate a multitask dataset with multiple task types.
|
| 343 |
+
|
| 344 |
+
Args:
|
| 345 |
+
num_of_data: Number of data entries to generate
|
| 346 |
+
tasks_config: Dictionary with task configurations and percentages
|
| 347 |
+
is_train: If True, generate training data; if False, generate test data
|
| 348 |
+
|
| 349 |
+
Returns:
|
| 350 |
+
dataset: List of data entries for the specified tasks
|
| 351 |
+
"""
|
| 352 |
+
# Parallel path: split work across processes (fork inherits maze_graph etc.)
|
| 353 |
+
nw = globals().get('num_workers', 1)
|
| 354 |
+
desc = f"Generating {'train' if is_train else 'test'} data"
|
| 355 |
+
if nw and nw > 1 and num_of_data > 0:
|
| 356 |
+
import multiprocessing as mp
|
| 357 |
+
import time
|
| 358 |
+
# Use many small batches so the progress bar updates smoothly.
|
| 359 |
+
batch_size = max(1, min(1000, math.ceil(num_of_data / (nw * 100))))
|
| 360 |
+
batches = []
|
| 361 |
+
remaining = num_of_data
|
| 362 |
+
while remaining > 0:
|
| 363 |
+
c = min(batch_size, remaining)
|
| 364 |
+
batches.append((c, tasks_config, is_train))
|
| 365 |
+
remaining -= c
|
| 366 |
+
seed_base = int(time.time()) + (0 if is_train else 10 ** 6)
|
| 367 |
+
ctx = mp.get_context('fork')
|
| 368 |
+
dataset = []
|
| 369 |
+
with ctx.Pool(processes=nw,
|
| 370 |
+
initializer=_worker_init,
|
| 371 |
+
initargs=(seed_base,)) as pool:
|
| 372 |
+
with tqdm(total=num_of_data, desc=desc) as pbar:
|
| 373 |
+
for r in pool.imap_unordered(_worker_generate_batch, batches):
|
| 374 |
+
dataset.extend(r)
|
| 375 |
+
pbar.update(len(r))
|
| 376 |
+
return dataset
|
| 377 |
+
|
| 378 |
+
# Serial path (original behavior)
|
| 379 |
+
dataset = []
|
| 380 |
+
for _ in tqdm(range(num_of_data), desc=desc):
|
| 381 |
+
data_entry = _generate_one_entry(tasks_config, is_train)
|
| 382 |
+
if data_entry is not None:
|
| 383 |
+
dataset.append(data_entry)
|
| 384 |
+
return dataset
|
| 385 |
+
|
| 386 |
+
|
| 387 |
+
def create_data_entry_taskA(is_train=True):
|
| 388 |
+
"""
|
| 389 |
+
Generate one Task A (pathfinding) data entry.
|
| 390 |
+
Randomly samples a reachable source-target pair that belongs to the requested split
|
| 391 |
+
and returns: ['A', source_node, target_node, <actions...>].
|
| 392 |
+
"""
|
| 393 |
+
while True:
|
| 394 |
+
if path_type_tag == 'RWs':
|
| 395 |
+
# Single Source (Taxi routing style): Pick a start, walk random steps, find end
|
| 396 |
+
source_node = random.randrange(num_nodes)
|
| 397 |
+
num_steps = random.randint(5, num_nodes)
|
| 398 |
+
path = random_walk_ss(source_node, num_steps)
|
| 399 |
+
if not path or len(path) < 2:
|
| 400 |
+
continue
|
| 401 |
+
target_node = path[-1]
|
| 402 |
+
else:
|
| 403 |
+
# Goal-oriented: Pick start and end first
|
| 404 |
+
source_node = random.randrange(num_nodes)
|
| 405 |
+
target_node = random.randrange(num_nodes)
|
| 406 |
+
|
| 407 |
+
if source_node == target_node:
|
| 408 |
+
continue
|
| 409 |
+
|
| 410 |
+
# Ensure the target is reachable from the source to avoid dead walks
|
| 411 |
+
if source_node not in reachability.get(target_node, []):
|
| 412 |
+
continue
|
| 413 |
+
|
| 414 |
+
label = data[source_node][target_node]
|
| 415 |
+
if is_train and label != 1:
|
| 416 |
+
continue
|
| 417 |
+
if (not is_train) and label != -1:
|
| 418 |
+
continue
|
| 419 |
+
|
| 420 |
+
if path_type_tag != 'RWs':
|
| 421 |
+
path = random_walk(source_node, target_node, allow_cycles=allow_cycles)
|
| 422 |
+
|
| 423 |
+
if not path:
|
| 424 |
+
continue
|
| 425 |
+
actions = seq2act(path)
|
| 426 |
+
|
| 427 |
+
# Optional minimum path length filter
|
| 428 |
+
if min_path_len > 0 and len(actions) < min_path_len:
|
| 429 |
+
continue
|
| 430 |
+
|
| 431 |
+
# for both training and test data, needs to return full format with answer part, this is needed to generate validation data during training
|
| 432 |
+
return ['A', source_node, target_node, ':'] + actions
|
| 433 |
+
|
| 434 |
+
|
| 435 |
+
def create_data_entry_taskC(is_train=True):
|
| 436 |
+
"""Generate one Task C entry (turn-based pathfinding).
|
| 437 |
+
|
| 438 |
+
Uses the same reachable-pair sampling as Task A, but encodes the
|
| 439 |
+
path with relative turns assuming the agent starts facing East.
|
| 440 |
+
Output format: ['C', source_node, target_node, ':', <turns...>] by default.
|
| 441 |
+
When cl_mode is True, append the node label after every L/R turn.
|
| 442 |
+
"""
|
| 443 |
+
|
| 444 |
+
while True:
|
| 445 |
+
if path_type_tag == 'RWs':
|
| 446 |
+
# Single Source logic for Task C
|
| 447 |
+
source_node = random.randrange(num_nodes)
|
| 448 |
+
num_steps = random.randint(5, num_nodes)
|
| 449 |
+
path = random_walk_ss(source_node, num_steps)
|
| 450 |
+
if not path or len(path) < 2:
|
| 451 |
+
continue
|
| 452 |
+
target_node = path[-1]
|
| 453 |
+
else:
|
| 454 |
+
source_node = random.randrange(num_nodes)
|
| 455 |
+
target_node = random.randrange(num_nodes)
|
| 456 |
+
|
| 457 |
+
if source_node == target_node:
|
| 458 |
+
continue
|
| 459 |
+
|
| 460 |
+
if source_node not in reachability.get(target_node, []):
|
| 461 |
+
continue
|
| 462 |
+
|
| 463 |
+
label = data[source_node][target_node]
|
| 464 |
+
if is_train and label != 1:
|
| 465 |
+
continue
|
| 466 |
+
if (not is_train) and label != -1:
|
| 467 |
+
continue
|
| 468 |
+
|
| 469 |
+
if path_type_tag != 'RWs':
|
| 470 |
+
path = random_walk(source_node, target_node, allow_cycles=allow_cycles)
|
| 471 |
+
|
| 472 |
+
if not path:
|
| 473 |
+
continue
|
| 474 |
+
|
| 475 |
+
turn_actions = seq2turn(path, start_orientation='E')
|
| 476 |
+
|
| 477 |
+
tokens = ['C', source_node, target_node, ':']
|
| 478 |
+
for step_idx, turn in enumerate(turn_actions):
|
| 479 |
+
tokens.append(turn)
|
| 480 |
+
if cl_mode and turn in ['L', 'R']:
|
| 481 |
+
node_id = path[step_idx]
|
| 482 |
+
tokens.append(maze_graph.nodes[node_id]['label'])
|
| 483 |
+
|
| 484 |
+
return tokens
|
| 485 |
+
|
| 486 |
+
|
| 487 |
+
def create_data_entry_taskD(is_train=True):
|
| 488 |
+
"""Generate one Task D entry (pathfinding to a target label).
|
| 489 |
+
|
| 490 |
+
Input provides a source node and a target label. The answer is a shortest
|
| 491 |
+
path (directions) to the nearest node with that label.
|
| 492 |
+
Format: ['D', source_node, target_label, ':', <directions...>]
|
| 493 |
+
"""
|
| 494 |
+
|
| 495 |
+
while True:
|
| 496 |
+
source_node = random.randrange(num_nodes)
|
| 497 |
+
target_label = random.choice(NODE_LABELS)
|
| 498 |
+
|
| 499 |
+
path = shortest_path_to_label(source_node, target_label)
|
| 500 |
+
if not path:
|
| 501 |
+
continue
|
| 502 |
+
|
| 503 |
+
actions = seq2act(path)
|
| 504 |
+
if not actions:
|
| 505 |
+
continue
|
| 506 |
+
|
| 507 |
+
return ['D', source_node, target_label, ':'] + actions
|
| 508 |
+
|
| 509 |
+
|
| 510 |
+
def create_data_entry_taskE(is_train=True):
|
| 511 |
+
"""
|
| 512 |
+
Task E (pathfinding with label observations).
|
| 513 |
+
- Only split segments when the direction changes (i.e., at turns).
|
| 514 |
+
- For each straight segment, let end_label be the label at the last node of this segment
|
| 515 |
+
(i.e., the turning node label, or the final node label if path ends).
|
| 516 |
+
- In that segment, keep ONLY the positions whose label == end_label.
|
| 517 |
+
Emit (dir, end_label) once for each kept position (so you may repeat the same pair).
|
| 518 |
+
Format: ['E', source_node, target_node, ':', dir1, lab1, dir2, lab2, ...]
|
| 519 |
+
"""
|
| 520 |
+
|
| 521 |
+
while True:
|
| 522 |
+
if path_type_tag == 'RWs':
|
| 523 |
+
# Single Source (Taxi routing style): Pick a start, walk random steps, find end
|
| 524 |
+
source_node = random.randrange(num_nodes)
|
| 525 |
+
num_steps = random.randint(5, num_nodes)
|
| 526 |
+
path = random_walk_ss(source_node, num_steps)
|
| 527 |
+
if not path or len(path) < 2:
|
| 528 |
+
continue
|
| 529 |
+
target_node = path[-1]
|
| 530 |
+
else:
|
| 531 |
+
# Goal-oriented: Pick start and end first
|
| 532 |
+
source_node = random.randrange(num_nodes)
|
| 533 |
+
target_node = random.randrange(num_nodes)
|
| 534 |
+
|
| 535 |
+
if source_node == target_node:
|
| 536 |
+
continue
|
| 537 |
+
|
| 538 |
+
if source_node not in reachability.get(target_node, []):
|
| 539 |
+
continue
|
| 540 |
+
|
| 541 |
+
path = random_walk(source_node, target_node)
|
| 542 |
+
if not path or len(path) < 2:
|
| 543 |
+
continue
|
| 544 |
+
|
| 545 |
+
y = data[source_node][target_node]
|
| 546 |
+
if is_train and y != 1:
|
| 547 |
+
continue
|
| 548 |
+
if (not is_train) and y != -1:
|
| 549 |
+
continue
|
| 550 |
+
|
| 551 |
+
actions = seq2act(path) # len(actions) == len(path)-1
|
| 552 |
+
if not actions:
|
| 553 |
+
continue
|
| 554 |
+
|
| 555 |
+
# Optional minimum path length filter
|
| 556 |
+
if min_path_len > 0 and len(actions) < min_path_len:
|
| 557 |
+
continue
|
| 558 |
+
|
| 559 |
+
# ---- 1) split only by turns (direction changes) ----
|
| 560 |
+
tokens = ['E', source_node, target_node, ':']
|
| 561 |
+
|
| 562 |
+
run_dir = actions[0]
|
| 563 |
+
run_labels = [] # labels of nodes visited during this run (node after each step)
|
| 564 |
+
|
| 565 |
+
for step_idx, direction in enumerate(actions):
|
| 566 |
+
node_id = path[step_idx + 1]
|
| 567 |
+
lab = maze_graph.nodes[node_id]['label']
|
| 568 |
+
|
| 569 |
+
# direction changed => flush previous run, then start new
|
| 570 |
+
if direction != run_dir:
|
| 571 |
+
# flush old run
|
| 572 |
+
end_label = run_labels[-1]
|
| 573 |
+
cnt = sum(1 for x in run_labels if x == end_label)
|
| 574 |
+
for _ in range(cnt):
|
| 575 |
+
tokens.append(run_dir)
|
| 576 |
+
tokens.append(end_label)
|
| 577 |
+
|
| 578 |
+
# start new run
|
| 579 |
+
run_dir = direction
|
| 580 |
+
run_labels = [lab]
|
| 581 |
+
else:
|
| 582 |
+
# still same direction => accumulate
|
| 583 |
+
run_labels.append(lab)
|
| 584 |
+
|
| 585 |
+
# ---- 2) flush last run ----
|
| 586 |
+
end_label = run_labels[-1]
|
| 587 |
+
cnt = sum(1 for x in run_labels if x == end_label)
|
| 588 |
+
for _ in range(cnt):
|
| 589 |
+
tokens.append(run_dir)
|
| 590 |
+
tokens.append(end_label)
|
| 591 |
+
|
| 592 |
+
return tokens
|
| 593 |
+
|
| 594 |
+
|
| 595 |
+
def create_data_entry_taskF(is_train=True):
|
| 596 |
+
"""Generate one Task F entry (label-based target identification).
|
| 597 |
+
|
| 598 |
+
Format: ['F', start_label, <directions...>, ':', target_label]
|
| 599 |
+
The start node is implicit: any node with the given start_label is valid.
|
| 600 |
+
"""
|
| 601 |
+
|
| 602 |
+
start_label = random.choice(NODE_LABELS)
|
| 603 |
+
candidates = [node for node, attrs in maze_graph.nodes(data=True) if attrs.get('label') == start_label]
|
| 604 |
+
if not candidates:
|
| 605 |
+
return None
|
| 606 |
+
|
| 607 |
+
start_node = random.choice(candidates)
|
| 608 |
+
max_walk_len = max(1, 4 * n)
|
| 609 |
+
walk_length = random.randint(1, max_walk_len)
|
| 610 |
+
|
| 611 |
+
path = random_walk_with_cycles(start_node, walk_length)
|
| 612 |
+
end_node = path[-1]
|
| 613 |
+
directions = seq2act(path)
|
| 614 |
+
|
| 615 |
+
target_label = maze_graph.nodes[end_node]['label']
|
| 616 |
+
|
| 617 |
+
return ['F', start_label] + directions + [':', target_label]
|
| 618 |
+
|
| 619 |
+
|
| 620 |
+
def create_data_entry_taskG(is_train=True):
|
| 621 |
+
"""Generate one Task G entry (reachability choice with path as CoT).
|
| 622 |
+
|
| 623 |
+
Format: ['G', s1, s2, t1, t2, ':', source, target, <directions...>]
|
| 624 |
+
Exactly one of (s1->t1) or (s2->t2) is reachable.
|
| 625 |
+
"""
|
| 626 |
+
|
| 627 |
+
while True:
|
| 628 |
+
source1 = random.randrange(num_nodes)
|
| 629 |
+
source2 = random.randrange(num_nodes)
|
| 630 |
+
target1 = random.randrange(num_nodes)
|
| 631 |
+
target2 = random.randrange(num_nodes)
|
| 632 |
+
|
| 633 |
+
if source1 == target1 or source2 == target2:
|
| 634 |
+
continue
|
| 635 |
+
|
| 636 |
+
reachable1 = source1 in reachability.get(target1, [])
|
| 637 |
+
reachable2 = source2 in reachability.get(target2, [])
|
| 638 |
+
|
| 639 |
+
if reachable1 == reachable2:
|
| 640 |
+
continue
|
| 641 |
+
|
| 642 |
+
if reachable1:
|
| 643 |
+
source_node, target_node = source1, target1
|
| 644 |
+
else:
|
| 645 |
+
source_node, target_node = source2, target2
|
| 646 |
+
|
| 647 |
+
path = random_walk(source_node, target_node)
|
| 648 |
+
if not path or len(path) < 2:
|
| 649 |
+
continue
|
| 650 |
+
|
| 651 |
+
actions = seq2act(path)
|
| 652 |
+
return ['G', source1, source2, target1, target2, ':', source_node, target_node] + actions
|
| 653 |
+
|
| 654 |
+
|
| 655 |
+
def create_data_entry_taskH(is_train=True):
|
| 656 |
+
"""Task H: Relative clockwise-index path encoding.
|
| 657 |
+
|
| 658 |
+
The walker starts at source facing East. At each step, feasible edges
|
| 659 |
+
are enumerated clockwise starting from the first direction after the
|
| 660 |
+
current facing direction. The output is the 1-based index of the
|
| 661 |
+
chosen direction among the feasible edges.
|
| 662 |
+
|
| 663 |
+
Format: ['H', source, target, ':', idx1, idx2, ...]
|
| 664 |
+
where each idx is a string '1'-'4'.
|
| 665 |
+
"""
|
| 666 |
+
# Clockwise scan: starting from the current facing direction
|
| 667 |
+
CLOCKWISE_SCAN = {
|
| 668 |
+
'N': ['N', 'E', 'S', 'W'],
|
| 669 |
+
'E': ['E', 'S', 'W', 'N'],
|
| 670 |
+
'S': ['S', 'W', 'N', 'E'],
|
| 671 |
+
'W': ['W', 'N', 'E', 'S'],
|
| 672 |
+
}
|
| 673 |
+
DELTA = {'N': -n, 'S': n, 'E': 1, 'W': -1}
|
| 674 |
+
|
| 675 |
+
while True:
|
| 676 |
+
if path_type_tag == 'RWs':
|
| 677 |
+
source_node = random.randrange(num_nodes)
|
| 678 |
+
num_steps = random.randint(5, num_nodes)
|
| 679 |
+
path = random_walk_ss(source_node, num_steps)
|
| 680 |
+
if not path or len(path) < 2:
|
| 681 |
+
continue
|
| 682 |
+
target_node = path[-1]
|
| 683 |
+
else:
|
| 684 |
+
source_node = random.randrange(num_nodes)
|
| 685 |
+
target_node = random.randrange(num_nodes)
|
| 686 |
+
if source_node == target_node:
|
| 687 |
+
continue
|
| 688 |
+
if source_node not in reachability.get(target_node, []):
|
| 689 |
+
continue
|
| 690 |
+
|
| 691 |
+
label = data[source_node][target_node]
|
| 692 |
+
if is_train and label != 1:
|
| 693 |
+
continue
|
| 694 |
+
if (not is_train) and label != -1:
|
| 695 |
+
continue
|
| 696 |
+
|
| 697 |
+
if path_type_tag != 'RWs':
|
| 698 |
+
path = random_walk(source_node, target_node, allow_cycles=allow_cycles)
|
| 699 |
+
|
| 700 |
+
if not path or len(path) < 2:
|
| 701 |
+
continue
|
| 702 |
+
actions = seq2act(path)
|
| 703 |
+
if not actions:
|
| 704 |
+
continue
|
| 705 |
+
|
| 706 |
+
if min_path_len > 0 and len(actions) < min_path_len:
|
| 707 |
+
continue
|
| 708 |
+
|
| 709 |
+
# Convert absolute directions to relative clockwise indices
|
| 710 |
+
facing = 'E'
|
| 711 |
+
tokens = ['H', source_node, target_node, ':']
|
| 712 |
+
valid = True
|
| 713 |
+
|
| 714 |
+
for step_idx, action in enumerate(actions):
|
| 715 |
+
current_node = path[step_idx]
|
| 716 |
+
scan_order = CLOCKWISE_SCAN[facing]
|
| 717 |
+
feasible = []
|
| 718 |
+
for d in scan_order:
|
| 719 |
+
neighbor = current_node + DELTA[d]
|
| 720 |
+
if 0 <= neighbor < num_nodes and maze_graph.has_edge(current_node, neighbor):
|
| 721 |
+
feasible.append(d)
|
| 722 |
+
|
| 723 |
+
if action not in feasible:
|
| 724 |
+
valid = False
|
| 725 |
+
break
|
| 726 |
+
|
| 727 |
+
idx = feasible.index(action) + 1 # 1-based
|
| 728 |
+
tokens.append(str(idx))
|
| 729 |
+
facing = action # update facing to direction actually moved
|
| 730 |
+
|
| 731 |
+
if not valid:
|
| 732 |
+
continue
|
| 733 |
+
|
| 734 |
+
return tokens
|
| 735 |
+
|
| 736 |
+
|
| 737 |
+
def create_data_entry_taskI(is_train=True):
|
| 738 |
+
"""Task I: Absolute clockwise-index path encoding (fixed North reference).
|
| 739 |
+
|
| 740 |
+
Like Task H, but feasible edges are always enumerated clockwise starting
|
| 741 |
+
from a FIXED North reference (N, E, S, W) regardless of the direction the
|
| 742 |
+
walker just moved. The walker therefore does NOT track a facing direction:
|
| 743 |
+
its state is the current node alone. The output is the 1-based index of the
|
| 744 |
+
chosen direction among the node's feasible edges in this fixed N->E->S->W
|
| 745 |
+
order.
|
| 746 |
+
|
| 747 |
+
This isolates "state-conditioned retrieval" (must read the node's feasible
|
| 748 |
+
edge set to emit/decode the index) from "facing tracking": compared to
|
| 749 |
+
Task A it adds only retrieval; compared to Task H it removes facing tracking.
|
| 750 |
+
|
| 751 |
+
Format: ['I', source, target, ':', idx1, idx2, ...]
|
| 752 |
+
where each idx is a string '1'-'4'.
|
| 753 |
+
"""
|
| 754 |
+
# Fixed clockwise scan order from North (no dependence on facing)
|
| 755 |
+
FIXED_SCAN = ['N', 'E', 'S', 'W']
|
| 756 |
+
DELTA = {'N': -n, 'S': n, 'E': 1, 'W': -1}
|
| 757 |
+
|
| 758 |
+
while True:
|
| 759 |
+
if path_type_tag == 'RWs':
|
| 760 |
+
source_node = random.randrange(num_nodes)
|
| 761 |
+
num_steps = random.randint(5, num_nodes)
|
| 762 |
+
path = random_walk_ss(source_node, num_steps)
|
| 763 |
+
if not path or len(path) < 2:
|
| 764 |
+
continue
|
| 765 |
+
target_node = path[-1]
|
| 766 |
+
else:
|
| 767 |
+
source_node = random.randrange(num_nodes)
|
| 768 |
+
target_node = random.randrange(num_nodes)
|
| 769 |
+
if source_node == target_node:
|
| 770 |
+
continue
|
| 771 |
+
if source_node not in reachability.get(target_node, []):
|
| 772 |
+
continue
|
| 773 |
+
|
| 774 |
+
label = data[source_node][target_node]
|
| 775 |
+
if is_train and label != 1:
|
| 776 |
+
continue
|
| 777 |
+
if (not is_train) and label != -1:
|
| 778 |
+
continue
|
| 779 |
+
|
| 780 |
+
if path_type_tag != 'RWs':
|
| 781 |
+
path = random_walk(source_node, target_node, allow_cycles=allow_cycles)
|
| 782 |
+
|
| 783 |
+
if not path or len(path) < 2:
|
| 784 |
+
continue
|
| 785 |
+
actions = seq2act(path)
|
| 786 |
+
if not actions:
|
| 787 |
+
continue
|
| 788 |
+
|
| 789 |
+
if min_path_len > 0 and len(actions) < min_path_len:
|
| 790 |
+
continue
|
| 791 |
+
|
| 792 |
+
# Convert absolute directions to fixed-North clockwise indices
|
| 793 |
+
tokens = ['I', source_node, target_node, ':']
|
| 794 |
+
valid = True
|
| 795 |
+
|
| 796 |
+
for step_idx, action in enumerate(actions):
|
| 797 |
+
current_node = path[step_idx]
|
| 798 |
+
feasible = []
|
| 799 |
+
for d in FIXED_SCAN:
|
| 800 |
+
neighbor = current_node + DELTA[d]
|
| 801 |
+
if 0 <= neighbor < num_nodes and maze_graph.has_edge(current_node, neighbor):
|
| 802 |
+
feasible.append(d)
|
| 803 |
+
|
| 804 |
+
if action not in feasible:
|
| 805 |
+
valid = False
|
| 806 |
+
break
|
| 807 |
+
|
| 808 |
+
idx = feasible.index(action) + 1 # 1-based
|
| 809 |
+
tokens.append(str(idx))
|
| 810 |
+
# NOTE: no facing update — reference stays fixed at North.
|
| 811 |
+
|
| 812 |
+
if not valid:
|
| 813 |
+
continue
|
| 814 |
+
|
| 815 |
+
return tokens
|
| 816 |
+
|
| 817 |
+
|
| 818 |
+
# Add 'x' entries for unreachable pairs, only used if we allow unreachable pairs in the dataset, and currently it is not used.
|
| 819 |
+
def add_x(train_set, test_set, tasks_config):
|
| 820 |
+
cnt = 0
|
| 821 |
+
for target_node in range(num_nodes):
|
| 822 |
+
for source_node in range(num_nodes):
|
| 823 |
+
if source_node == target_node:
|
| 824 |
+
continue
|
| 825 |
+
if source_node not in reachability[target_node]:
|
| 826 |
+
cnt += 1
|
| 827 |
+
|
| 828 |
+
prob_in_test = len(test_set) / cnt * 0.2
|
| 829 |
+
prob_in_train = min(len(train_set) / cnt * 0.2, 1 - prob_in_test)
|
| 830 |
+
train_repeat = max(int(len(train_set) / cnt * 0.15 / prob_in_train), 1)
|
| 831 |
+
print(prob_in_train, prob_in_test, train_repeat)
|
| 832 |
+
|
| 833 |
+
for target_node in range(num_nodes):
|
| 834 |
+
for source_node in range(num_nodes):
|
| 835 |
+
if source_node == target_node:
|
| 836 |
+
continue
|
| 837 |
+
if source_node not in reachability[target_node]:
|
| 838 |
+
coin = random.random()
|
| 839 |
+
if coin < prob_in_train:
|
| 840 |
+
for _ in range(train_repeat):
|
| 841 |
+
task_id = select_task(tasks_config, is_train=True)
|
| 842 |
+
if task_id == 'A':
|
| 843 |
+
train_set.append(['A', source_node, target_node, 'x'])
|
| 844 |
+
else:
|
| 845 |
+
print(
|
| 846 |
+
f"Error: Task {task_id} is not yet defined. Skipping training data generation for this entry.")
|
| 847 |
+
|
| 848 |
+
elif coin > 1 - prob_in_test:
|
| 849 |
+
task_id = select_task(tasks_config, is_train=False)
|
| 850 |
+
if task_id == 'A':
|
| 851 |
+
test_set.append(['A', source_node, target_node, 'x'])
|
| 852 |
+
else:
|
| 853 |
+
print(
|
| 854 |
+
f"Error: Task {task_id} is not yet defined. Skipping test data generation for this entry.")
|
| 855 |
+
|
| 856 |
+
return train_set, test_set
|
| 857 |
+
|
| 858 |
+
|
| 859 |
+
def create_data_entry_taskB(is_train=True):
|
| 860 |
+
"""Generate one Task B entry (target identification).
|
| 861 |
+
|
| 862 |
+
Training format: B <start> <directions...> : <end_label> <E> <S> <W> <N>
|
| 863 |
+
Test format: B <start> <directions...>
|
| 864 |
+
Walk length is random up to 4 * grid_size (n).
|
| 865 |
+
"""
|
| 866 |
+
|
| 867 |
+
def get_neighbor_labels(node):
|
| 868 |
+
neighbors_order = [(1, 'E'), (n, 'S'), (-1, 'W'), (-n, 'N')]
|
| 869 |
+
labels = []
|
| 870 |
+
for offset, _ in neighbors_order:
|
| 871 |
+
neighbor_id = node + offset
|
| 872 |
+
if maze_graph.has_edge(node, neighbor_id):
|
| 873 |
+
labels.append(maze_graph.nodes[neighbor_id]['label'])
|
| 874 |
+
else:
|
| 875 |
+
labels.append('/')
|
| 876 |
+
return labels
|
| 877 |
+
|
| 878 |
+
start_node = random.randint(0, num_nodes - 1)
|
| 879 |
+
max_walk_len = max(1, 4 * n)
|
| 880 |
+
walk_length = random.randint(1, max_walk_len)
|
| 881 |
+
|
| 882 |
+
path = random_walk_with_cycles(start_node, walk_length)
|
| 883 |
+
end_node = path[-1]
|
| 884 |
+
directions = seq2act(path)
|
| 885 |
+
|
| 886 |
+
end_label = maze_graph.nodes[end_node]['label']
|
| 887 |
+
neighbor_labels = get_neighbor_labels(end_node)
|
| 888 |
+
|
| 889 |
+
# for both training and test data, return answer without target node id (only label + neighbors)
|
| 890 |
+
return ['B', start_node] + directions + [':', end_label] + neighbor_labels
|
| 891 |
+
|
| 892 |
+
|
| 893 |
+
def obtain_stats(dataset, is_train=True):
|
| 894 |
+
"""
|
| 895 |
+
Compute and print statistics for a multitask dataset.
|
| 896 |
+
|
| 897 |
+
Args:
|
| 898 |
+
dataset: List of data entries (can be mixed tasks)
|
| 899 |
+
is_train: If True, label output as training data; else as test data
|
| 900 |
+
"""
|
| 901 |
+
dataset_type = "Training" if is_train else "Test"
|
| 902 |
+
print(f'\n{dataset_type} Dataset Statistics:')
|
| 903 |
+
print('=' * 80)
|
| 904 |
+
|
| 905 |
+
# Separate entries by task
|
| 906 |
+
taskA_entries = [entry for entry in dataset if entry[0] == 'A']
|
| 907 |
+
taskB_entries = [entry for entry in dataset if entry[0] == 'B']
|
| 908 |
+
taskC_entries = [entry for entry in dataset if entry[0] == 'C']
|
| 909 |
+
taskD_entries = [entry for entry in dataset if entry[0] == 'D']
|
| 910 |
+
taskE_entries = [entry for entry in dataset if entry[0] == 'E']
|
| 911 |
+
taskF_entries = [entry for entry in dataset if entry[0] == 'F']
|
| 912 |
+
taskG_entries = [entry for entry in dataset if entry[0] == 'G']
|
| 913 |
+
taskH_entries = [entry for entry in dataset if entry[0] == 'H']
|
| 914 |
+
taskI_entries = [entry for entry in dataset if entry[0] == 'I']
|
| 915 |
+
|
| 916 |
+
print(f'Total entries: {len(dataset)}')
|
| 917 |
+
print(f' Task A entries: {len(taskA_entries)}')
|
| 918 |
+
print(f' Task B entries: {len(taskB_entries)}')
|
| 919 |
+
print(f' Task C entries: {len(taskC_entries)}')
|
| 920 |
+
print(f' Task D entries: {len(taskD_entries)}')
|
| 921 |
+
print(f' Task E entries: {len(taskE_entries)}')
|
| 922 |
+
print(f' Task F entries: {len(taskF_entries)}')
|
| 923 |
+
print(f' Task G entries: {len(taskG_entries)}')
|
| 924 |
+
print(f' Task H entries: {len(taskH_entries)}')
|
| 925 |
+
print(f' Task I entries: {len(taskI_entries)}')
|
| 926 |
+
|
| 927 |
+
# Task A statistics
|
| 928 |
+
if taskA_entries:
|
| 929 |
+
print(f'\nTask A (Path finding):')
|
| 930 |
+
# Extract source-target pairs from task A entries
|
| 931 |
+
# Format: A source target directions...
|
| 932 |
+
pairs = set()
|
| 933 |
+
for entry in taskA_entries:
|
| 934 |
+
if len(entry) >= 3:
|
| 935 |
+
source = entry[1]
|
| 936 |
+
target = entry[2]
|
| 937 |
+
pairs.add((source, target))
|
| 938 |
+
|
| 939 |
+
num_pairs = len(pairs)
|
| 940 |
+
num_entries = len(taskA_entries)
|
| 941 |
+
avg_per_pair = num_entries / num_pairs if num_pairs > 0 else 0
|
| 942 |
+
|
| 943 |
+
print(f' Number of source-target pairs: {num_pairs}')
|
| 944 |
+
print(f' Number of data entries: {num_entries}')
|
| 945 |
+
print(f' Average entries per pair: {avg_per_pair:.2f}')
|
| 946 |
+
|
| 947 |
+
# Task B statistics
|
| 948 |
+
if taskB_entries:
|
| 949 |
+
print(f'\nTask B (Target identification):')
|
| 950 |
+
# Extract source nodes from task B entries
|
| 951 |
+
# Format: B source directions...
|
| 952 |
+
source_nodes = set()
|
| 953 |
+
for entry in taskB_entries:
|
| 954 |
+
if len(entry) >= 2:
|
| 955 |
+
source = entry[1]
|
| 956 |
+
source_nodes.add(source)
|
| 957 |
+
|
| 958 |
+
num_sources = len(source_nodes)
|
| 959 |
+
num_entries = len(taskB_entries)
|
| 960 |
+
avg_per_source = num_entries / num_sources if num_sources > 0 else 0
|
| 961 |
+
|
| 962 |
+
print(f' Number of source nodes: {num_sources}')
|
| 963 |
+
print(f' Number of data entries: {num_entries}')
|
| 964 |
+
print(f' Average entries per source node: {avg_per_source:.2f}')
|
| 965 |
+
|
| 966 |
+
# Task C statistics (mirrors Task A pair counting)
|
| 967 |
+
if taskC_entries:
|
| 968 |
+
print(f'\nTask C (Turn-based path finding):')
|
| 969 |
+
pairs = set()
|
| 970 |
+
for entry in taskC_entries:
|
| 971 |
+
if len(entry) >= 3:
|
| 972 |
+
source = entry[1]
|
| 973 |
+
target = entry[2]
|
| 974 |
+
pairs.add((source, target))
|
| 975 |
+
num_pairs = len(pairs)
|
| 976 |
+
num_entries = len(taskC_entries)
|
| 977 |
+
avg_per_pair = num_entries / num_pairs if num_pairs > 0 else 0
|
| 978 |
+
print(f' Number of source-target pairs: {num_pairs}')
|
| 979 |
+
print(f' Number of data entries: {num_entries}')
|
| 980 |
+
print(f' Average entries per pair: {avg_per_pair:.2f}')
|
| 981 |
+
|
| 982 |
+
if taskD_entries:
|
| 983 |
+
print(f'\nTask D (Path finding to label):')
|
| 984 |
+
print(f' Number of data entries: {len(taskD_entries)}')
|
| 985 |
+
|
| 986 |
+
if taskE_entries:
|
| 987 |
+
print(f'\nTask E (Path finding with labels):')
|
| 988 |
+
print(f' Number of data entries: {len(taskE_entries)}')
|
| 989 |
+
|
| 990 |
+
if taskF_entries:
|
| 991 |
+
print(f'\nTask F (Target label identification):')
|
| 992 |
+
print(f' Number of data entries: {len(taskF_entries)}')
|
| 993 |
+
|
| 994 |
+
if taskG_entries:
|
| 995 |
+
print(f'\nTask G (Reachability choice):')
|
| 996 |
+
print(f' Number of data entries: {len(taskG_entries)}')
|
| 997 |
+
|
| 998 |
+
if taskH_entries:
|
| 999 |
+
print(f'\nTask H (Relative clockwise-index path):')
|
| 1000 |
+
print(f' Number of data entries: {len(taskH_entries)}')
|
| 1001 |
+
|
| 1002 |
+
|
| 1003 |
+
def format_data(data, no_task_tag=False):
|
| 1004 |
+
# Format: task_id source target [remaining_tokens]
|
| 1005 |
+
# If no_task_tag is True, remove the first token (task identifier)
|
| 1006 |
+
if no_task_tag and len(data) > 0:
|
| 1007 |
+
# Remove the task identifier (first token)
|
| 1008 |
+
return ' '.join(str(token) for token in data[1:]) + '\n'
|
| 1009 |
+
else:
|
| 1010 |
+
return ' '.join(str(token) for token in data) + '\n'
|
| 1011 |
+
|
| 1012 |
+
|
| 1013 |
+
def write_dataset(dataset, file_name, no_task_tag=False):
|
| 1014 |
+
with open(file_name, "w") as file:
|
| 1015 |
+
for data in dataset:
|
| 1016 |
+
file.write(format_data(data, no_task_tag))
|
| 1017 |
+
|
| 1018 |
+
|
| 1019 |
+
def parse_tasks(tasks_str):
|
| 1020 |
+
"""
|
| 1021 |
+
Parse task specification string into a dictionary.
|
| 1022 |
+
Format: "A<ratio>B<ratio>C<ratio>..." where ratios determine portions.
|
| 1023 |
+
Example: "A1" (100% A), "A1B1" (50% A, 50% B), "A3B2" (60% A, 40% B), "A2B1C1" (50% A, 25% B, 25% C)
|
| 1024 |
+
Returns: {"A": {"train": 50, "test": 50}, "B": {"train": 50, "test": 50}, ...}
|
| 1025 |
+
Test data follows the same ratio as training data.
|
| 1026 |
+
"""
|
| 1027 |
+
weights = parse_task_distribution(tasks_str, default_task='A')
|
| 1028 |
+
total_ratio = sum(weights.values())
|
| 1029 |
+
tasks_config = {}
|
| 1030 |
+
for task_id, ratio in weights.items():
|
| 1031 |
+
percentage = (ratio / total_ratio) * 100
|
| 1032 |
+
tasks_config[task_id] = {"train": percentage, "test": percentage}
|
| 1033 |
+
return tasks_config
|
| 1034 |
+
|
| 1035 |
+
|
| 1036 |
+
if __name__ == "__main__":
|
| 1037 |
+
parser = argparse.ArgumentParser(description='Generate a maze based on the given parameters.')
|
| 1038 |
+
parser.add_argument('--grid_size', type=int, default=10, help='Size of the grid (n x n)')
|
| 1039 |
+
parser.add_argument('--edge_prob', type=float, default=0.6, help='Probability to keep an edge in the grid graph')
|
| 1040 |
+
parser.add_argument('--chance_in_train', type=float, default=0.5, help='Chance of a pair being in the training set')
|
| 1041 |
+
parser.add_argument('--num_train_dataset', type=parse_count, default='10M',
|
| 1042 |
+
help='Number of training data entries to generate (supports K/M/B, default: 50000)')
|
| 1043 |
+
parser.add_argument('--num_test_dataset', type=parse_count, default=10000,
|
| 1044 |
+
help='Number of test data entries to generate (supports K/M/B, default: 10000)')
|
| 1045 |
+
# Multi-task specification:
|
| 1046 |
+
parser.add_argument('--tasks', type=str, default='H1',
|
| 1047 |
+
help='Task identifiers with ratios. Format: "A<ratio>B<ratio>C<ratio>...". Examples: "A1" (100%% A), "A1B1" (50%% A, 50%% B), "A3B2" (60%% A, 40%% B), "A1D1F1" (mix A/D/F). Default: A1')
|
| 1048 |
+
parser.add_argument('--CL', action=argparse.BooleanOptionalAction, default=False,
|
| 1049 |
+
help='Enable Task C label mode (append node labels after L/R turns) and add _CL_ in filenames')
|
| 1050 |
+
parser.add_argument('--graph_file', type=str, default=None,
|
| 1051 |
+
help='Optional path to an existing GraphML file; if provided, skip random graph generation and use this graph instead.')
|
| 1052 |
+
parser.add_argument('--path_type', type=str, default='RWs', choices=['RWc', 'RWa', 'RWs'],
|
| 1053 |
+
help='Path generation type: RWc (random walk with cycles), RWa (random walk acyclic, default), RWs (single source random walk). "shortest" is not implemented yet.')
|
| 1054 |
+
# Arguments for task tag handling
|
| 1055 |
+
parser.add_argument('--no_task_tag', action='store_true', default=False,
|
| 1056 |
+
help='Remove task identifiers from generated data. When enabled, output files will have _NT suffix and data entries start directly with node numbers.')
|
| 1057 |
+
parser.add_argument('--both', action='store_true', default=False,
|
| 1058 |
+
help='Generate both versions (with and without task tags). When set, --no_task_tag is ignored and two datasets are produced.')
|
| 1059 |
+
parser.add_argument('--num_labels', type=int, default=10,
|
| 1060 |
+
help='Number of distinct node labels (default: 10). Up to 26 uses a-z; above 26 uses l0, l1, ...')
|
| 1061 |
+
parser.add_argument('--min_path_len', type=int, default=0,
|
| 1062 |
+
help='Minimum raw path length (in steps) for generated entries. 0 means no minimum (default).')
|
| 1063 |
+
parser.add_argument('--num_workers', type=int, default=256,
|
| 1064 |
+
help='Number of parallel worker processes for dataset generation (default: 1 = serial). Uses fork; requires Linux/macOS.')
|
| 1065 |
+
|
| 1066 |
+
args = parser.parse_args()
|
| 1067 |
+
|
| 1068 |
+
# Override NODE_LABELS if --num_labels is specified
|
| 1069 |
+
if args.num_labels != 10:
|
| 1070 |
+
NODE_LABELS = make_label_list(args.num_labels)
|
| 1071 |
+
print(f"Using {args.num_labels} labels: {NODE_LABELS[:5]}{'...' if args.num_labels > 5 else ''}")
|
| 1072 |
+
min_path_len = args.min_path_len
|
| 1073 |
+
num_workers = args.num_workers
|
| 1074 |
+
|
| 1075 |
+
# Parse task specifications
|
| 1076 |
+
tasks_config = parse_tasks(args.tasks)
|
| 1077 |
+
tasks_str = args.tasks # Keep the original tasks string for filenames
|
| 1078 |
+
tasks_tag = f"{tasks_str}_CL" if args.CL else tasks_str
|
| 1079 |
+
cl_mode = args.CL
|
| 1080 |
+
no_task_tag = args.no_task_tag # Get the no_task_tag flag
|
| 1081 |
+
|
| 1082 |
+
# Parse path_type for filenames (RWc = cyclic, RWa = acyclic, RWs = single source)
|
| 1083 |
+
allow_cycles = (args.path_type == 'RWc')
|
| 1084 |
+
path_type_tag = args.path_type
|
| 1085 |
+
tasks_tag = f"{tasks_tag}_{path_type_tag}"
|
| 1086 |
+
|
| 1087 |
+
# Include num_labels and min_path_len in tags when non-default
|
| 1088 |
+
if args.num_labels != 10:
|
| 1089 |
+
tasks_tag = f"{tasks_tag}_L{args.num_labels}"
|
| 1090 |
+
if args.min_path_len > 0:
|
| 1091 |
+
tasks_tag = f"{tasks_tag}_P{args.min_path_len}"
|
| 1092 |
+
|
| 1093 |
+
edge_prob = args.edge_prob
|
| 1094 |
+
chance_in_train = args.chance_in_train
|
| 1095 |
+
num_train_dataset = args.num_train_dataset
|
| 1096 |
+
num_test_dataset = args.num_test_dataset
|
| 1097 |
+
train_label = format_count(num_train_dataset)
|
| 1098 |
+
test_label = format_count(num_test_dataset)
|
| 1099 |
+
graph_file = args.graph_file
|
| 1100 |
+
|
| 1101 |
+
if graph_file:
|
| 1102 |
+
graph_path = graph_file
|
| 1103 |
+
if not os.path.isabs(graph_file):
|
| 1104 |
+
default_dir = os.path.join(os.path.dirname(__file__), f'{args.grid_size * args.grid_size}')
|
| 1105 |
+
candidate = os.path.join(default_dir, graph_file)
|
| 1106 |
+
if os.path.exists(candidate):
|
| 1107 |
+
graph_path = candidate
|
| 1108 |
+
print(f"Loading maze graph from {graph_path}...")
|
| 1109 |
+
maze_graph = nx.read_graphml(graph_path)
|
| 1110 |
+
# Ensure node ids are integers (GraphML loader returns strings)
|
| 1111 |
+
try:
|
| 1112 |
+
int_map = {node: int(node) for node in maze_graph.nodes()}
|
| 1113 |
+
maze_graph = nx.relabel_nodes(maze_graph, int_map, copy=True)
|
| 1114 |
+
except ValueError:
|
| 1115 |
+
pass
|
| 1116 |
+
|
| 1117 |
+
num_nodes = len(maze_graph.nodes)
|
| 1118 |
+
n = int(math.isqrt(num_nodes))
|
| 1119 |
+
if n * n != num_nodes:
|
| 1120 |
+
print(
|
| 1121 |
+
f"Warning: provided graph has {num_nodes} nodes; not a perfect square grid. Proceeding with derived size {n}.")
|
| 1122 |
+
else:
|
| 1123 |
+
n = args.grid_size
|
| 1124 |
+
num_nodes = n * n
|
| 1125 |
+
maze_graph = generate_maze(n, edge_prob)
|
| 1126 |
+
|
| 1127 |
+
folder_name = os.path.join(os.path.dirname(__file__), f'{num_nodes}')
|
| 1128 |
+
if not os.path.exists(folder_name):
|
| 1129 |
+
os.makedirs(folder_name)
|
| 1130 |
+
|
| 1131 |
+
# Always save grid visualization to file with consistent naming convention
|
| 1132 |
+
maze_viz_tag = f"{tasks_str}_CL" if cl_mode else tasks_str
|
| 1133 |
+
maze_viz_tag = f"{maze_viz_tag}_{path_type_tag}"
|
| 1134 |
+
if args.num_labels != 10:
|
| 1135 |
+
maze_viz_tag = f"{maze_viz_tag}_L{args.num_labels}"
|
| 1136 |
+
# Graph and visualization files: always save without _NT, regardless of no_task_tag/both
|
| 1137 |
+
# This ensures they are compatible with both data formats
|
| 1138 |
+
grid_file_path = os.path.join(folder_name, f'maze_{maze_viz_tag}_{n}_{edge_prob}.txt')
|
| 1139 |
+
with open(grid_file_path, 'w') as f:
|
| 1140 |
+
print_grid(maze_graph, n, file=f)
|
| 1141 |
+
|
| 1142 |
+
# Always print visualization to the screen
|
| 1143 |
+
print_grid(maze_graph, n)
|
| 1144 |
+
|
| 1145 |
+
reachability, feasible_pairs = obtain_reachability()
|
| 1146 |
+
|
| 1147 |
+
# This is for generating pairs for training and test datasets for task A
|
| 1148 |
+
data = numpy.zeros([num_nodes, num_nodes])
|
| 1149 |
+
for target_node in range(num_nodes):
|
| 1150 |
+
cnt = 0 # to avoid some target not appear in training dataset
|
| 1151 |
+
for source_node in range(num_nodes):
|
| 1152 |
+
if source_node == target_node:
|
| 1153 |
+
continue
|
| 1154 |
+
if source_node in reachability[target_node]:
|
| 1155 |
+
if (maze_graph.has_edge(source_node, target_node)) or random.random() < chance_in_train or cnt < 1:
|
| 1156 |
+
data[source_node][target_node] = 1
|
| 1157 |
+
cnt += 1
|
| 1158 |
+
else:
|
| 1159 |
+
data[source_node][target_node] = -1
|
| 1160 |
+
|
| 1161 |
+
train_set = create_multitask_dataset(num_train_dataset, tasks_config, is_train=True)
|
| 1162 |
+
test_set = create_multitask_dataset(num_test_dataset, tasks_config, is_train=False)
|
| 1163 |
+
|
| 1164 |
+
obtain_stats(train_set, is_train=True)
|
| 1165 |
+
obtain_stats(test_set, is_train=False)
|
| 1166 |
+
|
| 1167 |
+
# Build graph tag for output files (without _NT)
|
| 1168 |
+
graph_tag = f"{tasks_str}_CL" if cl_mode else tasks_str
|
| 1169 |
+
graph_tag = f"{graph_tag}_{path_type_tag}"
|
| 1170 |
+
# Include num_labels in graph tag when non-default (different label sets = different graphs)
|
| 1171 |
+
if args.num_labels != 10:
|
| 1172 |
+
graph_tag = f"{graph_tag}_L{args.num_labels}"
|
| 1173 |
+
|
| 1174 |
+
# Generate datasets based on both/no_task_tag flags
|
| 1175 |
+
if args.both:
|
| 1176 |
+
# Generate with task tags (no _NT suffix)
|
| 1177 |
+
tag_with_tags = tasks_tag
|
| 1178 |
+
write_dataset(train_set, os.path.join(folder_name, f'train_{tag_with_tags}_{train_label}.txt'),
|
| 1179 |
+
no_task_tag=False)
|
| 1180 |
+
write_dataset(test_set, os.path.join(folder_name, f'test_{tag_with_tags}_{test_label}.txt'), no_task_tag=False)
|
| 1181 |
+
|
| 1182 |
+
# Generate without task tags (_NT suffix)
|
| 1183 |
+
tag_without_tags = f"{tasks_tag}_NT"
|
| 1184 |
+
write_dataset(train_set, os.path.join(folder_name, f'train_{tag_without_tags}_{train_label}.txt'),
|
| 1185 |
+
no_task_tag=True)
|
| 1186 |
+
write_dataset(test_set, os.path.join(folder_name, f'test_{tag_without_tags}_{test_label}.txt'),
|
| 1187 |
+
no_task_tag=True)
|
| 1188 |
+
|
| 1189 |
+
# Save graph files: both without _NT and with _NT
|
| 1190 |
+
nx.write_graphml(maze_graph, os.path.join(folder_name, f'maze_graph_{graph_tag}.graphml'))
|
| 1191 |
+
nx.write_graphml(maze_graph, os.path.join(folder_name, f'maze_graph_{graph_tag}_NT.graphml'))
|
| 1192 |
+
|
| 1193 |
+
print("Generated both with-tag and without-tag datasets and graph files.")
|
| 1194 |
+
else:
|
| 1195 |
+
# Original logic: generate only one version based on no_task_tag
|
| 1196 |
+
output_tasks_tag = tasks_tag
|
| 1197 |
+
if no_task_tag:
|
| 1198 |
+
output_tasks_tag = f"{tasks_tag}_NT"
|
| 1199 |
+
write_dataset(train_set, os.path.join(folder_name, f'train_{output_tasks_tag}_{train_label}.txt'), no_task_tag)
|
| 1200 |
+
write_dataset(test_set, os.path.join(folder_name, f'test_{output_tasks_tag}_{test_label}.txt'), no_task_tag)
|
| 1201 |
+
|
| 1202 |
+
# Save graph file with appropriate suffix
|
| 1203 |
+
graph_suffix = "_NT" if no_task_tag else ""
|
| 1204 |
+
nx.write_graphml(maze_graph, os.path.join(folder_name, f'maze_graph_{graph_tag}{graph_suffix}.graphml'))
|
data/maze/prepare_minigpt.py
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import pickle
|
| 3 |
+
import numpy as np
|
| 4 |
+
import re
|
| 5 |
+
import argparse
|
| 6 |
+
|
| 7 |
+
parser = argparse.ArgumentParser(description='Create the dataset based on the given parameters.')
|
| 8 |
+
parser.add_argument('--num_nodes', type=int, default=100, help='Number of nodes in the graph')
|
| 9 |
+
parser.add_argument('--num_of_paths', type=int, default=20, help='Number of paths per pair nodes in training dataset')
|
| 10 |
+
args = parser.parse_args()
|
| 11 |
+
|
| 12 |
+
num_nodes = args.num_nodes
|
| 13 |
+
|
| 14 |
+
if(args.num_of_paths == 0):
|
| 15 |
+
train_file_path = os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/train.txt')
|
| 16 |
+
val_file_path = os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/test.txt')
|
| 17 |
+
else:
|
| 18 |
+
train_file_path = os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/train_{args.num_of_paths}.txt')
|
| 19 |
+
val_file_path = os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/test.txt')
|
| 20 |
+
# test_file_path = os.path.join(os.path.dirname(__file__), 'test.txt')
|
| 21 |
+
|
| 22 |
+
with open(train_file_path, 'r') as f:
|
| 23 |
+
train_data = f.read()
|
| 24 |
+
print(f"length of train dataset in characters: {len(train_data):,}")
|
| 25 |
+
|
| 26 |
+
with open(val_file_path, 'r') as f:
|
| 27 |
+
val_data = f.read()
|
| 28 |
+
print(f"length of val dataset in characters: {len(val_data):,}")
|
| 29 |
+
|
| 30 |
+
all_data = train_data + val_data
|
| 31 |
+
|
| 32 |
+
def find_characters(data_string):
|
| 33 |
+
pattern = r'\d+|\D'
|
| 34 |
+
matches = re.findall(pattern, data_string)
|
| 35 |
+
return set(matches)
|
| 36 |
+
|
| 37 |
+
def process_reasoning(s):
|
| 38 |
+
split_text = s.split('\n')
|
| 39 |
+
#split_text = [s + '\n' for s in split_text if s != ""]
|
| 40 |
+
ret = []
|
| 41 |
+
for st in split_text:
|
| 42 |
+
if(st != ""):
|
| 43 |
+
enc_str = encode(st) + [1]
|
| 44 |
+
ret += enc_str +[0] * (block_size + 1 - len(enc_str))
|
| 45 |
+
return ret
|
| 46 |
+
|
| 47 |
+
def get_block_size(s):
|
| 48 |
+
split_text = s.split('\n')
|
| 49 |
+
#split_text = [s + '\n' for s in split_text if s != ""]
|
| 50 |
+
ret = []
|
| 51 |
+
bs = 0
|
| 52 |
+
for st in split_text:
|
| 53 |
+
if(st != ""):
|
| 54 |
+
enc_str = encode(st) + [1]
|
| 55 |
+
bs = max(bs, len(enc_str))
|
| 56 |
+
return bs
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
def encode_string(s, stonum):
|
| 60 |
+
ss = s.split(" ")
|
| 61 |
+
encoded_string = [stonum[ch] for ch in ss]
|
| 62 |
+
return encoded_string
|
| 63 |
+
|
| 64 |
+
def decode_string(l, numtos):
|
| 65 |
+
dec = ""
|
| 66 |
+
for i in l:
|
| 67 |
+
dec = dec + numtos[i] + " "
|
| 68 |
+
return dec[:-1]
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
# get all the unique characters that occur in this text
|
| 72 |
+
chars = sorted(list(find_characters(all_data)))
|
| 73 |
+
# direction tokens for maze paths
|
| 74 |
+
direction_tokens = ['N','S','E','W']
|
| 75 |
+
# task tokens for multi-task support
|
| 76 |
+
task_tokens = ['A', 'B', 'C', 'D', 'E', 'F', 'G']
|
| 77 |
+
# special tokens: 'x' marks a wall-hit / unreachable (wrong-path) terminator
|
| 78 |
+
special_tokens = ['x']
|
| 79 |
+
# vocab = node ids + PAD + newline + direction tokens + task tokens + special tokens
|
| 80 |
+
vocab_size = num_nodes + 2 + len(direction_tokens) + len(task_tokens) + len(special_tokens)
|
| 81 |
+
print("all the unique characters:", ' '.join(chars))
|
| 82 |
+
print(f"vocab size: {vocab_size:,}")
|
| 83 |
+
|
| 84 |
+
# create a mapping from characters to integers
|
| 85 |
+
stoi = {}
|
| 86 |
+
itos = {}
|
| 87 |
+
|
| 88 |
+
for i in range(num_nodes):
|
| 89 |
+
stoi[str(i)] = i+2
|
| 90 |
+
itos[i+2] = str(i)
|
| 91 |
+
|
| 92 |
+
# map direction tokens after the node id tokens
|
| 93 |
+
base = 2 + num_nodes
|
| 94 |
+
for idx, tok in enumerate(direction_tokens):
|
| 95 |
+
stoi[tok] = base + idx
|
| 96 |
+
itos[base + idx] = tok
|
| 97 |
+
|
| 98 |
+
# map task tokens after direction tokens
|
| 99 |
+
base = 2 + num_nodes + len(direction_tokens)
|
| 100 |
+
for idx, tok in enumerate(task_tokens):
|
| 101 |
+
stoi[tok] = base + idx
|
| 102 |
+
itos[base + idx] = tok
|
| 103 |
+
|
| 104 |
+
# map special tokens (e.g. 'x') after task tokens
|
| 105 |
+
base = 2 + num_nodes + len(direction_tokens) + len(task_tokens)
|
| 106 |
+
for idx, tok in enumerate(special_tokens):
|
| 107 |
+
stoi[tok] = base + idx
|
| 108 |
+
itos[base + idx] = tok
|
| 109 |
+
|
| 110 |
+
stoi['[PAD]'] = 0
|
| 111 |
+
itos[0] = '[PAD]'
|
| 112 |
+
stoi['\n'] = 1
|
| 113 |
+
itos[1] = '\n'
|
| 114 |
+
|
| 115 |
+
def encode(s):
|
| 116 |
+
return encode_string(s, stoi) # encoder: take a string, output a list of integers
|
| 117 |
+
def decode(l):
|
| 118 |
+
return decode_string(l, itos) # decoder: take a list of integers, output a string
|
| 119 |
+
|
| 120 |
+
# encode both to integers
|
| 121 |
+
block_size = (max(get_block_size(train_data), get_block_size(val_data)) // 32 + 1) * 32
|
| 122 |
+
|
| 123 |
+
print(f"the block size is {block_size}")
|
| 124 |
+
|
| 125 |
+
train_ids = process_reasoning(train_data)
|
| 126 |
+
|
| 127 |
+
val_ids = process_reasoning(val_data)
|
| 128 |
+
|
| 129 |
+
print(f"train has {len(train_ids):,} tokens")
|
| 130 |
+
print(f"val has {len(val_ids):,} tokens")
|
| 131 |
+
|
| 132 |
+
# export to bin files
|
| 133 |
+
train_ids = np.array(train_ids, dtype=np.uint16)
|
| 134 |
+
val_ids = np.array(val_ids, dtype=np.uint16)
|
| 135 |
+
|
| 136 |
+
if(args.num_of_paths == 0):
|
| 137 |
+
train_ids.tofile(os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/train.bin'))
|
| 138 |
+
val_ids.tofile(os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/val.bin'))
|
| 139 |
+
else:
|
| 140 |
+
train_ids.tofile(os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/train_{args.num_of_paths}.bin'))
|
| 141 |
+
val_ids.tofile(os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/val.bin'))
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
unreachable = False; simple_format = True
|
| 145 |
+
if 'x' in chars:
|
| 146 |
+
unreachable = True
|
| 147 |
+
if ':' in chars:
|
| 148 |
+
simple_format = False
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
# save the meta information as well, to help us encode/decode later
|
| 152 |
+
meta = {
|
| 153 |
+
'unreachable': unreachable,
|
| 154 |
+
'simple_format': simple_format,
|
| 155 |
+
'block_size': block_size,
|
| 156 |
+
'vocab_size': vocab_size,
|
| 157 |
+
'itos': itos,
|
| 158 |
+
'stoi': stoi,
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
print(stoi)
|
| 162 |
+
print(itos)
|
| 163 |
+
with open(os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/meta.pkl'), 'wb') as f:
|
| 164 |
+
pickle.dump(meta, f)
|
data/maze/prepare_multitask_minigpt.py
ADDED
|
@@ -0,0 +1,323 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import sys
|
| 3 |
+
import pickle
|
| 4 |
+
import numpy as np
|
| 5 |
+
import re
|
| 6 |
+
import argparse
|
| 7 |
+
from tqdm import tqdm
|
| 8 |
+
|
| 9 |
+
# Ensure project root is importable when running this script directly
|
| 10 |
+
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
| 11 |
+
from cli_utils import parse_count, format_count
|
| 12 |
+
|
| 13 |
+
parser = argparse.ArgumentParser(description='Create the multitask dataset based on the given parameters.')
|
| 14 |
+
parser.add_argument('--num_nodes', type=int, default=100, help='Number of nodes in the graph')
|
| 15 |
+
parser.add_argument('--num_train_dataset', type=parse_count, default='10M',
|
| 16 |
+
help='Number of training data entries to use (supports K/M/B, default: 50000)')
|
| 17 |
+
parser.add_argument('--num_test_dataset', type=parse_count, default=10000,
|
| 18 |
+
help='Number of test data entries to use (supports K/M/B, default: 10000)')
|
| 19 |
+
parser.add_argument('--tasks', type=str, default='H1',
|
| 20 |
+
help='Task specification (e.g., A1, A1B1, A3B2, A1D1F1). Default: A1')
|
| 21 |
+
parser.add_argument('--CL', action=argparse.BooleanOptionalAction, default=False,
|
| 22 |
+
help='Enable Task C label mode (append node labels after L/R turns) and add _CL_ in filenames')
|
| 23 |
+
parser.add_argument('--path_type', type=str, default='RWs', choices=['RWc', 'RWa', 'RWs'],
|
| 24 |
+
help='Path generation type: RWc (random walk with cycles), RWa (random walk acyclic, default), RWs (single source random walk).')
|
| 25 |
+
# Arguments for task tag handling
|
| 26 |
+
parser.add_argument('--no_task_tag', action='store_true', default=False,
|
| 27 |
+
help='Data files do not contain task identifiers (A, B, C, etc.). When enabled, task tokens will not be included in vocabulary and data parsing will skip task tags.')
|
| 28 |
+
parser.add_argument('--both', action='store_true', default=False,
|
| 29 |
+
help='Process both versions (with and without task tags). When set, --no_task_tag is ignored and two sets of bin files and meta files are produced.')
|
| 30 |
+
parser.add_argument('--num_labels', type=int, default=10,
|
| 31 |
+
help='Number of distinct node labels (default: 10). Must match the value used in data generation.')
|
| 32 |
+
parser.add_argument('--num_workers', type=int, default=1,
|
| 33 |
+
help='Number of parallel worker processes for encoding (default: 1 = serial). Uses fork; requires Linux/macOS.')
|
| 34 |
+
args = parser.parse_args()
|
| 35 |
+
|
| 36 |
+
num_nodes = args.num_nodes
|
| 37 |
+
tasks_str = args.tasks
|
| 38 |
+
tasks_tag_base = f"{tasks_str}_CL" if args.CL else tasks_str
|
| 39 |
+
# Add path type tag for filenames
|
| 40 |
+
path_type_tag = args.path_type
|
| 41 |
+
tasks_tag_base = f"{tasks_tag_base}_{path_type_tag}"
|
| 42 |
+
# Include num_labels in tag when non-default (match create_multitask_maze.py)
|
| 43 |
+
if args.num_labels != 10:
|
| 44 |
+
tasks_tag_base = f"{tasks_tag_base}_L{args.num_labels}"
|
| 45 |
+
|
| 46 |
+
train_label = format_count(args.num_train_dataset)
|
| 47 |
+
test_label = format_count(args.num_test_dataset)
|
| 48 |
+
num_labels = args.num_labels
|
| 49 |
+
|
| 50 |
+
def first_existing(paths):
|
| 51 |
+
for p in paths:
|
| 52 |
+
if os.path.exists(p):
|
| 53 |
+
return p
|
| 54 |
+
return paths[0]
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
def process_data_for_tag_mode(no_task_tag_mode, tasks_tag_suffix=""):
|
| 58 |
+
"""Process data for a specific task tag mode."""
|
| 59 |
+
# Construct tasks_tag for this mode
|
| 60 |
+
if no_task_tag_mode:
|
| 61 |
+
tasks_tag = f"{tasks_tag_base}_NT"
|
| 62 |
+
if tasks_tag_suffix:
|
| 63 |
+
tasks_tag = f"{tasks_tag}_{tasks_tag_suffix}"
|
| 64 |
+
else:
|
| 65 |
+
tasks_tag = tasks_tag_base
|
| 66 |
+
if tasks_tag_suffix:
|
| 67 |
+
tasks_tag = f"{tasks_tag}_{tasks_tag_suffix}"
|
| 68 |
+
|
| 69 |
+
# Find input files
|
| 70 |
+
train_file_path = first_existing([
|
| 71 |
+
os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/train_{tasks_tag}_{train_label}.txt'),
|
| 72 |
+
os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/train_{tasks_tag}_{args.num_train_dataset}.txt'),
|
| 73 |
+
os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/train_{tasks_str}_{train_label}.txt'),
|
| 74 |
+
os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/train_{tasks_str}_{args.num_train_dataset}.txt'),
|
| 75 |
+
])
|
| 76 |
+
val_file_path = first_existing([
|
| 77 |
+
os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/test_{tasks_tag}_{test_label}.txt'),
|
| 78 |
+
os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/test_{tasks_tag}_{args.num_test_dataset}.txt'),
|
| 79 |
+
os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/test_{tasks_str}_{test_label}.txt'),
|
| 80 |
+
os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/test_{tasks_str}_{args.num_test_dataset}.txt'),
|
| 81 |
+
])
|
| 82 |
+
|
| 83 |
+
print(f"\nProcessing mode: {'Without task tags' if no_task_tag_mode else 'With task tags'}")
|
| 84 |
+
print(f"Training file: {train_file_path}")
|
| 85 |
+
print(f"Test file: {val_file_path}")
|
| 86 |
+
|
| 87 |
+
with open(train_file_path, 'r') as f:
|
| 88 |
+
train_data = f.read()
|
| 89 |
+
print(f"length of train dataset in characters: {len(train_data):,}")
|
| 90 |
+
|
| 91 |
+
with open(val_file_path, 'r') as f:
|
| 92 |
+
val_data = f.read()
|
| 93 |
+
print(f"length of val dataset in characters: {len(val_data):,}")
|
| 94 |
+
|
| 95 |
+
all_data = train_data + val_data
|
| 96 |
+
|
| 97 |
+
chars = sorted(list(find_characters(all_data)))
|
| 98 |
+
direction_tokens = ['N', 'S', 'E', 'W', 'L', 'R', 'F', 'T']
|
| 99 |
+
# Only include task tokens if no_task_tag_mode is False
|
| 100 |
+
task_tokens = [] if no_task_tag_mode else ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I']
|
| 101 |
+
label_tokens = ([chr(ord('a') + i) for i in range(num_labels)] if num_labels <= 26
|
| 102 |
+
else [f'l{i}' for i in range(num_labels)])
|
| 103 |
+
label_tokens.append('/') # separator token for neighbor labels
|
| 104 |
+
special_tokens = [':']
|
| 105 |
+
# Adjust vocab_size calculation
|
| 106 |
+
vocab_size = num_nodes + 2 + len(direction_tokens) + len(task_tokens) + len(label_tokens) + len(special_tokens)
|
| 107 |
+
print("all the unique characters:", ' '.join(chars))
|
| 108 |
+
print(f"vocab size: {vocab_size:,}")
|
| 109 |
+
print(f"No task tag mode: {'Enabled' if no_task_tag_mode else 'Disabled'}")
|
| 110 |
+
|
| 111 |
+
stoi = {}
|
| 112 |
+
itos = {}
|
| 113 |
+
|
| 114 |
+
for i in range(num_nodes):
|
| 115 |
+
stoi[str(i)] = i + 2
|
| 116 |
+
itos[i + 2] = str(i)
|
| 117 |
+
|
| 118 |
+
base = 2 + num_nodes
|
| 119 |
+
for idx, tok in enumerate(direction_tokens):
|
| 120 |
+
stoi[tok] = base + idx
|
| 121 |
+
itos[base + idx] = tok
|
| 122 |
+
|
| 123 |
+
# Only add task tokens to vocabulary if no_task_tag_mode is False
|
| 124 |
+
if not no_task_tag_mode:
|
| 125 |
+
base = 2 + num_nodes + len(direction_tokens)
|
| 126 |
+
for idx, tok in enumerate(task_tokens):
|
| 127 |
+
stoi[tok] = base + idx
|
| 128 |
+
itos[base + idx] = tok
|
| 129 |
+
base = 2 + num_nodes + len(direction_tokens) + len(task_tokens)
|
| 130 |
+
else:
|
| 131 |
+
base = 2 + num_nodes + len(direction_tokens)
|
| 132 |
+
|
| 133 |
+
for idx, tok in enumerate(label_tokens):
|
| 134 |
+
stoi[tok] = base + idx
|
| 135 |
+
itos[base + idx] = tok
|
| 136 |
+
|
| 137 |
+
base = base + len(label_tokens)
|
| 138 |
+
for idx, tok in enumerate(special_tokens):
|
| 139 |
+
stoi[tok] = base + idx
|
| 140 |
+
itos[base + idx] = tok
|
| 141 |
+
|
| 142 |
+
stoi['[PAD]'] = 0
|
| 143 |
+
itos[0] = '[PAD]'
|
| 144 |
+
stoi['\n'] = 1
|
| 145 |
+
itos[1] = '\n'
|
| 146 |
+
|
| 147 |
+
def encode(s):
|
| 148 |
+
ss = s.split(" ")
|
| 149 |
+
return [stoi[ch] for ch in ss]
|
| 150 |
+
|
| 151 |
+
def decode(l):
|
| 152 |
+
return ' '.join(itos[i] for i in l)
|
| 153 |
+
|
| 154 |
+
# Calculate block_size with theoretical minimum
|
| 155 |
+
n = int(num_nodes ** 0.5) # grid size
|
| 156 |
+
if no_task_tag_mode:
|
| 157 |
+
theoretical_min_tokens = num_nodes + 3
|
| 158 |
+
else:
|
| 159 |
+
theoretical_min_tokens = num_nodes + 4
|
| 160 |
+
|
| 161 |
+
theoretical_min_block_size = (theoretical_min_tokens // 32 + 1) * 32
|
| 162 |
+
|
| 163 |
+
nw = args.num_workers
|
| 164 |
+
|
| 165 |
+
def get_block_size(s, desc="scan block size"):
|
| 166 |
+
split_text = s.split('\n')
|
| 167 |
+
if nw and nw > 1 and len(split_text) > 0:
|
| 168 |
+
import multiprocessing as mp
|
| 169 |
+
chunk_size = max(1, min(20000, len(split_text) // (nw * 50) or 1))
|
| 170 |
+
chunks = _chunk_list(split_text, chunk_size)
|
| 171 |
+
ctx = mp.get_context('fork')
|
| 172 |
+
bs = 0
|
| 173 |
+
with ctx.Pool(processes=nw) as pool:
|
| 174 |
+
with tqdm(total=len(split_text), desc=desc) as pbar:
|
| 175 |
+
for r in pool.imap_unordered(_prep_max_len_batch, chunks):
|
| 176 |
+
if r > bs:
|
| 177 |
+
bs = r
|
| 178 |
+
pbar.update(chunk_size if pbar.n + chunk_size <= len(split_text)
|
| 179 |
+
else len(split_text) - pbar.n)
|
| 180 |
+
return bs
|
| 181 |
+
# Serial
|
| 182 |
+
bs = 0
|
| 183 |
+
for st in tqdm(split_text, desc=desc):
|
| 184 |
+
if st != "":
|
| 185 |
+
enc_str = encode(st) + [1]
|
| 186 |
+
bs = max(bs, len(enc_str))
|
| 187 |
+
return bs
|
| 188 |
+
|
| 189 |
+
data_block_size = (max(get_block_size(train_data, desc="scan train block size"),
|
| 190 |
+
get_block_size(val_data, desc="scan val block size")) // 32 + 1) * 32
|
| 191 |
+
block_size = max(theoretical_min_block_size, data_block_size)
|
| 192 |
+
print(
|
| 193 |
+
f"the block size is {block_size} (theoretical min: {theoretical_min_block_size}, data-based: {data_block_size})")
|
| 194 |
+
|
| 195 |
+
def process_reasoning(s, desc="encode"):
|
| 196 |
+
split_text = s.split('\n')
|
| 197 |
+
if nw and nw > 1 and len(split_text) > 0:
|
| 198 |
+
import multiprocessing as mp
|
| 199 |
+
chunk_size = max(1, min(10000, len(split_text) // (nw * 100) or 1))
|
| 200 |
+
chunks = _chunk_list(split_text, chunk_size)
|
| 201 |
+
ctx = mp.get_context('fork')
|
| 202 |
+
ret = []
|
| 203 |
+
with ctx.Pool(processes=nw,
|
| 204 |
+
initializer=_prep_worker_init,
|
| 205 |
+
initargs=(stoi, block_size)) as pool:
|
| 206 |
+
with tqdm(total=len(split_text), desc=desc) as pbar:
|
| 207 |
+
# Use imap (ordered) to preserve original line order in output.
|
| 208 |
+
for i, r in enumerate(pool.imap(_prep_encode_batch, chunks)):
|
| 209 |
+
ret.extend(r)
|
| 210 |
+
step = len(chunks[i])
|
| 211 |
+
pbar.update(step)
|
| 212 |
+
return ret
|
| 213 |
+
# Serial
|
| 214 |
+
ret = []
|
| 215 |
+
for st in tqdm(split_text, desc=desc):
|
| 216 |
+
if st != "":
|
| 217 |
+
enc_str = encode(st) + [1]
|
| 218 |
+
ret += enc_str + [0] * (block_size + 1 - len(enc_str))
|
| 219 |
+
return ret
|
| 220 |
+
|
| 221 |
+
train_ids = process_reasoning(train_data, desc="encode train")
|
| 222 |
+
val_ids = process_reasoning(val_data, desc="encode val")
|
| 223 |
+
|
| 224 |
+
print(f"train has {len(train_ids):,} tokens")
|
| 225 |
+
print(f"val has {len(val_ids):,} tokens")
|
| 226 |
+
|
| 227 |
+
train_ids = np.array(train_ids, dtype=np.uint16)
|
| 228 |
+
val_ids = np.array(val_ids, dtype=np.uint16)
|
| 229 |
+
|
| 230 |
+
# Save bin files with appropriate tag
|
| 231 |
+
train_ids.tofile(os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/train_{tasks_tag}_{train_label}.bin'))
|
| 232 |
+
val_ids.tofile(os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/val_{tasks_tag}_{test_label}.bin'))
|
| 233 |
+
|
| 234 |
+
unreachable = 'x' in chars
|
| 235 |
+
simple_format = ':' not in chars
|
| 236 |
+
|
| 237 |
+
meta = {
|
| 238 |
+
'unreachable': unreachable,
|
| 239 |
+
'simple_format': simple_format,
|
| 240 |
+
'block_size': block_size,
|
| 241 |
+
'vocab_size': vocab_size,
|
| 242 |
+
'itos': itos,
|
| 243 |
+
'stoi': stoi,
|
| 244 |
+
'no_task_tag': no_task_tag_mode,
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
print(stoi)
|
| 248 |
+
print(itos)
|
| 249 |
+
with open(os.path.join(os.path.dirname(__file__), f'{args.num_nodes}/meta_{tasks_tag}.pkl'), 'wb') as f:
|
| 250 |
+
pickle.dump(meta, f)
|
| 251 |
+
|
| 252 |
+
print(f"Saved files with tag: {tasks_tag}")
|
| 253 |
+
return tasks_tag
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
def find_characters(data_string):
|
| 257 |
+
pattern = r'\d+|\D'
|
| 258 |
+
matches = re.findall(pattern, data_string)
|
| 259 |
+
return set(matches)
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
# ---- Parallel worker helpers (must be at module scope for pickling) ----
|
| 263 |
+
_W_STOI = None
|
| 264 |
+
_W_BLOCK_SIZE = None
|
| 265 |
+
|
| 266 |
+
|
| 267 |
+
def _prep_worker_init(stoi_arg, block_size_arg):
|
| 268 |
+
global _W_STOI, _W_BLOCK_SIZE
|
| 269 |
+
_W_STOI = stoi_arg
|
| 270 |
+
_W_BLOCK_SIZE = block_size_arg
|
| 271 |
+
|
| 272 |
+
|
| 273 |
+
def _prep_max_len_batch(lines):
|
| 274 |
+
"""Return the max encoded length (tokens + EOL) over a batch of lines."""
|
| 275 |
+
bs = 0
|
| 276 |
+
for st in lines:
|
| 277 |
+
if st == "":
|
| 278 |
+
continue
|
| 279 |
+
# encoded length = number of space-separated tokens + 1 (EOL token)
|
| 280 |
+
L = st.count(" ") + 2
|
| 281 |
+
if L > bs:
|
| 282 |
+
bs = L
|
| 283 |
+
return bs
|
| 284 |
+
|
| 285 |
+
|
| 286 |
+
def _prep_encode_batch(lines):
|
| 287 |
+
"""Encode + pad a batch of lines; returns a flat list of token IDs."""
|
| 288 |
+
stoi = _W_STOI
|
| 289 |
+
bs1 = _W_BLOCK_SIZE + 1
|
| 290 |
+
out = []
|
| 291 |
+
for st in lines:
|
| 292 |
+
if st == "":
|
| 293 |
+
continue
|
| 294 |
+
enc = [stoi[ch] for ch in st.split(" ")]
|
| 295 |
+
enc.append(1)
|
| 296 |
+
out.extend(enc)
|
| 297 |
+
out.extend([0] * (bs1 - len(enc)))
|
| 298 |
+
return out
|
| 299 |
+
|
| 300 |
+
|
| 301 |
+
def _chunk_list(lst, chunk_size):
|
| 302 |
+
return [lst[i:i + chunk_size] for i in range(0, len(lst), chunk_size)]
|
| 303 |
+
|
| 304 |
+
|
| 305 |
+
# Main execution
|
| 306 |
+
if args.both:
|
| 307 |
+
# Process both versions
|
| 308 |
+
print("=" * 60)
|
| 309 |
+
print("Generating both with-tag and without-tag versions")
|
| 310 |
+
print("=" * 60)
|
| 311 |
+
|
| 312 |
+
# Process with task tags
|
| 313 |
+
process_data_for_tag_mode(no_task_tag_mode=False)
|
| 314 |
+
|
| 315 |
+
# Process without task tags
|
| 316 |
+
process_data_for_tag_mode(no_task_tag_mode=True)
|
| 317 |
+
|
| 318 |
+
print("=" * 60)
|
| 319 |
+
print("Successfully generated both with-tag and without-tag datasets.")
|
| 320 |
+
print("=" * 60)
|
| 321 |
+
else:
|
| 322 |
+
# Original logic: generate only one version based on no_task_tag
|
| 323 |
+
process_data_for_tag_mode(no_task_tag_mode=args.no_task_tag)
|