Soccer player AI that looks like a real player

Hello everyone, I’m making a game where you can customize your own players, create a team, and play simulations or friendly matches.

But there’s one big problem: AI. I searched the dev forums, but all I found were slow, high-performance methods like reinforcement learning.

I’ve thought about using neural networks, but I’m still young and don’t know much about AI.

What I want is an AI that is very fast, realistic, and can quickly reflect the player’s stats and characteristics and act according to the set position.

Please help me. :sad_but_relieved_face:

Hey, look here! Deterministic and non-deterministic finite machines
I would advise you to use a scheme with OnEnterState, OnExitState, OnUpdateState

Like “attack” state. My position, the position of the goal. The ideal magnitude for me between the points for hitting = … So, my goal is to build a path that I will adjust based on the positions of the players, which will lead me to the right point so that I can hit it

5 Likes

Calling these NPCs AIs is (often) not what they actually are.
They are mostly bots which are just following the ball and calculating the most efficient way to actually win the game, or they are reinforcement learning. Which takes a LOOONNGGG time to get right and is mostly similiar or even worse than using a “pre-programmed” bot

1 Like

Hello! In order to best help your issue that you’re facing I think one of the first solutions that you can try looking for is something called Flow Field Pathfinding!

I think that this would be the best choice since Flow Field Pathfinding would allow for multiple points that the AI can move towards which would best represent the multiple people on the opposing team. As to the ball location it’s best to calculate trajectories to make the AI respond to that rather than try to make a Neural network yourself like you were discussing earlier (I don’t even know if that’s possible on the platform yet). If you have anymore questions I’d be glad to answer, best of luck!