Hacktrix-121 commited on
Commit
d5d74e8
·
1 Parent(s): e233264

updated weights

Browse files
dashboard.html CHANGED
@@ -626,10 +626,13 @@ async function fetchRecommendation() {
626
  }
627
 
628
  async function stepOnce() {
629
- if (episodeDone || !currentAlerts.length) return false;
 
 
630
  // Get recommendation from server (uses trained weights or rule-based)
631
  const rec = await fetchRecommendation();
632
  if (!rec || rec.error) {
 
633
  showToast('No recommendation available', 'error');
634
  return false;
635
  }
@@ -687,7 +690,11 @@ async function autoPlay() {
687
  document.getElementById('autoBtn').textContent = '⏸ Pause';
688
  while (autoPlaying && !episodeDone) {
689
  const ok = await stepOnce();
690
- if (!ok) break;
 
 
 
 
691
  await new Promise(r => setTimeout(r, 300));
692
  }
693
  autoPlaying = false;
 
626
  }
627
 
628
  async function stepOnce() {
629
+ if (episodeDone) return false;
630
+ if (!currentAlerts.length) return 'wait'; // Queue temporarily empty, wait for environmental spawn
631
+
632
  // Get recommendation from server (uses trained weights or rule-based)
633
  const rec = await fetchRecommendation();
634
  if (!rec || rec.error) {
635
+ if (!currentAlerts.length) return 'wait';
636
  showToast('No recommendation available', 'error');
637
  return false;
638
  }
 
690
  document.getElementById('autoBtn').textContent = '⏸ Pause';
691
  while (autoPlaying && !episodeDone) {
692
  const ok = await stepOnce();
693
+ if (ok === 'wait') {
694
+ await new Promise(r => setTimeout(r, 1500)); // Queue empty, wait for environmental spawn
695
+ continue;
696
+ }
697
+ if (ok === false) break;
698
  await new Promise(r => setTimeout(r, 300));
699
  }
700
  autoPlaying = false;
results/comparison_results.json ADDED
@@ -0,0 +1,435 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "easy": {
3
+ "threshold": 0.7,
4
+ "n_episodes": 10,
5
+ "rule_basic": {
6
+ "mean": 0.565,
7
+ "std": 0.13342705039750288,
8
+ "min": 0.26666666666666666,
9
+ "max": 0.75,
10
+ "success_rate": 0.2,
11
+ "scores": [
12
+ 0.6666666666666666,
13
+ 0.4666666666666667,
14
+ 0.5333333333333333,
15
+ 0.6333333333333333,
16
+ 0.26666666666666666,
17
+ 0.75,
18
+ 0.5666666666666667,
19
+ 0.6,
20
+ 0.4666666666666667,
21
+ 0.7
22
+ ]
23
+ },
24
+ "rule_improved": {
25
+ "mean": 0.28239130434782606,
26
+ "std": 0.17974288212805087,
27
+ "min": 0.1,
28
+ "max": 0.75,
29
+ "success_rate": 0.1,
30
+ "scores": [
31
+ 0.16666666666666666,
32
+ 0.2,
33
+ 0.1,
34
+ 0.4,
35
+ 0.13333333333333333,
36
+ 0.75,
37
+ 0.26666666666666666,
38
+ 0.3333333333333333,
39
+ 0.17391304347826086,
40
+ 0.3
41
+ ]
42
+ },
43
+ "ppo": {
44
+ "mean": 0.31885369532428354,
45
+ "std": 0.15685624769000914,
46
+ "min": 0.06666666666666667,
47
+ "max": 0.5,
48
+ "success_rate": 0.0,
49
+ "scores": [
50
+ 0.16666666666666666,
51
+ 0.5,
52
+ 0.5,
53
+ 0.26666666666666666,
54
+ 0.06666666666666667,
55
+ 0.38461538461538464,
56
+ 0.23333333333333334,
57
+ 0.47058823529411764,
58
+ 0.13333333333333333,
59
+ 0.4666666666666667
60
+ ]
61
+ },
62
+ "training": {
63
+ "episode_rewards": [
64
+ 116.48117816744173,
65
+ 51.179276131841576,
66
+ 52.2618112911265,
67
+ 73.2821529517957,
68
+ 56.35469617840879,
69
+ 80.22612139126159,
70
+ 126.40470506929401,
71
+ -27.966666666666665,
72
+ 41.83973320279549,
73
+ 49.79345637951734
74
+ ],
75
+ "episode_scores": [
76
+ 0.5666666666666667,
77
+ 0.5,
78
+ 0.5666666666666667,
79
+ 0.5,
80
+ 0.43333333333333335,
81
+ 0.5666666666666667,
82
+ 0.6666666666666666,
83
+ 0.1111111111111111,
84
+ 0.43333333333333335,
85
+ 0.5666666666666667
86
+ ],
87
+ "policy_losses": [
88
+ -0.00031701126135885715,
89
+ -0.0005917370435781777,
90
+ -0.0004098603967577219,
91
+ -0.0004132986068725586,
92
+ -0.0011740466579794884,
93
+ -0.0006698071956634521,
94
+ 0.0003072003601118922,
95
+ 0.0004630155162885785,
96
+ -0.00042602914618328214,
97
+ 0.000690912245772779
98
+ ],
99
+ "entropies": [
100
+ 1.3397215844770598,
101
+ 1.28164808620697,
102
+ 1.3136498968506878,
103
+ 1.3446368176704309,
104
+ 1.334242086449483,
105
+ 1.3403528217115777,
106
+ 1.3486054411454527,
107
+ 1.338187676696283,
108
+ 1.3261117608663633,
109
+ 1.3390974986011028
110
+ ]
111
+ }
112
+ },
113
+ "medium": {
114
+ "threshold": 0.55,
115
+ "n_episodes": 15,
116
+ "rule_basic": {
117
+ "mean": 0.6065292,
118
+ "std": 0.1133496138271322,
119
+ "min": 0.407683,
120
+ "max": 0.758043,
121
+ "success_rate": 0.6,
122
+ "scores": [
123
+ 0.544947,
124
+ 0.608039,
125
+ 0.461019,
126
+ 0.615249,
127
+ 0.407683,
128
+ 0.758043,
129
+ 0.530671,
130
+ 0.731125,
131
+ 0.721003,
132
+ 0.687513
133
+ ]
134
+ },
135
+ "rule_improved": {
136
+ "mean": 0.36824,
137
+ "std": 0.2038091025592331,
138
+ "min": 0.126603,
139
+ "max": 0.731182,
140
+ "success_rate": 0.2,
141
+ "scores": [
142
+ 0.126603,
143
+ 0.353704,
144
+ 0.130989,
145
+ 0.731182,
146
+ 0.1532,
147
+ 0.382268,
148
+ 0.284057,
149
+ 0.698946,
150
+ 0.444375,
151
+ 0.377076
152
+ ]
153
+ },
154
+ "ppo": {
155
+ "mean": 0.12029260000000001,
156
+ "std": 0.15422419929258832,
157
+ "min": 0.0,
158
+ "max": 0.371589,
159
+ "success_rate": 0.0,
160
+ "scores": [
161
+ 0.371589,
162
+ 0.0,
163
+ 0.0,
164
+ 0.327622,
165
+ 0.0,
166
+ 0.0,
167
+ 0.352266,
168
+ 0.047619,
169
+ 0.0,
170
+ 0.10383
171
+ ]
172
+ },
173
+ "training": {
174
+ "episode_rewards": [
175
+ 289.19607022503374,
176
+ 31.324053215893485,
177
+ 227.8569682176852,
178
+ 69.9986190511277,
179
+ 148.51004751942824,
180
+ 2.649222740657118,
181
+ 142.98109194665278,
182
+ 166.0523382428407,
183
+ -17.823338903249397,
184
+ 163.79688498101618,
185
+ 20.967070078863117,
186
+ 252.20290252850012,
187
+ 87.20304691964265,
188
+ 68.97229783047784,
189
+ 48.019239227065704
190
+ ],
191
+ "episode_scores": [
192
+ 0.747084,
193
+ 0.426987,
194
+ 0.652915,
195
+ 0.572663,
196
+ 0.595108,
197
+ 0.621572,
198
+ 0.575688,
199
+ 0.661152,
200
+ 0.238471,
201
+ 0.599472,
202
+ 0.673464,
203
+ 0.71291,
204
+ 0.510403,
205
+ 0.461406,
206
+ 0.554831
207
+ ],
208
+ "policy_losses": [
209
+ -0.00011090115003753453,
210
+ -0.00045563955791294575,
211
+ -0.0005598295829258859,
212
+ 0.0002498215762898326,
213
+ -0.0004835896543227136,
214
+ -0.0002657274599187076,
215
+ 2.585202491900418e-05,
216
+ -0.00024676843895576894,
217
+ -4.288851414457895e-06,
218
+ -0.0002753034350462258,
219
+ 0.00021128143998794258,
220
+ 0.00013167335418984294,
221
+ -0.0014359087217599154,
222
+ 0.0001275122194783762,
223
+ -0.0004190042382106185
224
+ ],
225
+ "entropies": [
226
+ 1.3078774153620452,
227
+ 1.3198472053289163,
228
+ 1.2824486149720111,
229
+ 1.303192149903892,
230
+ 1.2968761532941306,
231
+ 1.3589913703942351,
232
+ 1.3173352639807518,
233
+ 1.2921417353749498,
234
+ 1.2932024355816831,
235
+ 1.2977528110651393,
236
+ 1.2935277894985902,
237
+ 1.2847667442611173,
238
+ 1.2918389386627889,
239
+ 1.3078202616228094,
240
+ 1.3123808854500285
241
+ ]
242
+ }
243
+ },
244
+ "hard": {
245
+ "threshold": 0.5,
246
+ "n_episodes": 30,
247
+ "rule_basic": {
248
+ "mean": 0.3592359,
249
+ "std": 0.04597751458800269,
250
+ "min": 0.305788,
251
+ "max": 0.456861,
252
+ "success_rate": 0.0,
253
+ "scores": [
254
+ 0.357113,
255
+ 0.344618,
256
+ 0.456861,
257
+ 0.413206,
258
+ 0.305788,
259
+ 0.39223,
260
+ 0.325218,
261
+ 0.324735,
262
+ 0.360089,
263
+ 0.312501
264
+ ]
265
+ },
266
+ "rule_improved": {
267
+ "mean": 0.08083320000000001,
268
+ "std": 0.09074694593737025,
269
+ "min": 0.0,
270
+ "max": 0.330565,
271
+ "success_rate": 0.0,
272
+ "scores": [
273
+ 0.073929,
274
+ 0.074479,
275
+ 0.0,
276
+ 0.330565,
277
+ 0.077784,
278
+ 0.079177,
279
+ 0.0,
280
+ 0.075606,
281
+ 0.0,
282
+ 0.096792
283
+ ]
284
+ },
285
+ "ppo": {
286
+ "mean": 0.0451608,
287
+ "std": 0.046165539127795314,
288
+ "min": 0.0,
289
+ "max": 0.162508,
290
+ "success_rate": 0.0,
291
+ "scores": [
292
+ 0.0,
293
+ 0.031159,
294
+ 0.070801,
295
+ 0.020789,
296
+ 0.034032,
297
+ 0.03,
298
+ 0.162508,
299
+ 0.022963,
300
+ 0.0,
301
+ 0.079356
302
+ ]
303
+ },
304
+ "training": {
305
+ "episode_rewards": [
306
+ 99.41774516346646,
307
+ 52.08058065987078,
308
+ 106.23944303643187,
309
+ 30.139073873921753,
310
+ 56.61845300055894,
311
+ 73.32529035534895,
312
+ 138.58575407819225,
313
+ -13.80251134755405,
314
+ 105.24364041105947,
315
+ 143.66845440570685,
316
+ 50.946750742115405,
317
+ 101.28459645197202,
318
+ 44.73084312495516,
319
+ 1.5265232947738134,
320
+ -0.5387180214798111,
321
+ 33.34359118615684,
322
+ 67.93893773141943,
323
+ 103.87818539075207,
324
+ 141.53997245597657,
325
+ 51.56927062513001,
326
+ 2.5994465725157045,
327
+ 21.409162528947157,
328
+ 17.174619999999994,
329
+ 122.55731714185875,
330
+ 138.50278641960747,
331
+ -4.699999999999999,
332
+ 249.20114192274738,
333
+ 52.25401551533514,
334
+ 79.65609498591343,
335
+ 133.96772892643187
336
+ ],
337
+ "episode_scores": [
338
+ 0.062813,
339
+ 0.04039,
340
+ 0.122923,
341
+ 0.051732,
342
+ 0.027002,
343
+ 0.042925,
344
+ 0.312897,
345
+ 0.2,
346
+ 0.065612,
347
+ 0.046683,
348
+ 0.074122,
349
+ 0.0,
350
+ 0.103474,
351
+ 0.039975,
352
+ 0.056427,
353
+ 0.087705,
354
+ 0.027984,
355
+ 0.049027,
356
+ 0.090291,
357
+ 0.095473,
358
+ 0.054766,
359
+ 0.051002,
360
+ 0.069154,
361
+ 0.113725,
362
+ 0.0,
363
+ 0.06,
364
+ 0.347106,
365
+ 0.095914,
366
+ 0.116824,
367
+ 0.069492
368
+ ],
369
+ "policy_losses": [
370
+ -0.0005034402711316943,
371
+ -6.183655932545662e-05,
372
+ 0.00035082444082945585,
373
+ -0.00038212965591810644,
374
+ -0.00010332465171813965,
375
+ -0.00020747099188156426,
376
+ -0.00016732812218833715,
377
+ -0.00014956295490264893,
378
+ -0.0003894716501235962,
379
+ 0.00039730468415655196,
380
+ 0.0008679513703100383,
381
+ 0.0003810872440226376,
382
+ 0.0004052993026562035,
383
+ -0.0002230490936199203,
384
+ -0.0003821717400569469,
385
+ -0.0010335743427276611,
386
+ 0.00025102682411670685,
387
+ 0.00039608514634892344,
388
+ 0.00023010990116745234,
389
+ -0.0010765307815745473,
390
+ -0.0007117217173799872,
391
+ -0.0006123952916823328,
392
+ -0.0017230421071872115,
393
+ 0.000159939139848575,
394
+ 2.03229756152723e-05,
395
+ -0.0015492378734052181,
396
+ -0.0004421842168085277,
397
+ -0.00029417508631013334,
398
+ 9.047671483131126e-05,
399
+ 0.00019198372319806367
400
+ ],
401
+ "entropies": [
402
+ 1.3224266713118111,
403
+ 1.293569102812929,
404
+ 1.2913357524537528,
405
+ 1.3050642097992904,
406
+ 1.3112657711037068,
407
+ 1.2895643985942957,
408
+ 1.3155195660204368,
409
+ 1.359707747865233,
410
+ 1.2949677676487992,
411
+ 1.2961893168835212,
412
+ 1.2964495135329652,
413
+ 1.3035501102717268,
414
+ 1.3021071611669996,
415
+ 1.2931140090628328,
416
+ 1.300373082313374,
417
+ 1.2937277936176361,
418
+ 1.28773486772252,
419
+ 1.310148409601071,
420
+ 1.288673149660661,
421
+ 1.325662991150635,
422
+ 1.293254712167581,
423
+ 1.2945157631549828,
424
+ 1.3166287955261984,
425
+ 1.298098445695401,
426
+ 1.2962819506837526,
427
+ 1.2905327485365072,
428
+ 1.318213829711901,
429
+ 1.326138970673737,
430
+ 1.3073734220909363,
431
+ 1.3123867051662546
432
+ ]
433
+ }
434
+ }
435
+ }
weights/ppo_easy.json ADDED
The diff for this file is too large to render. See raw diff
 
weights/ppo_hard.json ADDED
The diff for this file is too large to render. See raw diff
 
weights/ppo_medium.json ADDED
The diff for this file is too large to render. See raw diff