But why does a bot timeout, even with a timer inside?
start_of_round = time.time()
for ship in game_map.get_me().all_ships():
current_time = time.time()
have_time = current_time - start_of_round < 1.8
if not have_time:
Yes, OK, something can take longer than expected. But without profiling the functions the timer is mostly useless. That profiling must be not only based on the number of ships, but apparently also on the distance they are commanded to travel.