Skip to content

Commit ed28419

Browse files
committed
Minor changes
1 parent f844949 commit ed28419

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

src/engine/server/NN/NeuralNetwork.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ void CNeuralNetwork::OnInit()
375375

376376
load_model = false;
377377
load_previous = true;
378-
load_folder_path = "train\\1740321083457";
378+
load_folder_path = "train\\1767612197998";
379379
load_main_model_name = "last";
380380

381381
bool record_initial_demo = false;
@@ -1173,19 +1173,13 @@ void CNeuralNetwork::PostTick(float time_to_tick)
11731173
{
11741174
match_is_done = true;
11751175

1176-
if(team_with_old)
1177-
{
1176+
if (team_with_old)
11781177
count_episodes_with_old += 1;
1179-
}
11801178

1181-
if(current_old_shuffle_counter == 0 || team_with_old)
1182-
{
1179+
if (current_old_shuffle_counter == 0 || team_with_old)
11831180
current_old_shuffle_counter = 4;
1184-
}
11851181
else
1186-
{
11871182
current_old_shuffle_counter -= 1;
1188-
}
11891183

11901184
// Respawn everyone in team
11911185
RespawnTeam(team_id + 1);
@@ -1220,13 +1214,9 @@ void CNeuralNetwork::PostTick(float time_to_tick)
12201214
&& ball_last_pos.y < volleyball_area_end.y)
12211215
{
12221216
if(ball_last_pos.x > volleyball_area_center.x && ball_pos.x < volleyball_area_center.x)
1223-
{
12241217
vBallControl[team_id] = 2;
1225-
}
12261218
else if (ball_last_pos.x < volleyball_area_center.x && ball_pos.x > volleyball_area_center.x)
1227-
{
12281219
vBallControl[team_id] = 1;
1229-
}
12301220
float ball_to_line_last_distance_normalized = ClosestDistanceToDividingLine(ball_last_pos) / sqrtf(pow(13.5f, 2) + pow(9, 2)) / 32.f;
12311221
float ball_to_goal_distance_normalized = (abs(ball_last_pos.y - 118.5f * 32.f) - abs(ball_pos.y - 118.5f * 32.f)) / 32.f / 20.f;
12321222
float distance_change_reward = (ball_to_line_last_distance_normalized - ball_to_line_distance_normalized) * ball_moving_towards_net_reward;

0 commit comments

Comments
 (0)