File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,16 @@ export class PretrainedComponent extends ViewController {
20
20
super ( ) ;
21
21
}
22
22
23
+ private reload ( ) : void {
24
+ this . initConcrete ( ) ;
25
+ }
26
+
27
+ protected logStartMessage ( ) {
28
+ console . log ( '[' + new Date ( ) . toISOString ( ) + ']: Evaluation of Agent is starting!'
29
+ + '\nStarting evaluation phase!'
30
+ + '\nCurrent Timestamp: ' + new Date ( ) . getTime ( ) ) ;
31
+ }
32
+
23
33
protected initConcrete ( ) : void {
24
34
this . loadedBrainCounter = 0 ;
25
35
this . isFullyLoaded = false ;
@@ -31,10 +41,6 @@ export class PretrainedComponent extends ViewController {
31
41
this . world . switchTrainingModeOfAgents ( false ) ;
32
42
}
33
43
34
- private reload ( ) : void {
35
- this . initConcrete ( ) ;
36
- }
37
-
38
44
private async loadBrains ( ) : Promise < any > {
39
45
for ( let i = 0 ; i < this . maxAgents ; i ++ ) {
40
46
const brain = this . queryBrain ( i ) ;
Original file line number Diff line number Diff line change @@ -62,14 +62,18 @@ export abstract class ViewController implements OnInit {
62
62
protected abstract initConcrete ( ) : void ;
63
63
64
64
public start ( ) : void {
65
- console . log ( '[' + new Date ( ) . toISOString ( ) + ']: Training of Agent is starting!'
66
- + '\nStarting training phase!'
67
- + '\nCurrent Timestamp: ' + new Date ( ) . getTime ( ) )
65
+ this . logStartMessage ( ) ;
68
66
this . isPaused = false ;
69
67
this . setSimulationInterval ( this . simSpeedIndex ) ;
70
68
this . setEvaluationInterval ( ) ;
71
69
}
72
70
71
+ protected logStartMessage ( ) {
72
+ console . log ( '[' + new Date ( ) . toISOString ( ) + ']: Training of Agent is starting!'
73
+ + '\nStarting training phase!'
74
+ + '\nCurrent Timestamp: ' + new Date ( ) . getTime ( ) ) ;
75
+ }
76
+
73
77
public pause ( ) : void {
74
78
this . isPaused = true ;
75
79
this . setSimulationInterval ( this . simSpeedIndex ) ;
You can’t perform that action at this time.
0 commit comments