MailRuChamps / raic-2018

Russian AI Cup — artificial intelligence programming contest. Official website: http://russianaicup.ru
43 stars 32 forks source link

Local Runner aborts strategy if any action's field is +/- infinity (c++) #122

Open victor-istomin opened 5 years ago

victor-istomin commented 5 years ago

Console log:

>codeball2018.exe --version                                                                        
codeball2018 1.1.1                                                                                                                                  

>codeball2018.exe --start-paused --results-file result.txt --nitro true --seed 1 --log-file log.txt
INFO - options: Opt {                                                                                                                               
    player_1: "tcp-31001",                                                                                                                          
    player_2: "helper",                                                                                                                             
    player_1_name: None,                                                                                                                            
    player_2_name: None,                                                                                                                            
    player_1_dump: None,                                                                                                                            
    player_2_dump: None,                                                                                                                            
    player_1_tl: None,                                                                                                                              
    player_2_tl: None,                                                                                                                              
    team_size: None,                                                                                                                                
    duration: None,                                                                                                                                 
    nitro: Some(                                                                                                                                    
        true                                                                                                                                        
    ),                                                                                                                                              
    locale: None,                                                                                                                                   
    noshow: false,                                                                                                                                  
    log_file: Some(                                                                                                                                 
        "log.txt"                                                                                                                                   
    ),                                                                                                                                              
    replay: None,                                                                                                                                   
    results_file: Some(                                                                                                                             
        "result.txt"                                                                                                                                
    ),                                                                                                                                              
    seed: Some(                                                                                                                                     
        1                                                                                                                                           
    ),                                                                                                                                              
    export_arena: None,                                                                                                                             
    start_paused: true,                                                                                                                             
    no_countdown: false,                                                                                                                            
    until_first_goal: false,                                                                                                                        
    vsync: false,                                                                                                                                   
    fast_forward: None,                                                                                                                             
    disable_random: false                                                                                                                           
}                                                                                                                                                   

INFO - Waiting for client on port 31001                             
INFO - Guessed window DPI factor: 1                                 
INFO - GL version: "4.6.0 NVIDIA 388.59"                            
INFO - Successfully loaded "save.json"                              
INFO - Client connected on port 31001                               
ERROR - Player down: EOF while parsing a value at line 1 column 90  

action: action.target_velocity_z = std::numeric_limits<double>::infinity();

Aborted in:

unique_ptr<Game> RemoteProcessClient::read_game() {
    string line = readline();
    if (line.empty()) {
        return unique_ptr<Game>();    <--- // line is empty
    }
    Document d;
    d.Parse(line.c_str());
    unique_ptr<Game> result(new Game());
    result->read(d);
    return result;
}