Update: Removal of unnecessary delays
@@ -509,10 +509,10 @@ void ANSNA_Multistep_Test()
ANSNA_AddInputBelief(Encode_Term("light_active"));
ANSNA_Cycles(10);
}
- ANSNA_Cycles(100);
+ ANSNA_Cycles(10);
ANSNA_AddInputBelief(Encode_Term("start_at"));
ANSNA_AddInputGoal(Encode_Term("light_active"));
- ANSNA_Cycles(100);
+ ANSNA_Cycles(10);
assert(ANSNA_Lightswitch_GotoSwitch_executed && !ANSNA_Lightswitch_ActivateSwitch_executed, "ANSNA needs to go to the switch first");
ANSNA_Lightswitch_GotoSwitch_executed = false;
puts("ANSNA arrived at the switch");
@@ -530,28 +530,28 @@ void ANSNA_Multistep2_Test()
ANSNA_INIT();
ANSNA_AddOperation(Encode_Term("op_goto_switch"), ANSNA_Lightswitch_GotoSwitch);
ANSNA_AddOperation(Encode_Term("op_activate_switch"), ANSNA_Lightswitch_ActivateSwitch);
- for(int i=0; i<50; i++)
+ for(int i=0; i<5; i++)
{
ANSNA_AddInputBelief(Encode_Term("start_at"));
ANSNA_AddInputBelief(Encode_Term("op_goto_switch"));
ANSNA_Cycles(1);
ANSNA_AddInputBelief(Encode_Term("switch_at"));
- ANSNA_Cycles(100);
+ ANSNA_Cycles(10);
}
ANSNA_Cycles(1000);
- for(int i=0; i<50; i++)
+ for(int i=0; i<5; i++)
{
ANSNA_AddInputBelief(Encode_Term("switch_at"));
ANSNA_AddInputBelief(Encode_Term("op_activate_switch"));
ANSNA_AddInputBelief(Encode_Term("switch_active"));
ANSNA_Cycles(1);
ANSNA_AddInputBelief(Encode_Term("light_active"));
- ANSNA_Cycles(100);
+ ANSNA_Cycles(10);
}
- ANSNA_Cycles(1000);
+ ANSNA_Cycles(10);
ANSNA_AddInputBelief(Encode_Term("start_at"));
ANSNA_AddInputGoal(Encode_Term("light_active"));
- ANSNA_Cycles(100);
+ ANSNA_Cycles(10);
assert(ANSNA_Lightswitch_GotoSwitch_executed && !ANSNA_Lightswitch_ActivateSwitch_executed, "ANSNA needs to go to the switch first (2)");
ANSNA_Lightswitch_GotoSwitch_executed = false;
puts("ANSNA arrived at the switch");
