Why are no agents added to the Manager?

Hello, I’m trying to implement concurrent AI car logic using machine learning as part of the development of my racing game.

To do this, I relied on this tutorial: Learning Agents (5.5) | Course

I coded everything I needed, and when I tested it in-game, I got the following error messages in the logs:

I’d like to know how to ensure my AI car is correctly added to the manager ? Best regards.

There is video as well for this, may be they speak something you missed . Have a look

1 Like

Is it possible that the cars are created before the manager or its components, unable to find it and not register? (BTW you should add a warning when a registration fails)

Try to delay the registration for 0.5 sec and tell us what you got.

1 Like

I try to delay the registration for 0.5 sec but i have the same results :

Print the Add Agent value to see if it increments.

On a second glance at your blueprint…

You get all actors with tag LearningAgentsManager

I’m guessing that this is the code in the manager but is this the right tag? Are you sure that it is actors with tag “…Manager” that you are after, not with tag ”…Agent”? I’m asking because you are next looking for a LearningAgens component in those managers. It might be the case that your agents are tagged with “…Manager” but it might also be a mislabeling on your part.

in fact this code is in the blueprint of the AI ​​Rally car, the purpose of this code is to point to the BP_AiCarManager which has the tag LearningAgentsManager then with learningcomponent to add the pawn of the AI ​​Rally car as an agent in the BP_AICarManager normally this should work unless there is another more efficient method?

Cordially

Is the issue that you tagged the manager component and not the actor itself?

I tagged the LearningAgentManager component since the BP_AICarManager has the LearningAgentsManager tag but if I tag the actor itself does it work?

Im not sure if it will fix it since I can’t see your whole project, but I saw you tagged the component here:

So I figured maybe you didn’t tag the actual actor. Did you make sure “Get All Actors with Tag” is actually finding anything? Maybe you some prints or breakpoints.

I checked several times that It seems that the tag does not work because during the tests I have the same error message that no agent is added, now I tried to tag the actor himself and during the test I had this in my logs…

This is progress I think. Because now it looks like you have agents but the interactor’s action schema is invalid. You need to look at that and figure out what is wrong. All the other errors cascade from that.

I think not since I have this error message which in my opinion makes no sense since I installed the Learning Agents plugin normally in my project so why when I test I have this… While in my project folder I have the famous folder with pipinstall and python.exe. I just want to know why the engine is pointing to a different path that doesn’t exist in the project folder.

Sincerely,

Log Learning Errors ( Can't find Python executable)

Hello, after uninstalling and reinstalling Unreal Engine 5.5 and starting from scratch on machine learning, I finally managed to add an agent to the Manager :

1 Like