Roblox Pursuit AI: autonomous & self-driving cop car chases

This is pretty sick, it’s like the GTA San Andreas cop car chases.

1 Like

This project proves that Roblox doesn’t have that many limits as we assume it has (programming-wise), :upside_down_face:

1 Like

Haha indeed! GTA San Andreas is now 15 years old, this project exists for a few weeks :sweat_smile:

2 Likes

This is AMAZING! If it isn’t too much to ask, would it be possible to uncopylock the game?

1 Like

This is insane, I tested the game and it looks great. Good job, :+1:.

1 Like

I’m currently working on letting the car avoid objects and make the scripts easier to modify & understand. If that all works out well, this contribution will be open-source! :upside_down_face:

2 Likes

Collision avoidance is getting somewhere :eyes:

5 Likes

That’s cool!
Is it using a neural network?

WOW! I’m really wanting to use this in some projects! Hmmmm… would it be possible to have players be tagged with CollectionService a “wanted” level from 0-5 and have a corresponding amount of cops chase them? (like lvl. 1 would have 2 cops and lvl. 5 would have literally the ENTIRE POLICE FORCE swarming them?)

Also, is it possible to have the cars stationary until a police officer NPC jumps into one? Sorry if this is too much to ask, but it’d be appreciated!

P.S. This project was my inspiration to build my own AI vehicle system (which, sadly, only works on a straight line)

1 Like

No, I have decided to move off from neural networking as outlined in the first post:

Neural networks are cool, but unreliable for having self-driving cars in a 3D video game. Math & Roblox’ built-in functions can deliver a better result without the need of training, :tada:

1 Like

That sounds amazing! NPC officers can indeed be a really good addition to arrest the suspect for example, :eyes:

I’d really appreciate the idea and I’ll look what I can do for you! Stay tuned!

1 Like

I truly apologize if I’m burdening you with feature requests, but is it possible to restrict the area patrolled by the cars? (i.e. if I’m building a UD-style game around Canada, specifically this area,


would it be possible to have the SPS (Surrey Police Service) restricted to patrolling Surrey (visible on the map), the BCPP (British Columbia Provincial Police) restricted to patrolling British Columbia (a Canadian province), and the RCMP (Royal Canadian Mounted Police) restricted to patrolling all of Canada?)

In fact, that must be possible. I’m currently working on an A* nodegraph in the Roblox newest city template (which was announced). My plan is to let police cars patrol around the city, obey traffic rules and start a pursuit once they see an offense or get dispatched to a call.

During a pursuit, do you also want that officers give up when the suspect entered another area?

You’re welcome! I was running out of challenges, so every idea is welcome!

1 Like

Yep, and maybe also have cops “radio” suspects leaving their zones?

1 Like

can i make my own driving ai by copying every cfame of when the car moves then make the cop car chase it?

This demonstration works with Roblox’ physics on the released endorsed vehicles. It doesn’t rely on CFrames.

I am working hard to open-source it, hopefully I can do it soon :eyes:

Wow. This is a really cool project of yours. Imagine this being used in games like Jailbreak! (Come to think of it, maybe they can add Self-driving Teslas :laughing:)

Feedback: Not sure if this was intended, however the AI didn’t particularly predict me turning and stuff (except for a few times)

And the cars ramming you, yeah…

Aside from that, this is really cool. Never seen anything like it before, great job!

1 Like

I can modify the behavior to track you instead of ramming you (predicting a few ticks behind based on Magnitude). I’ll try that now.

If it has no predictions, it’s performing way worse. This is how the behavior works:
image

Haha indeed! I’m thinking of working on Traffic AI, so we can fill the streets :eyes:

2 Likes

Oh, wow. I’d love to see some ER:LC or Jailbreak like game using this, imagine that

ER:LC added an AI helicopter, so they have taken their first step. Maybe they could hire Chris for AI traffic and backup vehicles? :open_mouth: :stuck_out_tongue_winking_eye:

1 Like