Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Karting Microgame ML-Agents - how to train them better?

Discussion in 'ML-Agents' started by User777720, Mar 6, 2024.

  1. User777720

    User777720

    Joined:
    Jun 1, 2023
    Posts:
    2
    I have a Karting Microgame project. It has a modified, long track. I have 10 ML agents. I tried to train them and when, for example, 8 are going in the right direction, 2 other turn around at the start and go against the flow. I have checkpoints set in the right direction.

    I don't know how to set the configuration file and rewards and penalties.

    How to fix it?
     
  2. smallg2023

    smallg2023

    Joined:
    Sep 2, 2018
    Posts:
    152
    best bet is to end an agent's episode as soon as possible so if they start going the wrong way for some time end their episode and restart them so they're facing the right way again - you'll want to let them go the wrong way a little bit so they know how to handle crashing etc but they shouldn't need to go the wrong way for long.
    if they get more rewards for going forwards they'll get out of the habit of going the wrong way after some more training
     
  3. User777720

    User777720

    Joined:
    Jun 1, 2023
    Posts:
    2
    I forgot, the training is not always stable and in the inference mode, for example, 2 of them go againist the flow. If I set the reward for passing the checkpoint in the right direction too much, they go very slowly.

    How can I restart the agent in training mode? I have 10 ML-Agents training simultaneously and the training is factory accelerated.