-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorkingSectionCells.wl
More file actions
152 lines (152 loc) · 9.96 KB
/
Copy pathWorkingSectionCells.wl
File metadata and controls
152 lines (152 loc) · 9.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{Cell["Working", "Section", CellChangeTimes -> {{3.867519349749642*^9,
3.867519350413958*^9}}],
Cell[BoxData[{RowBox[{RowBox[{"exampleNumber", " ", "=", " ", "1"}], ";"}],
"\[IndentingNewLine]",
RowBox[{RowBox[{"testOrTrain", " ", "=", " ", "\"Train\""}], ";"}],
"\[IndentingNewLine]",
RowBox[{RowBox[{"ARCParseFile", "[", RowBox[{"NotebookTitle", "[", "]"}],
"]"}], "[", RowBox[{"testOrTrain", ",", " ", "exampleNumber"}],
"]"}]}], "Input", CellChangeTimes -> {{3.867519497621081*^9,
3.867519511820201*^9}, 3.867674706956316*^9, 3.8677339318363914*^9,
{3.8677339637607727*^9, 3.867733992531841*^9}, {3.8677457849002385*^9,
3.8677457853691053*^9}, {3.867747754076576*^9, 3.8677477543235445*^9},
{3.8677480069863987*^9, 3.8677480346613836*^9}, 3.867762302028398*^9,
3.868620065373048*^9, {3.8686202481947055*^9, 3.8686202496953497*^9}},
CellLabel -> "In[457]:="], Cell["ARCParseScene", "Subsection",
CellChangeTimes -> {3.867499893424856*^9, 3.8675193866888447*^9}],
Cell[BoxData[{RowBox[{RowBox[{"ReloadARC", "[", "]"}], ";"}], "\n",
RowBox[{RowBox[{"examples", " ", "=", "\n", "\t",
RowBox[{"PrintIfFailure", "@", "\n", "\t",
RowBox[{"ARCParseInputAndOutputScenes", "[", "\n", "\t\t",
RowBox[{RowBox[{"ARCParseFile", "[", RowBox[{"NotebookTitle",
"[", "]"}], "]"}], "[", "testOrTrain", "]"}], "\n", "\t",
"]"}]}]}], ";"}]}], "Code", InitializationCell -> False,
CellChangeTimes -> {{3.8686145799004707*^9, 3.8686145883203464*^9},
{3.868620258739705*^9, 3.868620261231928*^9}, {3.8711364278274593*^9,
3.8711364466796813*^9}, {3.871136527247317*^9, 3.8711365304982224*^9},
3.8717270500575724*^9}, CellLabel -> "In[3511]:="],
Cell["Input", "Subsubsection", CellChangeTimes -> {{3.867145257739711*^9,
3.8671452581732497*^9}}],
Cell[BoxData[{RowBox[{RowBox[{"ReloadARC", "[", "]"}], ";"}], "\n",
RowBox[{RowBox[{RowBox[{"NotTest", "[", "\n", "\t",
RowBox[{"examples", "[", RowBox[{"[", RowBox[{"exampleNumber", ",",
" ", "\"Input\""}], "]"}], "]"}], "\n", "]"}], " ", "//",
" ", "SimplifyObjects"}], " ", "//", " ", "ARCIndent"}]}], "Code",
InitializationCell -> False, CellChangeTimes ->
{{3.867076299388187*^9, 3.867076346490074*^9}, {3.8671452459283576*^9,
3.8671452543016953*^9}, {3.867157700921037*^9, 3.867157710433417*^9},
{3.867157744140197*^9, 3.8671577461677465*^9}, {3.867157804375162*^9,
3.8671578076003504*^9}, {3.8671777339807296*^9, 3.8671777616297455*^9},
3.867499910858156*^9, {3.867499952658697*^9, 3.867499958192867*^9},
{3.867519514532605*^9, 3.8675195150336833*^9}, {3.8677339818550158*^9,
3.867733995033487*^9}, {3.8677607374236193*^9, 3.8677607410795536*^9},
{3.86776404228843*^9, 3.8677640425192657*^9}, {3.86861465186635*^9,
3.86861468605257*^9}}, CellLabel -> "In[812]:="],
Cell["Output", "Subsubsection", CellChangeTimes -> {{3.8671452618770494*^9,
3.86714526226766*^9}}],
Cell[BoxData[{RowBox[{RowBox[{"ReloadARC", "[", "]"}], ";"}], "\n",
RowBox[{RowBox[{RowBox[{"NotTest", "[", "\n", "\t",
RowBox[{"examples", "[", RowBox[{"[", RowBox[{"exampleNumber", ",",
" ", "\"Output\""}], "]"}], "]"}], "\n", "]"}], " ", "//",
" ", "SimplifyObjects"}], " ", "//", " ", "ARCIndent"}]}], "Code",
InitializationCell -> False, CellChangeTimes ->
{{3.867076299388187*^9, 3.867076346490074*^9}, {3.8671452459283576*^9,
3.8671452543016953*^9}, {3.867157700921037*^9, 3.867157710433417*^9},
{3.867157744140197*^9, 3.8671577461677465*^9}, {3.867157804375162*^9,
3.8671578076003504*^9}, {3.8671777339807296*^9, 3.867177781760176*^9},
{3.867499946946102*^9, 3.867499962627163*^9}, 3.8677340009017677*^9,
{3.8677607496632967*^9, 3.867760750334979*^9}, {3.8686146963583994*^9,
3.8686146988241053*^9}}, CellLabel -> "In[814]:="],
Cell["ARCFindObjectMapping", "Subsection", CellChangeTimes ->
{{3.867519467068768*^9, 3.867519473396726*^9}}],
Cell[BoxData[{RowBox[{RowBox[{"ReloadARC", "[", "]"}], ";"}], "\n",
RowBox[{RowBox[{RowBox[{"NotTest", "@", "\n",
RowBox[{"ARCFindObjectMapping", "[", RowBox[
{RowBox[{"ARCParseFile", "[", RowBox[{"NotebookTitle", "[",
"]"}], "]"}], "[", RowBox[{"testOrTrain", ",", " ",
"exampleNumber"}], "]"}], "]"}]}], " ", "//", " ",
"SimplifyObjects"}], " ", "//", " ", "ARCIndent"}]}], "Code",
CellGroupingRules -> {"GroupTogetherGrouping", 10000.},
InitializationCell -> False, CellChangeTimes ->
{{3.8672598423552666*^9, 3.867259867122636*^9}, 3.867261431409814*^9,
{3.867261583962587*^9, 3.867261649684951*^9}, {3.867262070225693*^9,
3.8672620711621156*^9}, {3.8672635225613413*^9, 3.8672635253912416*^9},
{3.867514908834999*^9, 3.8675149326899214*^9}, {3.8675194756339903*^9,
3.867519477351889*^9}, {3.8677460558535204*^9, 3.8677460802301145*^9},
{3.8677477831478424*^9, 3.8677477883132935*^9}, {3.8677495896845307*^9,
3.8677495982364063*^9}, 3.8677642034754534*^9, 3.8686201536211767*^9},
CellLabel -> "In[799]:=", CellID -> 307614476,
"TestId" -> "ARCFindObjectMapping-20220719-VNTDSS"],
Cell["ARCFindRules", "Subsection", CellChangeTimes ->
{{3.8675282370309095*^9, 3.867528240854987*^9}}],
Cell[BoxData[{RowBox[{RowBox[{"ReloadARC", "[", "]"}], ";"}], "\n",
RowBox[{RowBox[{"rules", " ", "=", " ", RowBox[{"ARCFindRules", "[",
RowBox[{RowBox[{RowBox[{"ARCParseFile", "[", RowBox[
{"NotebookTitle", "[", "]"}], "]"}], "[", "\"Train\"",
"]"}], ",", " ", RowBox[{"\"FormMultiColorCompositeObjects\"",
" ", "->", " ", "True"}], ",", " ",
RowBox[{"\"SettleForOneExamplePerRule\"", " ", "->", " ",
"False"}]}], "]"}]}], ";"}], "\n",
RowBox[{RowBox[{"rules", " ", "//", " ", "ARCSimplifyRules"}], " ", "//",
" ", "ARCIndent"}]}], "Code", CellGroupingRules ->
{"GroupTogetherGrouping", 10000.}, InitializationCell -> False,
CellChangeTimes -> {{3.8672650969189262*^9, 3.8672651018792725*^9},
3.8672660337861757*^9, {3.8672693454360647*^9, 3.867269349514227*^9},
{3.867269462939049*^9, 3.867269479260501*^9}, {3.8672695183848095*^9,
3.867269520851403*^9}, {3.8675282613384356*^9, 3.8675282748890247*^9},
{3.8676760515971823*^9, 3.8676760531310525*^9}, {3.867680551925644*^9,
3.867680552033392*^9}, {3.86774780398728*^9, 3.867747805241807*^9},
3.8677496224220695*^9, {3.8686132734463053*^9, 3.8686132735930004*^9},
{3.8686148157532115*^9, 3.868614816959149*^9}, {3.8686148897901373*^9,
3.8686148925815773*^9}, 3.8686200981014247*^9, 3.868620136008848*^9,
{3.869935514001299*^9, 3.869935515543724*^9}, {3.870646475521948*^9,
3.8706464959899673*^9}}, CellID -> 152869929, "TestId" -> ""],
Cell["ARCTry", "Subsection", CellChangeTimes -> {{3.8676953161549067*^9,
3.867695317202914*^9}}],
Cell[BoxData[{RowBox[{RowBox[{"ReloadARC", "[", "]"}], ";"}], "\n",
RowBox[{"ARCApplyRules", "[",
RowBox[{RowBox[{RowBox[{RowBox[{"ARCParseFile", "[",
RowBox[{"NotebookTitle", "[", "]"}], "]"}], "[", "\"Train\"",
"]"}], "[", RowBox[{"[", RowBox[{"1", ",", " ", "\"Input\""}],
"]"}], "]"}], ",", " ", "rules"}], "]"}]}], "Code",
CellGroupingRules -> {"GroupTogetherGrouping", 10000.},
InitializationCell -> False, CellChangeTimes ->
{{3.8672650969189262*^9, 3.8672651018792725*^9}, 3.8672660337861757*^9,
{3.8672693454360647*^9, 3.867269349514227*^9}, {3.867269462939049*^9,
3.867269479260501*^9}, {3.8672695183848095*^9, 3.867269520851403*^9},
{3.8675282613384356*^9, 3.8675282748890247*^9}, {3.8676760515971823*^9,
3.8676760531310525*^9}, {3.867680551925644*^9, 3.867680552033392*^9},
{3.86774780398728*^9, 3.867747805241807*^9}, 3.8677496224220695*^9,
{3.8686132734463053*^9, 3.8686132735930004*^9}, {3.8686148157532115*^9,
3.868614816959149*^9}, {3.8686148897901373*^9, 3.8686148925815773*^9},
3.8686200981014247*^9, 3.868620136008848*^9, {3.869935514001299*^9,
3.869935515543724*^9}, {3.8706175884287686*^9, 3.8706176070833783*^9},
3.8706225880541253*^9}, CellLabel -> "In[100]:=", CellID -> 70510094,
"TestId" -> ""],
Cell[BoxData[{RowBox[{RowBox[{"ReloadARC", "[", "]"}], ";"}], "\n",
RowBox[{RowBox[{"ARCTry", "[", RowBox[
{RowBox[{"NotebookTitle", "[", "]"}], ",", " ", "\"Train\"", ",",
" ", "exampleNumber"}], "]"}], " ", "//", " ", "ARCIndent"}]}],
"Code", InitializationCell -> False, CellChangeTimes ->
{{3.867695379205022*^9, 3.8676953890447073*^9}, {3.867695579031397*^9,
3.8676955807954597*^9}, {3.8676958637801404*^9, 3.86769586391789*^9},
{3.8677396058455563*^9, 3.8677396062255106*^9}, 3.867747437553196*^9,
3.868620145817664*^9, {3.870384641823555*^9, 3.8703846420182204*^9},
{3.8705323426433916*^9, 3.8705323450780263*^9}}],
Cell[BoxData[{RowBox[{RowBox[{"ReloadARC", "[", "]"}], ";"}], "\n",
RowBox[{RowBox[{"ARCTry", "[", RowBox[
{RowBox[{"NotebookTitle", "[", "]"}], ",", " ", "\"Test\"", ",",
" ", "1"}], "]"}], " ", "//", " ", "ARCIndent"}]}], "Code",
InitializationCell -> False, CellChangeTimes ->
{{3.867695379205022*^9, 3.8676953890447073*^9}, {3.867695579031397*^9,
3.8676955807954597*^9}, {3.8676958637801404*^9, 3.86769586391789*^9},
{3.8677396058455563*^9, 3.8677396062255106*^9}, {3.867740034816397*^9,
3.8677400358911533*^9}, 3.8688027873468957*^9}, CellLabel -> ""],
Cell["ARCTest", "Subsection", CellChangeTimes -> {{3.867695242467721*^9,
3.867695243355626*^9}}],
Cell[BoxData[{RowBox[{RowBox[{"ReloadARC", "[", "]"}], ";"}], "\n",
RowBox[{RowBox[{"ARCTest", "[", RowBox[{"NotebookTitle", "[", "]"}],
"]"}], " ", "//", " ", "Indent3"}]}], "Code",
InitializationCell -> False, CellChangeTimes ->
{{3.8676952495968037*^9, 3.867695260297852*^9}, {3.868618688793891*^9,
3.8686187304126787*^9}, 3.8686201487837057*^9}, CellLabel -> "In[108]:="]}