Search Unity

Is it possible to train an AI to drive a boat racing game ?

Discussion in 'ML-Agents' started by Deceleris, Sep 16, 2021.

  1. Deceleris

    Deceleris

    Joined:
    Jan 3, 2018
    Posts:
    22
    Hello ! I'm working on a racing game with boats, but the major problem for AIs is that unlike a car, the boat don't turn instantly. If you wan to turn right, you have to anticipate the movement depending of your speed.
    So in the first time I've written manually the behavior of them, but the "water drift" was still too hard to solve, and I was forced to add a cheat. If the AI is too far from the path, I interpolate his position.

    Currently it's working* but It's not powerful at all and I have a lot of issues, eternally solving problems of direction etc, then I'm planning one day to implement the ML-Agent.

    But my question is, is it possible to reproduce the human anticipation with ML ? For the turning but also for jumping and interacts with other boats ? Because the car games I found in example are really simple and I don't really want to spent a month to make something impossible to work :p

    Thanks in advance ~
     
  2. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
    Yes, it should be. Make sure to
    1) implement a Heuristic method for your agent to get the boat controls working exactly how you want them to and
    2) observe velocity and angular velocity in the boat's reference frame, using boat_transform.InverseTransformVector
     
  3. Deceleris

    Deceleris

    Joined:
    Jan 3, 2018
    Posts:
    22
    Thanks for your answer !