forked from StrafesNET/strafe-ai
reset
This commit is contained in:
20
src/main.rs
20
src/main.rs
@@ -414,8 +414,8 @@ fn training() {
|
||||
use strafesnet_common::instruction::TimedInstruction;
|
||||
use strafesnet_common::mouse::MouseState;
|
||||
use strafesnet_common::physics::{
|
||||
Instruction as PhysicsInputInstruction, MouseInstruction, SetControlInstruction,
|
||||
Time as PhysicsTime,
|
||||
Instruction as PhysicsInputInstruction, MiscInstruction, ModeInstruction, MouseInstruction,
|
||||
SetControlInstruction, Time as PhysicsTime,
|
||||
};
|
||||
use strafesnet_physics::physics::{PhysicsContext, PhysicsData, PhysicsState};
|
||||
|
||||
@@ -501,8 +501,22 @@ fn inference() {
|
||||
},
|
||||
};
|
||||
|
||||
const STEP: PhysicsTime = PhysicsTime::from_millis(10);
|
||||
let mut time = PhysicsTime::ZERO;
|
||||
|
||||
// reset to start zone
|
||||
session.run(time, PhysicsInputInstruction::Mode(ModeInstruction::Reset));
|
||||
// session.run(
|
||||
// time,
|
||||
// PhysicsInputInstruction::Misc(MiscInstruction::SetSensitivity(?)),
|
||||
// );
|
||||
session.run(
|
||||
time,
|
||||
PhysicsInputInstruction::Mode(ModeInstruction::Restart(
|
||||
strafesnet_common::gameplay_modes::ModeId::MAIN,
|
||||
)),
|
||||
);
|
||||
|
||||
const STEP: PhysicsTime = PhysicsTime::from_millis(10);
|
||||
let mut input_floats = Vec::new();
|
||||
// setup agent-simulation feedback loop
|
||||
for _ in 0..20 * 100 {
|
||||
|
||||
Reference in New Issue
Block a user