mirror of
https://github.com/wassname/rl_2d_walker.js.git
synced 2026-09-09 11:33:20 +08:00
throw balls during training
This commit is contained in:
@@ -250,6 +250,12 @@ class DDPGAgent {
|
||||
}
|
||||
if (realTime && step % 10 == 0)
|
||||
await tf.nextFrame();
|
||||
if (step % 2000 == 0) {
|
||||
// thow balls every 2000 steps
|
||||
this.env.shuffle({
|
||||
cars: false
|
||||
});
|
||||
}
|
||||
}
|
||||
this.stepList.push(step);
|
||||
console.timeEnd("LoopTime");
|
||||
|
||||
Reference in New Issue
Block a user