Learning agent tick time

Hi, I’m using learning agent to train my agent to finish a simple task: move towards target cube in map.
Here is my blueprint of Event Get Actions:

When the tick time is set to 0, my agents can move forward and backward:

But when I set 0.1 as the Learning to drive tutorial suggest, the agents don’t move now, only turn around.

I’ve check the input value of Add Movement Input, they are not zero, but it seems like it doesn’t work.

What tick time is optimal for different use case? Should I use another function to control the agent movement?

Thanks!

If you set tick <= 0, that’s the same as ticking every frame. It’s likely you have an issue with your action scales. I would try increasing the effect of the actions.

I’ve also found its really useful to create a setup where you can play your own agents. We have a LearningAgentsController which can facilitate this but haven’t put a tutorial together on how to use it yet.

I would try increasing the effect of the actions.

Many thanks for your advice! I’ll try it soon.

We have a LearningAgentsController which can facilitate this but haven’t put a tutorial together on how to use it yet.

Hopefully it will come out soon. :smile:

1 Like

Unfortunately, increase the scale doesn’t help!
I’ve tried adjusting the scale value in the Add Float Action and multiply the action value after Get Float Action, none of them worked.

I should have used a better word than scale :sweat_smile: … in this case I meant that you might need to increase the speed of the agents, as in their walking speed might not be fast enough.

I think the Add Movement Input needs to run every frame so maybe have the agent store your “forward” actions output on the agent’s pawn (call it “Speed”), then during the pawn’s tick call “AddMovementInput” every frame using that “Speed”. Then the manager/interactor can tick slower at like ~0.1 seconds, and the pawn can still walk fast enough? Let me know if this doesn’t work.

It worked like a charm! :100: Much appreciated! :+1: :+1:

After further investigation, I discovered that adjusting the tick time to 0.1 made my agents somewhat “sluggish”. Although they seemed to understand the goal after some training, they struggled to reach it (behaved like a person with high myopia). However, when I decreased the tick time to 0.01, my agents became more “agile”: They were able to turn quickly and reach the goal with greater speed.

Yeah, you need to play around with all the settings to figure out what works for your game. There’s not a recipe for success yet but I think we’re starting to get an intuition for what tends to work and what does not.

Exactly! Thanks so much for your help! :heart:

1 Like