forked from MasterMilkX/KekeCompetition
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
229 lines (201 loc) · 5.9 KB
/
index.html
File metadata and controls
229 lines (201 loc) · 5.9 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<!DOCTYPE html>
<html lang="en">
<head>
<title>Level List - Keke Competition (offline)</title>
<meta charset="utf-8">
<!-- bootstrap stuff -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<!-- main stylesheet -->
<link rel="stylesheet" href="layout_style.css">
<!-- extra styles -->
<style>
body{
background-color: #150E16;
color:white;
font-family: monospace;
}
button{
color:black;
}
select{
font-size:0.75em;
margin-top:0.25em;
}
/* Left hand stats table */
.stat-table{
border-style:double;
border-width: 5px;
border-color:white;
font-size: 0.95em;
}
.stat-table .col-xs-8{
border:1px solid white;
}
.stat-table .col-xs-4{
border:1px solid white;
}
/* Central level selection table */
#level-table{
border:4px solid white;
font-size:1em;
margin:1em;
}
#level-table .row{
border:1px solid white;
padding:0.3em;
}
#level-table .header{
border-bottom: 5px solid white;
font-size:1.1em;
font-weight: bold;
background-color: #fff;
color:#000;
}
.guiCol{
text-align: center;
}
.guiBtn{
}
#level-table button{
font-size:0.75em;
}
.solvedLevel{
background-color: #00EE0088;
}
.unsolvedLevel{
background-color: #EE000088;
}
.pendingLevel{
background-color: #CACACA88;
}
/* Right hand level set and agent selection */
#levelSetSelection, #agentSelection{
font-size:1.4em;
}
#levelSetList, #agentList{
color:black;
padding:5px;
font-size:0.75em;
margin-top:0.25em
}
.loadBtn{
padding:0.5em;
font-size:1.2em;
}
.runBtn{
background-color:#22F5FC;
}
.pauseBtn{
background-color:#FAD90C;
}
#resetDataBtn{
background-color:#dd000088;
padding:0.5em
}
</style>
</head>
<body onload='init()'>
<div class='container top-buffer1'>
<div class='row'>
<div class='col-xs-8 col-xs-offset-2 text-center'>
<img src='keke_ai_logo.png' max-width='60%'>
</div>
</div>
<div class='row top-buffer1'>
<!-- agent level solve stats -->
<div class='col-xs-2 text-center' style='border:1px dashed white'>
<!-- level completion stats -->
<div class='top-buffer3' style='margin-bottom: 1em;color:#f00;font-size:1.5em'>Level Completion</div>
<div class='stat-table'>
<div class='row row-no-gutters equal-col' style='background-color:#00EE0088'>
<div class='col-xs-8'>Win</div>
<div class='col-xs-4' id='level_win_num'>420</div>
</div>
<div class='row row-no-gutters equal-col' style='background-color:#EE000088'>
<div class='col-xs-8'>Lose</div>
<div class='col-xs-4' id='level_lose_num'>13</div>
</div>
<div class='row row-no-gutters equal-col'>
<div class='col-xs-8'>Unsolved</div>
<div class='col-xs-4' id='level_unsolve_num'>9001</div>
</div>
</div>
<div class='row row-no-gutters stat-table' style='margin-top:1em'>
<div class='col-xs-8'>Accuracy</div>
<div class='col-xs-4' id='level_acc'>69%</div>
</div>
<!-- level averages stats -->
<div class='top-buffer3' style='margin-bottom: 1em;color:#f00;font-size:1.5em'>Solution stats</div>
<div class='stat-table '>
<div class='row row-no-gutters equal-col'>
<div class='col-xs-8'>Avg. # iterations</div>
<div class='col-xs-4' id='avg_iter'>🧐</div>
</div>
<div class='row row-no-gutters equal-col'>
<div class='col-xs-8'>Avg. runtime (s)</div>
<div class='col-xs-4' id='avg_time'>😏</div>
</div>
<div class='row row-no-gutters equal-col'>
<div class='col-xs-8'>Avg. solution length</div>
<div class='col-xs-4' id='avg_sol_len' height='100%'>😬</div>
</div>
</div>
<div> </div>
</div>
<!-- level table -->
<div class='col-xs-8 text-center'>
<!-- main level table -->
<div id='level-table'>
<div class='row row-no-gutters header'>
<div class='col-xs-1'>ID #</div>
<div class='col-xs-3'>Status</div>
<div class='col-xs-2'>Time</div>
<div class='col-xs-3'>Iterations</div>
<div class='col-xs-3'>GUI Mode</div>
</div>
<!-- NEW LEVELS WILL BE ADDED HERE -->
</div>
</div>
<!-- agent + level set selection -->
<div class='col-xs-2 text-center' style='border:1px dashed white'>
<!-- level set selection -->
<div class='row row-no-gutters top-buffer5'>
<div class='col-xs-12' id='levelSetSelection'>
Level Set:<br>
<select id='levelSetList' onchange='updateLvlSet();'>
<option value='-'>None</option>
</select>
</div>
</div>
<!-- agent selection -->
<div class='row row-no-gutters top-buffer5'>
<div class='col-xs-12' id='agentSelection'>
Agent:<br>
<select id='agentList' onchange='updateAgent()'>
<option value='-'>None</option>
</select>
</div>
</div>
<!-- train/pause agent -->
<div class='row row-no-gutters top-buffer1'>
<div class='col-xs-12'>
<button class='runBtn loadBtn' onclick='runAgent()' id='agentExecBtn'>RUN AGENT</button>
</div>
</div>
<!-- reset all of the data saved for the agent -->
<div class='row row-no-gutters' style='margin-top: 8em;'>
<div class='col-xs-12'>
<button id='resetDataBtn' onclick='resetAgentData()'>Reset all levels</button>
</div>
</div>
<div> </div>
</div>
</div>
</div>
</body>
<script src='./index-client.js'></script>
</html>