Datasets:
Delete folder maze with huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- maze/.DS_Store +0 -0
- maze/task1/.DS_Store +0 -0
- maze/task1/eval.py +0 -72
- maze/task1/example/.DS_Store +0 -0
- maze/task1/example/level3/.DS_Store +0 -0
- maze/task1/example/level3/answer/0.txt +0 -1
- maze/task1/example/level3/answer/1.txt +0 -1
- maze/task1/example/level3/answer/2.txt +0 -1
- maze/task1/example/level3/answer/3.txt +0 -1
- maze/task1/example/level3/answer/4.txt +0 -1
- maze/task1/example/level3/answer/5.txt +0 -1
- maze/task1/example/level3/answer/6.txt +0 -1
- maze/task1/example/level3/answer/7.txt +0 -1
- maze/task1/example/level3/img/0.png +0 -3
- maze/task1/example/level3/img/1.png +0 -3
- maze/task1/example/level3/img/2.png +0 -3
- maze/task1/example/level3/img/3.png +0 -3
- maze/task1/example/level3/img/4.png +0 -3
- maze/task1/example/level3/img/5.png +0 -3
- maze/task1/example/level3/img/6.png +0 -3
- maze/task1/example/level3/img/7.png +0 -3
- maze/task1/example/level3/pure_text/0.txt +0 -4
- maze/task1/example/level3/pure_text/1.txt +0 -4
- maze/task1/example/level3/pure_text/2.txt +0 -4
- maze/task1/example/level3/pure_text/3.txt +0 -4
- maze/task1/example/level3/pure_text/4.txt +0 -4
- maze/task1/example/level3/pure_text/5.txt +0 -4
- maze/task1/example/level3/pure_text/6.txt +0 -4
- maze/task1/example/level3/pure_text/7.txt +0 -4
- maze/task1/example/level3/question/0.txt +0 -1
- maze/task1/example/level3/question/1.txt +0 -1
- maze/task1/example/level3/question/2.txt +0 -1
- maze/task1/example/level3/question/3.txt +0 -1
- maze/task1/example/level3/question/4.txt +0 -1
- maze/task1/example/level3/question/5.txt +0 -1
- maze/task1/example/level3/question/6.txt +0 -1
- maze/task1/example/level3/question/7.txt +0 -1
- maze/task1/example/level3/table/0.txt +0 -4
- maze/task1/example/level3/table/1.txt +0 -4
- maze/task1/example/level3/table/2.txt +0 -4
- maze/task1/example/level3/table/3.txt +0 -4
- maze/task1/example/level3/table/4.txt +0 -4
- maze/task1/example/level3/table/5.txt +0 -4
- maze/task1/example/level3/table/6.txt +0 -4
- maze/task1/example/level3/table/7.txt +0 -4
- maze/task1/example/level4/answer/0.txt +0 -1
- maze/task1/example/level4/answer/1.txt +0 -1
- maze/task1/example/level4/answer/2.txt +0 -1
- maze/task1/example/level4/answer/3.txt +0 -1
- maze/task1/example/level4/answer/4.txt +0 -1
maze/.DS_Store
DELETED
Binary file (8.2 kB)
|
|
maze/task1/.DS_Store
DELETED
Binary file (6.15 kB)
|
|
maze/task1/eval.py
DELETED
@@ -1,72 +0,0 @@
|
|
1 |
-
# read a map, receive a solution, determine if the solution reaches the goal
|
2 |
-
|
3 |
-
import gym
|
4 |
-
from gym.envs.toy_text.frozen_lake import generate_random_map
|
5 |
-
import random
|
6 |
-
import os
|
7 |
-
import numpy as np
|
8 |
-
# from PIL import Image
|
9 |
-
|
10 |
-
levels = [3,4,5,6,7,8]
|
11 |
-
for level in levels:
|
12 |
-
count = 0
|
13 |
-
correct = 0
|
14 |
-
invalid = 0
|
15 |
-
|
16 |
-
yes_c = 0
|
17 |
-
yes_w = 0
|
18 |
-
|
19 |
-
gt_answer_dir = "maps/level%d/answer/"%(level)
|
20 |
-
check_answer_dir = "output/output_pure_text/level%d/"%(level)
|
21 |
-
|
22 |
-
# import ipdb; ipdb.set_trace()
|
23 |
-
for test_id in range(100):
|
24 |
-
try:
|
25 |
-
# parse answer from the output
|
26 |
-
output_path = check_answer_dir + "%d.txt"%(test_id)
|
27 |
-
with open(output_path, "r") as f:
|
28 |
-
contents = f.read()
|
29 |
-
answer_index = contents.find("<Output>")
|
30 |
-
answer = contents[answer_index+len("<Output>"):]
|
31 |
-
# if answer_index == -1:
|
32 |
-
# answer_index = contents.find("Answer:")
|
33 |
-
# answer = contents[answer_index+len("Answer:"):]
|
34 |
-
answer = answer.replace('"', '')
|
35 |
-
answer = answer.replace("'", '')
|
36 |
-
answer = answer.replace("\n", '')
|
37 |
-
answer = answer.replace(".", '')
|
38 |
-
answer = answer.replace("(", '')
|
39 |
-
answer = answer.replace(")", '')
|
40 |
-
answer = answer.lstrip()
|
41 |
-
answer = answer.rstrip()
|
42 |
-
answer = answer.lower()
|
43 |
-
# import ipdb; ipdb.set_trace()
|
44 |
-
assert answer in ['yes', 'no']
|
45 |
-
# import ipdb; ipdb.set_trace()
|
46 |
-
# parse GT from recorded file
|
47 |
-
gt_path = gt_answer_dir + "%d.txt"%(test_id)
|
48 |
-
with open(gt_path, "r") as f:
|
49 |
-
gt = f.read()
|
50 |
-
key_dict = {'Y': 'yes', 'N': 'no'}
|
51 |
-
gt = key_dict[gt]
|
52 |
-
if answer == gt:
|
53 |
-
correct += 1
|
54 |
-
if answer == 'yes':
|
55 |
-
yes_c += 1
|
56 |
-
else:
|
57 |
-
if answer == 'yes':
|
58 |
-
yes_w += 1
|
59 |
-
count += 1
|
60 |
-
# print(answer)
|
61 |
-
except:
|
62 |
-
# import ipdb; ipdb.set_trace()
|
63 |
-
invalid += 1
|
64 |
-
count += 1
|
65 |
-
pass
|
66 |
-
|
67 |
-
# print(yes_c)
|
68 |
-
# print(yes_w)
|
69 |
-
print("=====Curr Level: %d======"%(level))
|
70 |
-
print("Total tested: %d"%(count))
|
71 |
-
print("Total correct: %d"%(correct))
|
72 |
-
print("Total invalid: %d"%(invalid))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
maze/task1/example/.DS_Store
DELETED
Binary file (6.15 kB)
|
|
maze/task1/example/level3/.DS_Store
DELETED
Binary file (6.15 kB)
|
|
maze/task1/example/level3/answer/0.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<Output> Yes
|
|
|
|
maze/task1/example/level3/answer/1.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<Output> No
|
|
|
|
maze/task1/example/level3/answer/2.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<Output> Yes
|
|
|
|
maze/task1/example/level3/answer/3.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<Output> No
|
|
|
|
maze/task1/example/level3/answer/4.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<Output> No
|
|
|
|
maze/task1/example/level3/answer/5.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<Output> Yes
|
|
|
|
maze/task1/example/level3/answer/6.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<Output> Yes
|
|
|
|
maze/task1/example/level3/answer/7.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<Output> Yes
|
|
|
|
maze/task1/example/level3/img/0.png
DELETED
Git LFS Details
|
maze/task1/example/level3/img/1.png
DELETED
Git LFS Details
|
maze/task1/example/level3/img/2.png
DELETED
Git LFS Details
|
maze/task1/example/level3/img/3.png
DELETED
Git LFS Details
|
maze/task1/example/level3/img/4.png
DELETED
Git LFS Details
|
maze/task1/example/level3/img/5.png
DELETED
Git LFS Details
|
maze/task1/example/level3/img/6.png
DELETED
Git LFS Details
|
maze/task1/example/level3/img/7.png
DELETED
Git LFS Details
|
maze/task1/example/level3/pure_text/0.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
This is a 3x3 map.
|
2 |
-
The player is at: row 1, column 1;
|
3 |
-
The hole(s) are at: Row 2, Column 1; Row 2, Column 2; Row 3, Column 1; Row 3, Column 2; Row 3, Column 3;
|
4 |
-
The goal is at: Row 1, Column 2.
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/pure_text/1.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
This is a 3x3 map.
|
2 |
-
The player is at: row 1, column 3;
|
3 |
-
The hole(s) are at: Row 1, Column 1; Row 2, Column 1; Row 2, Column 2; Row 3, Column 2; Row 3, Column 3;
|
4 |
-
The goal is at: Row 3, Column 1.
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/pure_text/2.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
This is a 3x3 map.
|
2 |
-
The player is at: row 1, column 1;
|
3 |
-
The hole(s) are at: Row 1, Column 2; Row 1, Column 3; Row 2, Column 1; Row 2, Column 2; Row 2, Column 3;
|
4 |
-
The goal is at: Row 3, Column 1.
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/pure_text/3.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
This is a 3x3 map.
|
2 |
-
The player is at: row 1, column 2;
|
3 |
-
The hole(s) are at: Row 1, Column 3; Row 2, Column 1; Row 2, Column 3; Row 3, Column 1; Row 3, Column 2;
|
4 |
-
The goal is at: Row 3, Column 3.
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/pure_text/4.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
This is a 3x3 map.
|
2 |
-
The player is at: row 2, column 2;
|
3 |
-
The hole(s) are at: Row 1, Column 2; Row 1, Column 3; Row 2, Column 1; Row 2, Column 3; Row 3, Column 3;
|
4 |
-
The goal is at: Row 1, Column 1.
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/pure_text/5.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
This is a 3x3 map.
|
2 |
-
The player is at: row 2, column 3;
|
3 |
-
The hole(s) are at: Row 1, Column 1; Row 2, Column 1; Row 2, Column 2; Row 3, Column 2; Row 3, Column 3;
|
4 |
-
The goal is at: Row 1, Column 3.
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/pure_text/6.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
This is a 3x3 map.
|
2 |
-
The player is at: row 2, column 1;
|
3 |
-
The hole(s) are at: Row 1, Column 3; Row 2, Column 2; Row 2, Column 3; Row 3, Column 1; Row 3, Column 2;
|
4 |
-
The goal is at: Row 3, Column 3.
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/pure_text/7.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
This is a 3x3 map.
|
2 |
-
The player is at: row 2, column 2;
|
3 |
-
The hole(s) are at: Row 1, Column 2; Row 1, Column 3; Row 3, Column 1; Row 3, Column 2; Row 3, Column 3;
|
4 |
-
The goal is at: Row 2, Column 3.
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/question/0.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
Is there a hole in row 3, column 1?
|
|
|
|
maze/task1/example/level3/question/1.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
Is there a hole in row 1, column 3?
|
|
|
|
maze/task1/example/level3/question/2.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
Is there a hole in row 2, column 1?
|
|
|
|
maze/task1/example/level3/question/3.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
Is there a hole in row 1, column 1?
|
|
|
|
maze/task1/example/level3/question/4.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
Is there a hole in row 3, column 1?
|
|
|
|
maze/task1/example/level3/question/5.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
Is there a hole in row 3, column 3?
|
|
|
|
maze/task1/example/level3/question/6.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
Is there a hole in row 3, column 1?
|
|
|
|
maze/task1/example/level3/question/7.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
Is there a hole in row 3, column 2?
|
|
|
|
maze/task1/example/level3/table/0.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
| | Col 1 | Col 2 | Col 3 |
|
2 |
-
| Row 1 | @ | * | _ |
|
3 |
-
| Row 2 | # | # | _ |
|
4 |
-
| Row 3 | # | # | # |
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/table/1.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
| | Col 1 | Col 2 | Col 3 |
|
2 |
-
| Row 1 | # | _ | @ |
|
3 |
-
| Row 2 | # | # | _ |
|
4 |
-
| Row 3 | * | # | # |
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/table/2.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
| | Col 1 | Col 2 | Col 3 |
|
2 |
-
| Row 1 | @ | # | # |
|
3 |
-
| Row 2 | # | # | # |
|
4 |
-
| Row 3 | * | _ | _ |
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/table/3.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
| | Col 1 | Col 2 | Col 3 |
|
2 |
-
| Row 1 | _ | @ | # |
|
3 |
-
| Row 2 | # | _ | # |
|
4 |
-
| Row 3 | # | # | * |
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/table/4.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
| | Col 1 | Col 2 | Col 3 |
|
2 |
-
| Row 1 | * | # | # |
|
3 |
-
| Row 2 | # | @ | # |
|
4 |
-
| Row 3 | _ | _ | # |
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/table/5.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
| | Col 1 | Col 2 | Col 3 |
|
2 |
-
| Row 1 | # | _ | * |
|
3 |
-
| Row 2 | # | # | @ |
|
4 |
-
| Row 3 | _ | # | # |
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/table/6.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
| | Col 1 | Col 2 | Col 3 |
|
2 |
-
| Row 1 | _ | _ | # |
|
3 |
-
| Row 2 | @ | # | # |
|
4 |
-
| Row 3 | # | # | * |
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level3/table/7.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
| | Col 1 | Col 2 | Col 3 |
|
2 |
-
| Row 1 | _ | # | # |
|
3 |
-
| Row 2 | _ | @ | * |
|
4 |
-
| Row 3 | # | # | # |
|
|
|
|
|
|
|
|
|
|
maze/task1/example/level4/answer/0.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<Output> Yes
|
|
|
|
maze/task1/example/level4/answer/1.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<Output> No
|
|
|
|
maze/task1/example/level4/answer/2.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<Output> No
|
|
|
|
maze/task1/example/level4/answer/3.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<Output> No
|
|
|
|
maze/task1/example/level4/answer/4.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<Output> Yes
|
|
|
|