The online racing simulator
Searching in All forums
(987 results)
blackbird04217
S3 licensed
I don't know if I made it clear enough in the first post, but creating a super fast and difficult AI is not the goal, although I would like to see how good I can do it. The main point of the exercise is only using data that the player can use. For instance a player does NOT know the heat of the tire, size of the tire or any of this information - but just as well we do know how to sense the limits of the tire by listening to the sound, and by seat of your pants feeling which is lacking in a simulation environment.

Weight distribution doesn't really matter either - if the physics side of things simulates it then great, but all a human is concerned with is the tires being at the limit without going over. Your correct that the AI will need to sense the data somehow; through the reference points which will be placed in some sort of editor or something.

It is likely I work on this in a 2D environment, although I have not made my finalized plan. I've been thinking about this quite a bit, and yes it is a big project. No it will not be easy. And most importantly it will likely be far from perfect. I have reasons to think that some of my techniques will help the AI a bit, but there are still a few lacking ideas. I don't have a 'best' line on the track, and am going to try using only the track side reference points.

I don't think the AI needs to know all the physics of the simulator to be fast. Actually, I think traditionally developers go this route just because it is proven.

For instance: Put yourself in an unknown setup, even in a car you haven't driven in some time. But you are on a course that you know reference points of. (You generally brake *near* the 50m mark in most cars, this car you might brake slightly after, or before - but you know the 50m reference point - and that is all that is needed.) You also know that turning the steering wheel left will turn the car left, but by how much you don't know exactly. Setup could be strange there. I think the point is clear with the example that you don't need to know the dynamics of the setup or car. The only thing the driver is aware of, as far as physics is concerned, is the traction levels of all the tires.

Front tires lost grip, try braking more, (or less if hard on brakes), and try less steering input. Now, as far as getting the AI to find, and drive the perfect line - avoid the other cars when they only know estimation points, and things like that - it will be interesting. This may work great, or it may be terrible.

"All our dreams can come true, if we have the courage to pursue them." -Walt Disney
Artificial Intelligence in Racing Simulations Project
blackbird04217
S3 licensed


I didn't know whether to put this in Off-topic or here, but for the past 8 hours I have been thinking about developing the most realist AI Racing Sim I can. I would like to discuss it here with a few programmers because there are a few around, and there is an obvious passion for racing. My idea comes from the fact some tests I've been running in LFS, I am not mentioning them for fear of flaming since what I would have to say is purely my thoughts and opinions based on what I've witnessed. I don't have the code so I can't be sure what is happening.

Regardless. I want to make an AI that can take in only the amount of information that a human can. Information will be limited to Reference Points. Track Reference Points will be placed every 20 meters or so on the left and right side of the track. General Reference Points consist of buildings, billboards and other large / obvious points along the track, and then Detail Reference Points will consist of points close to where the AI Driver is supposed to brake, turn-in or hit for apex.

However, the driver will not get the reference point as a solid position. Instead they will a vector in the direction of the reference point and with a length of near the distance between the view and reference point - but it could be longer or shorter. The error comes into play based on how far the reference point is. Closer points are easier to judge distances, therefore are more accurate.

These reference points are also "culled" by a FieldOfView each frame, so the driver needs to turn their view to see more. This fov can change based on the drivers concentration level. Example, if the driver suddenly starts spinning and losing control they will likely have less fov, and less accurate points of reference.

Other information the driver will be able to gather:
  • Reference Points
  • Velocity of the vehicle
  • Useful Car/Dashboard/Gauges Information: RPM, Fuel, Gear etc.
  • Traction Information (FULLGRIP, NEARLIMIT, ATLIMIT, OVERLIMIT)
  • G-Meter (Represents "feel of the seat")
A very important aspect of this project is the desire to make the AI use car controls accurately. Instead of simply moving the car and using different physics than the player would like several games have done before. This includes having the driver "PrepareTo" before he wants to shift. Otherwise shifting would have a built in lag. Not large, perhaps 150 to 200 milliseconds or less.

---------

Development has not started on this, although I have started working on a writeup of the particular AI problems I am trying to solve, and eventually how I am going to go about solving those. I am looking for a few people who are interested in the project to contact me. I will be working with Visual C++ 2008 Express Edition. I want to keep the environment simple and to the point. The physics of the racing do not need to be 100% accurate or even near it, but the AI is the thing to tackle.

This Artificial Intelligence system will not be dependant on physics. If done properly the driver should be able to drive near the limits. That is not to say that physics won't effect the AI. A bad physics system with the traction could cause issues, though with any luck some rudimentary game physics will work.

See attached file for some existing AI problems.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Youtube: AIRS: Computing the Racing Line
Youtube: AIRS: Driver Predictions
Youtube: AIRS Driving XRG at FE1 (2014)
Youtube: AIRS Playing with Genetic Algorithms
Youtube: AIRS Driver Lapping XRG at FE1 (early 2016)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Last edited by blackbird04217, . Reason : Changed thread name to official project name
blackbird04217
S3 licensed
Because there is, its almost like the ballast and air restriction, do people drive around with those on all the time? No, because the optimal setting is with them turned off.

Just like the tires. Doing a sprint, 1 to 3 lap race and R1s will be used likely, do a longer race 10 to 15 lap and likely R2s will be used since the R1s will burn up. These are two situations that 90% or more of the players in LFS already know and use. Its rare to find someone who plays with the less ideal performance trade off. R1's would help you in the first couple laps of a race with everyone on R2's, but do you really think you ca get a lead big enough for when you need to slow down from overheated tires.

It is the same principal. If setups were not so personalized to different driving styles everyone would likely get the 'best' setup. But different driving styles require different setups.
blackbird04217
S3 licensed
Quote from diego14br :i dont wanna start out with 900 degrees its TOO hard

Start with it or you never will, but really it isn't any harder than anything else: just get used to it.

@Bose: there is an option in LFS that allows you to turn the wheel past 720 degrees although it doesn't effect the car control. You can watch because the steering wheel in game stops moving. This is essentially driving at 720, you just don't hit the sudden dead point. This is my enjoyable setting anyways.
blackbird04217
S3 licensed
Those video's are quite interesting. I saw BMW clip before, but the under-cam was great, especially watching the tire lift off the ground during hard cornering.

Quote from Crashgate3 :Are there any books or online papers you can suggest for teaching myself how to model this kind of force-constrained mesh?

Did you have a chance to get it and look it over? I'd be interested in feed back since it's my first, and currently only, real technical article.
blackbird04217
S3 licensed
I'm not fully against eating meat as it is normally, although I am also not against this new idea. My first impression is it sounds horrid. But taste, nutrition and other factors are more important than a first impression. To be honest, imagine long ago when hunting was the only way to feed the community/family. Then someone comes up with the grand idea of 'growing' animals to eat. I am sure they were just as disgusted with that idea as it seems that a lot of people here are with this new idea.

People fear new. But this could be a great thing, if taste and nutrition can compare with true meat. It could be more efficient in feeding the billions of people in the world.
blackbird04217
S3 licensed
Quote from PLAYAPIMP :Feels so shitty on KB havent tried it on wheel yet

This is not an accurate test of any sort of simulator in my opinion. If I never retried LFS when I got a wheel I would have said it sucked via keyboard as well . . .

Let's face it, digital input just has lacking issues! The gas pedal is not an off/on switch.
blackbird04217
S3 licensed
Might look similar in many ways, I havn't driven it so I don't know if it feels the same. I didn't notice tire deformation, and one would have thought you would with those huge truck tires! Also in/car or driver view seemed really buggy/strange with the steering wheel.
blackbird04217
S3 licensed
I wouldn't think the license plates need colors? So when setting the value remove all the color code from it allowing 8 characters still? Would probably be an easy solution, I think?
blackbird04217
S3 licensed
Hmm, actually I misread your post. I read it three times over, but after examining the picture more I see that the effect, could, be noticeable. Although as I did say, it would require a change to the spring system which I do not think I am updating at this time until I find additional features I want to add to the tire itself. I think as a base Deformable Tire it is pretty much what I was aiming for.
blackbird04217
S3 licensed
Right, though as a visual effect how notice-able is that when you really sit with a camera and look for it? I think you wouldn't notice the effect much at all really. I created limitations when I deleted many of the springs that used to 'hold' the tire together. One limitation is: Tread width is always the same, and is not bendable. Nor are the sidewalls bendable. The center of the tread is the only point that really can move, the edges of the tread just follow it.

Where you have a valid point it would be neat to see, I don't think the effect would be seen too well, just like the longitudinal deformation really isn't seen all that well. I was about to make a video showing that deformation, but even looking for it, and exaggerating the effect did not help. (Though I know it is there because when the effect was exaggerated enough it was noticeable and looked bad :schwitz

Thanks for the idea though!
blackbird04217
S3 licensed
I like! Okay, just made a small update to the tire. I have completely changed the positions of the springs. They still effect the Center Line of the tread like they did in the video, except coming from completely different spots. Testing shows it to be almost identical, though I now have the ability to remove 2 springs if I want only lateral deflection. After running some tests with longitudinal deformation I don't know if it will be worth keeping. The visible difference is tiny.

However, the benefit of the four springs in the new position is complete control over sidewall stiffness vs the outward force from the rim to the tire. Which should mean, if ever used on a car, that tuning the deformation should be easier to make the sidewall look stiffer!

Thanks guys for the ideas, or at least for getting me to come up with the idea as I read your posts!
blackbird04217
S3 licensed
I almost misread what you said to just having springs that can change the stiffness. But I see what you mean now, so that the spring acts differently to horizontal forces vs vertical forces. While this is completely possible, I think it is also a bit overkill for a simple effect. The easier way, using already existing spring code, is to attach springs in the proper direction, some based on the sidewall stiffness and others based on air pressure. Though, I will keep in mind what you have said, who knows, in the end it might be what is used.

The old spring system had so many springs it wasn't funny, for some reason I had believed that more springs would stabilize the tire. And it did, to a degree. But the new spring system has fewer springs, and close to the same appearance and behavior. I won't say that the cpu cycles spent on updating that old tire was outrageous, but the new one being less than 10% is a lot better. I am thinking about a way to add no more than 2 more springs to achieve all other desired effects. Even if I have to rearrange the 4 that I have now.

Which just gave me a great thought that I didn't think of before . . . :doh:
blackbird04217
S3 licensed
Quote from danowat :Broke the 5km barrier tonight, wasn't easy, but I never expected it to be

Onwards and upwards

Awesome. Glad I didn't have to go any faster than my own speed during my walking adventure... Course it was with different situations . . . but still. I commend your efforts!

EDIT: Hmm, maybe I oughta try reading the remainder of the thread now?
blackbird04217
S3 licensed
The original spring structure that I made the tire from would have. However the current version uses only four springs attached from the rim to the center of the tread. This has an effect on the lateral force, but is also attached to the vertical force as well. So increasing the spring strength would make the sidewall stiffer but at the exact same time it would also make the tire more resistant to being pressed toward the rim. I have been trying to think of a way to re-add this ability without losing the performance I gained from the optimization.
blackbird04217
S3 licensed
Let me dig up the one I wrote back when I first did this. I really need to write a second article on it. But It will certainly give you a good idea into the Point Mass System, and how it works . . . I will PM you when I find it.
blackbird04217
S3 licensed
Wow, I hadn't quite thought of it that way - but yes that would be a much better way then my thought of changing all the spring strengths based on the air pressure. But that is an interesting idea, to change the springs dynamically based on the compression ratio of the springs... Will certainly think more on this.
blackbird04217
S3 licensed
I can't help completely, but I am sure SoftTH can support this; I know I read somewhere in the ReadMe or the SoftTH page that you can have it as different resolutions for the side monitors.

SoftTH would be the option for you though, since a window stretching like that is really trusting the operating system a bit too much... And that is why it is slow.

Why does only one of your graphics cards work in Fullscreen, wouldn't one do the rendering and the other only be used for copying an image to the third screen? (Or is that what you mean by only one card works in Fullscreen mode?)

Good luck.
blackbird04217
S3 licensed
Quote from Crashgate3 :Really impressive

This is exactly the kind of thing I'm trying to learn at the moment, with the intention of getting a job in the games industry one I've finished my degree.

That is great, and the advice I would give you is practice, study, practice, and just keep working on your own side projects. Self-motivation is a huge advantage here. About the jobs in the industry, heh that seems to be touch and go, and right now I am having some difficulties with that part, even with a project under my belt. Though in all seriousness, its a lot about who you know, and being in the right place at the right time - as it is with almost anything.

Quote from tristancliffe :
1. Would it be possible to show the sine wave contact surface as the ground plane?

Hmm, I don't quite know what you mean, and if I do get what you mean I don't quite get the purpose. As the contact patch shows the movement here already.

Quote :
2. Can your system handle multiple contact points - i.e. say the ground and the edge of a kerb, or can you only handle a single point?

This is a very interesting idea, and in theory it certainly should be able to, assuming I wrote the collision detection to handle multiple points. Currently the ground collision is not even true collision as I simply check if a spot on the tire is below the ground, then it is automatically assumed that it is part of the contact patch and put back to ground level.

So, if I actually added a more advanced collision system, the tire should be able to handle it.
blackbird04217
S3 licensed
Anytime you want, PM for details
blackbird04217
S3 licensed
How about like a 5hp lawnmower engine? I think that might be a little annoying to use but could you imagine the force it can apply?

Sorry for the joke, as I don't really have any good information to add. Humor, is always good though!
blackbird04217
S3 licensed
That's great and all, but how do I survive if I don't have any money - no job, and this tire deformation certainly won't make me money! Do you see tree's, and even some form of decent graphics in the 'environment'? I didn't but I could be blind. No but honestly, funding is my restriction. Probably the only one. I just took 6 months off to complete a life dream, I can't just do them back to back, although it would be amazing - it just doesn't work that way

Maybe, someday, when I have enough money to fund myself and some teammates and feel a bit more confident in the ability to make a track environment come to life.
blackbird04217
S3 licensed
Hmm, I don't really know. This started as a project just to learn about simulating tire deformation, and seeing what I could come up with. The tire is created procedurally, as is the point mass system holding it together; and it handles tire sizes in real measurements. The graphical improvements came because I wanted to use this for a demonstration to try getting my next job... Now, of course I have things that I wanna add to this, but at the same time I am not making any sort of promises, including to myself. Some basic ideas of what I would like to implement:

Dropping the tire from a raised height to get the PointMassSystem to bounce the tire/rim back up, I think this would be amazing.

A small 'test track', of a highly detailed mesh, that the tire rolls along and deforms to very small bumps.

Add accelerating/braking forces to the spinning of the tire, which would add longitudinal deformation. (This deformation is already proven possible by changing the axis that sine wave affects).

In theory, the spring system should be stable enough to handle lateral deformation, longitudinal deformation and even twisting of the contact patch. The twisting has not been tested, and lateral and longitudinal deformation together has not been tested. -Though the only twisting that can not occur is the tread. It is currently assumed that the tread is always parallel with the rim, this is what gave a massive speed boost, cutting the springs down by more than half and adding stability. I think with proper placement

--------

There is no simulation in mind, though that would be a dream! I already know I don't have the time or know-how to do that, and would obviously need a good team of people to even attempt it. Maybe in another 10 years? Ha! But really, this was just a side project, that turned into a tool to get a job.

Glad you guys like it. Sorry for my (always) wordy response.
My Own - Deformable Tire Simulation
blackbird04217
S3 licensed
Back in January 2009, I started working on a little Deformable Tire in my spare time. I quickly ran out of spare time to make enough money for my adventure. Since I've been back I've spent a few more weeks programming this, and had some optimizations that helped a lot.

This is not to be compared to the LFS Tire Physics, new OR old.

My tire is deforming from a contact patch on a sine wave. Meaning, I set up a value that make the deformation look 'right'. Of course this is a little exaggerated to show deformations. But remember that it is not placed on a car that is turning.

TireSimV2 on Youtube HD
TireSimV2 on Youtube Low

In the video I explain a few of the techniques that I am using, a Point Mass System in laymen terms is a collection of points connected by springs, in this case, to hold the structure together. It took some time to come up with my old structure: Old Youtube Video: January 8th. While I was on the trail I thought of, and drew up what I felt would be a more stable tire, and have a lot better performance from removing several springs. I implemented that when I got back, and also added a rim, texture, lighting and a few other graphical improvements so I can use this demonstration to find another programming job - with any luck.

I figured as a racing community it might be nice to hear positive input.

Remember: This tire is not simulating driving forces or anything besides the contact patch on a sine wave, which means it is very simplified. It is not competing with LFS tires in anyway, and that is not the reason of my post. I just hope a few people enjoy and leave constructive comments.

Thanks for checking it out!
Last edited by blackbird04217, .
blackbird04217
S3 licensed
Not that I am up for cannibalism or killing humans, but;

I don't get why people are so put off by human MEAT. We slaughter cows, chickens, pigs and many other animals for MEAT. Eating is part of survival, and where "meat" comes from is irrelevant - a body died in the process: be it human or something us humans are "ok" with killing... This has to do with the fact that Humans believe they are better than other species. Of course, in survival "each species" does everything it needs to.

Slighty on topic rant; Why do vegetarians, (those who eat no meat and argue about the fact of saving animals), not care about saving plants. Is it because just as the previous situation; Mammals believe they are better than plants?

Slightly off the topic rant; why is it humane to put a dog to sleep if they are suffering, but yet its not possible to do this to a human in the same condition?

(Going to stop here before I add too many thoughts to ponder.)
FGED GREDG RDFGDR GSFDG