0 votes

I'm making a top down car game in Godot. I need car A.I for the game, but I'm not so good with maths and handbuilt car A.I isn't really that good. I found this awesome new Youtuber "mohsen zare" (youtube channel) who made a neural network library for Godot in C++.

I plan on using this library and mohsen zare's Youtube videos taught me mostly enough to do so, but here's the question:

Which should I use for neural network input: Raycasts to track edges of road or map data?

Here's an example of map data:

The reason I'm thinking about using map data is, that I think using raycasts to track walls doesn't tell the neural network all the same information the player gets. The player can, for example, safely cut a corner if the player sees that the road continues behind the corner.

Edit: By the way there are no walls when exiting the road, but the car will slow down outside the road.

Godot version 3.2.3
in Engine by (57 points)
edited by

Thanks for sharing this AI lib. Have you watched Godot Recipe: AI - Context-based Steering
by KidsCanCode? It uses RayCast. It's handcrafted AI did a nice job. In 2D mine did not like small roads and his 3D did not like hills it seems to me.

I'm not sure what your map data contains. And how big it will be in your application.

1 Answer

0 votes
Best answer

An AI car fed with map data doesn't seem to learn it's job. I recommend using raycasts for car AI.

by (57 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.