Such a ML AI might even be the best possible ally AI, being honest. The AI would never be too strong or weak.
I just haven’t found any tutorials on how to do ML yet.
Such a ML AI might even be the best possible ally AI, being honest. The AI would never be too strong or weak.
I just haven’t found any tutorials on how to do ML yet.
I like your ideas. I’ve been brainstorming my own concepts with cars that learn to drive like you drive. I’ve got some basic stuff set up - I get in a car and give myself a GPS route in-game and follow it. The entire time my inputs and location and velocity relative to the GPS routes are recorded every 0.1 seconds. Then I train a new network to see the inputs (position relative to GPS route, last set of outputs, velocity, etc) to match the recorded outputs (the steering, throttle, and handbraking I decided to do in said scenario).
After some time the AI learns to take those inputs and outputs results that look somewhat like mine, AKA mimicking what I would do in a driving situation. It works okay right now and still needs some work. I’ve been thinking of making police chases use cars that are just as good as the player, if not a little better (only train on the players “good” data, aka delete training data that results in the player crashing).
I don’t think having a ML AI against a player is good though - you’d have to be careful to prevent the enemies from getting so stupidly perfect that the AI wins every time or is unnecessarily aggravating to play against, at least in certain games. In Smash, for example, a ML AI trained on top players would be monstrously out of tune and one trained on average players would be too weak for top players to get a challenge from.
By the way, massive fan. Felt awesome to notice you had replied to me lol
Btw this has been properly released (finally!) in Vehicle Simulator after some performance improvements on roblox’s end. To trigger a cop go left down the road from the spawn and hit the cop car with your car!
What made it so performance heavy? I have played the game, and touched the cop-car, but when I get chased, it gets soo laggy, and my ping is unusually high.
Roblox used to do ALL of the physics on one core, + it used to run Lua much slower.
As of 2 days ago we re published and roblox’s new changes helped quite a bit.
How big are those improvements? Is there a noticeable difference before those changes, and after?
(My pc it total garbage tbh I only have like 2 cores on this low 'n slow tower, so maybe its not going to be that much of a difference on my pc.)
Enough for my laptop to be able to run them without chugging. Last time we enabled the cops the avg player visit time went down. This time it’s gone up a bit which loosely translates to “the cops don’t lag as hard on most people’s PCs anymore.”
Roblox recently made physics performance changes?
It was like a month before RDC.
Since the police AI uses a neural network, what data does the neural network learn? Surely if you wanted to learn where the player is located, you could just use plr.Character.HumanoidRootPart.Position
.
Neural networks are based on AI making random choices, slowly learning which random choices are not ideal, and which cause improvement.
You don’t use it to “learn” the position of a humanoid, you use to to make your AI become more human like by applying goal states. If you apply no constraints to its learning it can become a “perfect” AI.
There are many resources on Neural Networks online.
I know. But I just wanted to know what data his neural network learned.
It knows certain variables like what the ideal path to the target is using A* GPS, how far it is from said path, it’s own velocity, when turns are coming up, etc…
It learns to take all of these variables and output 3 values: Throttle, Handbrake, and Steer.
An amazing example of neural networks. This project of yours was one of the things that inspired me to try neural networking myself. Would appreciate it if you try the neural network library I released a week ago. It has all the functionality and features that you used as well as recurrent networks; networks that whose actions influence future actions, making time-based AI (like this) act more intelligently.
Would love your thoughts on it.
Thanks, I’m glad to hear that! I’ll give it a go sometime soon™. I’m working on something else right now but have a passion for machine learning so I’m sure I’ll give it another go soon
That’s amazing. I want to know how you started it, as there’s no way you did this in Roblox studio. Would you recommend me making one for fun/out of curiousity.
Wow, that’s so amazing! I have a few questions (I know nothing about AIs and stuff like this):
Did you everything in Roblox Studio?
Is this possible with only using Roblox’s Lua
Yup, everything was done in Studio. You can do quite a bit of ML in studio actually! It’s not nearly fast enough for complex things like vision, but for easier tasks like this it works just fine.
Amazing, I can’t wait to see the future of neural networks!