Learning from watching people drive isn't the most useful. Knowing what they were thinking and 'how' they tried something is the largely useful. The problem is finding people that understand how to explain this, and being able to read the ones that can't. It is a known fact that reference points tell us where we are and what we do. But besides that, not much more can be said from my end I wouldn't mind watching a replay of someone driving a track for the first time, if they were to give a solid writeup answering several questions I could come up with, but like I said it is a problem with finding people who know how to explain, or can explain well enough that I can understand. Basic English is not what I mean by that statement either, though I would be willing to bet most programmers already knew that, I just wanted to clarify.
Ok, please read all of the current paragraphs before making a judgment as there are some big statements that I don't want to be taken the wrong way. First though I answer your question, no I do not have any experience with ANNs, and I am not sure there is much interest for them on this exact project. Whilst I have been considering having the AI learn, it is beyond the scope of this project due to desires and knowledge. Though I do not consider knowledge a bound in any situation, I just need to read and learn which is not fearful to me at all.
Ok, but this is the kicker, and I don't want people to run away thinking Noob, run away!. I have very limited AI experience, though if you read my document and most of the thread you can see I have knowledge of the common techniques. So I just don't have the experience in practice. I can only think of a few projects, one being my RacerX project a few years back, where I added AI. RacerX had a track that could be created out of tiles, 90 degree turns. I wanted an AI driver that could traverse the track, regardless of the shape. Notice quickly was not part of my goal. So I took a conventional approach, added information baked into the tiles and had AI following a track, regardless of shape. However, even when the AI tended to come to a stop before turning I did not continue editing and adding; my goal was complete and I probably learned a few things on the side.
Now the important part, the low-level stuff that will have a lot of non-programmers running if they haven't already. I may not have vast amounts of experience working with AI, but I do consider myself very knowledgeable about general code design. My favorite part of coding is designing the core, from foundation up, and the building it and watching great things happen. Not always good things, but it is great when reasons finally click of why something doesn't work. My aim for this project has never been about fast AI. It is simply about running away from the normal AI approach to answer the questions; "Why is AI and physics almost always combined? Why does the AI need more accurate information than a human would get? How can the information be detached, and limited? Can the AI still traverse a track with limited knowledge?" I think you get the idea. So, being completely honest, I do not care if this fails, horribly horribly fails.
Assuming I get some of my questions answered, those above and many more in my head, I will call this project a great success. Because designing the code structures is my favorite part, but knowing why a structure works and more importantly how it does not work is the reason that code design is my favorite part. But if someone came and answered my question, "The AI needs to know about physics because. . ." I would be right back immediately with "Why?" just like my little niece, in that toddler stage, why why why, how?
So the goal is to learn, more than to create AI that work. And even if the AI work I don't see them being fast unless I spend much more time on the project.
Okay, now time to switch into another gear and talk about the project itself. I don't plan on adding a sound interpretation for the tires, the physics system will interact with an AI sensor, but the AI will not know the numbers involved or know about the physics system itself. This will likely make sense later. As far as starting with the normal layer of information and then stripping it away, I feel it would be too much to do. As you can see the project is experimental and from the ground up it uses different information than a traditional system. You are correct in saying it will pinpoint issues, and if I was getting paid to do this or the outcome of fast AI was a priority then I would almost *need* to go that route to keep fixing the correct problems. However from above you know that this is about structure, and limitations of design and simply learning about the ideas here. And in that situation I think building the system as I see fit, and finding where the time will be spent just based on incoming issues will be easier than possible. I am quite confident that I can pinpoint the reason something is mis-behaving even in a multi-sectioned project. Though I will not deny the truth, it would be easier to do so one piece at a time.
I have started the designs on paper of how this will be achieved, if pursued into the development stage. The huge unknown at this moment is in the Reference Points. What do they contain, and how do they contain it. Direction and Distance is the easy part, with distance being estimated using rand. Based on the actual distance, and angle from view direction. Making it harder to estimate distances on objects further away or in the peripheral vision. But that information alone does not tell the AI driver anything. So possibly the driver sees a reference point, looks into their memory, which has some sort of script or input knowledge. This area is fuzzy because it is the limits of the current design. So the thread will certainly become more technical, and programmers can see what I am actually trying to do. Also non-programmers please don't hesitate to add anything you want to "how you drive". I am most interested in learning how the human drives, as I am trying to mimic the process.
Post? Don't you mean posts? There has been quite some discussion going on. By the way one thought I had was for the AI to pickup hints from what the player does. I am thinking during 'development' time I would race the track with some mode for the AI that records my input changes based on the reference points then the AI simply plays back that memory each time. Though it would be different obviously due to the estimation error in the ref points. I have yet to decide on the technical part here.
My guess would be take the interpretation as you want it since it is a competition. I could be wrong though since I am not the one running it. Props on the idea though, sounds interesting and good luck with participants. This should create some interesting layouts.
Why does the AI need to know their exact X,Y on the track if you don't. I don't think they do, but I think like you said they need to know their position - relatively speaking - to each object around or near the track. I will place a large wager on the fact that you use reference points more than just braking and turning. And part of that wager extends to the fact that you will not get around a corner just fine without these reference points.
I made an example above:
I don't think your intention was to say that reference points were unneeded, but I think that reference points are 'all' you work with. The only difference is the number of points your mind handles vs the number that the AI will handle.
I almost always drive at 'pedestrian pace' when learning a track for the first time. I don't know what I am supposed to be surprised about here though, so I would like to know what to look for and I will certainly be up for trying it!
As for emulating the estimation and building the AI to be perfect - adding imperfections later. I don't know how much you understand about the project at this point, I don't know how much you have actually read in the thread or document that I wrote, but I am trying to go against the normal way of thinking about AI. I havn't started the technical designs of this system - which might be useful for the programmer side. I don't want to add imperfection later, though the imperfection in the estimation will happen based on some sort of algorithm or setting based on how the AI settings and such.
I have other opinions on a few things here. One being that you can feel the aero on the car. I agree existing knowledge tells me that more speed = more downforce therefore more traction in most situations, but that you can feel that, is where I disagree. Sure, you can feel it in G forces or speed increases around corner, but that you can read it, feel it change etc is something I don't think you can. (You can to a degree by knowing that all of a sudden you are understeering because you read that your front wheels lost traction. You can associate the loss of traction with the aero based on knowing you just got behind a car.)
I see. I understand now what you mean and the AI should take that into consideration based on judging their cars traction limits at each tire. Trying to keep the tire "AT LIMIT" as much as possible without pressing beyond the limits.
I have been reading several books on racing, as far as the driver and basic setup skills are concerned, for the last few years.
I would like to know more about what you mean from this statement. Sure I understand it to a point but I don't think the human uses anything more than reference points; I don't know if you read the part where we do use different type of ref points in different ways, but reference points is the only information about the track that we use.
You are completely correct, the human has 'hundreds' of points along the left, and right side of the track. And these points are mostly used only to know how wide you can go without hitting grass; where to pass a car, and as you said the angle of attack around a specific corner. But all in all these are still reference points, and in the human mind only used by estimation. It is this estimation that causes mistakes, and also allows the car to regain control by detecting the mistake.
--------
You did add an entire element that I overlooked during my investigation into this though; resource management. You are completely correct that during a race, especially a long race, the driver should be aware of their tires, fuel and other resources that have wear.
I also overlooked, in a sense, the aerodynamics of some cars. I am trying to remove as much of the physics knowledge from the AI. I would like to believe simply 'knowing' an estimation of how much traction each tire has would be enough for the AI driver. I will have to consider a way to keep the AI detached from the physics system while gaining a basic understanding of a car with downforce - that could be tricky.
How does a human mind read how much downforce is on the car at a given time? How do we automatically cope with coming behind a car and losing the downforce?
There are a few questions anyone can answer, though it will be hard because it is probably mostly subconsciously.
You would essentially need to program a sound transferring over the net. Each player that wanted to tune into the channel would download this separate application. It wouldn't need to do anything with InSim at all actually. But transferring sound like that is not a trivial task and would take a lot of bandwidth when tons of players join in. Voice transferring works a little differently because it is fine to have low quality, mis-bits here and there. Generally if noticed its not a terrible thing and ussually can go unnoticed.
With music though quality matters more, I'm not sure why but listen to music over Ventrilo, Team Speak or Skype... You will understand what I mean.
----------
The other alternative is to write this application, and have all the songs and voice files available for download. Watch for copyright infringment here obviously. In this situation all the people who want to listen to the 'radio' would have it on their PC, and only get a few networked messages when they connect to see what song is playing and the current spot of that song...
---------
I don't think this is worth it in the long run unless your planning on making some form of radiostation application where listening to it gives the player a solid form of entertainment. I am not trying to be negative, but consider if people will get an entertainment boost from this when they can listen to WMP or whatever already?
Heh, I understand. And I have put a lot of thought in the few days that I've been thinking of the idea. I wouldn't mind using LFS if two things were to happen: Someone wrote all the stuff that dealt with it. IE: If I had the information my sensors would need available to me, and the AI outputs would automatically work when I would be fine. But I see too many hurdles with using AI to do it, hurdles that wouldn't be their by just writing a small 2D app or something similar.
As far as the language, sorry for my choice. It's just I know C++ in and out. I know a little C# as well, but dealing with it sometimes annoys me. I like the freedom, I guess.
As far as the technical stuff, I have some of it in my head. The biggest hurdle is converting the reference points into usable data. I may need to add an 'ideal line' that is only useful to tell the AI that this is what you want to be AIMING at. Although I have a feeling that then the AI doesn't use the reference points and the idea is back to square one. I know there must be a solution using only the edges of the track, and maybe the AI sensor will always find the 4 nearest track points. 2 for left and 2 for right, and use this to guess at where they should be going if their reference points are not telling them any information...
The technical design of the reference point has not been done yet either. But I know there will be different types holding different things. The most basic holds a direction and length. Seperated only for a more optimized system. The detailed points would have some sort of memory or instructions attached, which the AI could change when they feel something went better.
Be with family, watch the battles commence... Hopefully get a few peaceful programming moments in. Possibly go out for a hike? HA Did enough of that **** this year!
Ok guys, for those that are interested which a few obviously are but not as many as I was thinking, must be the programmer section? Should I ask to move to Off-topic? As my first post says I didn't know where I should put it.
Anyways... For those interested I have attached the PDF document. Its a little lengthy but it describes the thoughts I've been having. If you've read the thread you might find a few things but likely know a lot of what is in it. This is not a technical read, and is actual meant for the general public. I am now starting on the second portion of the document which will go into greater detail of the technical requirements and math of the project. I expect that this will answer my question; Whether I should attempt this project or not.
Please post any thoughts you have on how you think AI gets advantages over the player, and anything related.
I never thought about someone using it as a LAN AI, though that is kinda interesting I still don't know if I wanna try facing all the challenges of integration with LFS, like I said way above, making it for LFS would likely be as challenging as making it work for a simplistic environment.
Yes, I am trying to keep it conceptual still. Like I said I wanna try new, not the old proven techniques. And its more natural to try new from the human perspective: especially since I am trying to eliminate cheats/tricks that racing AI has developed over the years.
My objective is not currently for an optimized algorithm for use in racing games.
Its the programming side that is gonna make me wonder about following through. But from a human standpoint I have a question from you.
On a small track, FE1, SO3, AS1 and such, how many reference points would you think you know of. I mean, in general, for the ideal situation, no car around you to obstruct view.
My guess on a small circuit is probably 75 to 80 points, but I could be wrong.
I have been thinking of how to do these reference points and I thought of something based on what you've written above somewhere.
My original thought had "Detailed Points" close to an action, something that you look at. "General Points" which are far away, you use your peripheral vision on these usually, but you use them during points in time that you can't see the Detailed Point. And then I had "Track Points" the left and right edges of the track, which are only meant as guides. I want to make the AI so that these points are only meant to see if it will hit a wall, or to know if they can move left/right more. But I don't see the left/right points as detailed in anyway. If a curb starts near a turn that would be a detailed point, even if it is near the track point.
But not quite there. I think this will help, the point is maybe the AI gets this "best line" as reference points as well. Just for the knowledge of, that is where I would be under ideal circumstances... However, the ideal line shouldn't contain information about braking/throttle and stuff - that is where I feel the AI does not make "observation mistakes" and "estimations". Sure we know the best line because our brain knows to take a corner wide to keep moving fast. Or to take a corner with a late apex because the long stretch after it. But that line is not our visual cue for braking, accelerating or turning - unless you press 4 in LFS and watch it.
------
Umm I missed a post earlier, just before tristancliffe's first. And it wouldn't work: I don't have line of site using the LFS data... There are hills and cars. The cars I could kinda work in. But it was the last comment on reading the sound data of the tires that got me. You write me some code that opens the mic, records LFS at that moment in time, processes the data and gives me a value stating: UNDER LIMIT, NEAR LIMIT, AT LIMIT and OVER LIMIT from that : / Cause that's scary to me trying to get that info from LFS.
I don't see how sharing it would be a benifit to anyone though as it wouldn't contol an AI driver.
Thanks much for the support and it seems you understood exactly where I am coming from with this project, if I decide to do it. Which seems likely considering the effort I've went into explaining things both on this thread and the document I am writing...
I do *think* that this is not what I am after actually. I haven't truly come with the correct symptom, still writing and thinking about that to be honest. But I think my symptom is: The AI cheats.
By the way, its not only changing what the AI receives for input, but how the AI reacts with the input. In what form is the AI cheating if it see's the cone, that the player sees. Sure it sees it in mathematical values. But there is no way around that. It is seeing the data as an estimation. Which is how the player interprets it. So if this is still somehow cheating please do let me know, I would be interested as I am trying to remove that.
Of course the reaction time would fall under the "super control" category. I may have mentioned it somewhere in the thread already, but I know it is included in my document and covered already. I am almost finished writing this document, (one hour or so), for the general public. And will begin researching and writing the specification part of the document: which will be more technical probably including math, code and good stuff like that. Heh, boring for the average person.
I was thinking, what if it was a restriction that the host can run only 1 InSim app. (Or at least only 1 'main' app.) And the main app is the one that gets priority over things like this. However, this adds a limit that I don't think is good for the InSim protocol since it already supports multiple connections it could be that there are already host-side systems that require this feature.
I think the "Main App" idea would work. The first insim connection will get that slot, which allows special controls over MSO, and anything else that would have a conflict.
I was trying to do this back in Dash for Cash so that the racers could talk and chat normally without being inside the 'chat box' that I made for them. It didn't work because the messages don't get filtered by InSim in anyway that I found.
Hmm, seems my objective is still being misplaced, and will probably be understood when I finish this paper.
On the LFS stuff. I could get the left side, right side info with almost as much work as making a quick environment myself I think. But I would be missing the important reference points of cones, and other trackside things like the billboard. It's hard to say what I mean, but I think these other reference points are more important then the track. It's also extremely important to know I want a line of sight on the reference points.
-----
Please make any repsonses, I am going to try writing my paper as quickly as I can so that you hopefully understand where the project is going and why. The problem isn't a simple effect, and more to the point I don't have an AI system that I am working with. Its not like I have AI working like LFS or something already, if I did and was talking about rewriting everything to test something I would be absurd - especially if it was late in development or something. I am however proposing a new way of doing racing AI. For better or worse.
How would many algorithms be made and known today if someone didn't try them first? Man use to make fire from only sticks, so we are told, and we would continue doing it that way if the person who saw sparks from stones didn't *try* lighting a fire from said sparks... That is probably the most primitive analogy I can find.
I almost missed your post, must have written it while I wrote one. Your probably correct here, but you can also look at your RPM gauge. So in this example the AI can do that. Of course you did just add another point to my simulation - thanks. Which is that the AI can tell the engine speed within some degree, I can usually guess accurately to within about 1000 RPM depending on the car, and would bet people with more sensitive hearing can go to 500 RPM. But anyways, you have added a piece of input to the AI for constant updating. RPM +/- 750. Unless the AI chooses to observe the gauges which will be a very accurate RPM gauge.
If the car has a shift-light I would say the AI can know immediately that it is on. Even in peripheral vision that is easy to detect.
About over-steering / under-steering you're 100% right about the detection can be simple and not cost CPU time and others using the reference points that would take time to get. Two ideas to do this, The way I will likely use is tire sounds, from each of the tires... Though the other idea, less known but is a though is using 4 reference points that are known to a good degree of accuracy by the AI. Previous and Current Positions. Previous and Current Directions. These are not saying collect position code from the physics: but it could. It could also take the two closest reference points. (remember closer reference points are more accurate). What ever it is. And remember them between two frames. Which will allow us to know our direction of travel, and should tell us the direction we are aiming.
However, the more thought about and quite seriously the way I will probably choose is the tire traction data from "sounds". The physics will tell the AI sensor about each tires traction limits. UNDER LIMIT, NEAR LIMIT, AT LIMIT and OVER LIMIT. If your front tires are over the limit and rear tires under/at limit then you are under-steering. If rear tires are over the limit and front are under/at you are over-steering. Pretty simple, and very fast to compute. More importantly it follows the logic that a human can use - though there may be some more known values here depending.
This area is likely the only place where the AI needs to ask the physics system what is happening. It is the only place a human really knows the physics of the world too. Besides knowing that turning the wheel turns the car. Still wondering about that process for the AI, but it will come.
Because I don't have the much needed reference points, and if I made them it would take tons of time - for what I am trying to achieve. I believe you can send commands to set an axis position, though I could be wrong. Either way, LFS would be a great platform tool to use, I wish Scawen would open a few possibilities to me, but it won't happen for security reasons.
True, and false. Remember the objective is not to write the most outstanding AI ever, but to do it based as close to human limitations as possible. Some parts of this will still need to cheat, I think but I am trying to figure out what, and why. Just because something is the norm, doesn't make it best. Its called inventions, there are often times with things are actually better. Not saying this is, or isn't that will be found out.
Do you really? Go sit on a track and tell me exactly where you are. You know the billboard to your left is at coordinate <X, Y> and that the cone somewhere in front of you is at coordinate <X+23, Y-14> (Shooting numbers from nowhere, with no meaning here) Point is, you do not know your exact distance from either of those. Humans do not know where they are, nor do they need to. We can know that we are 10 to 15 meters from that cone, and at this spot is where we begin turning. If the cone is blocked from vision from a car ahead, we use the billboard on our left, we know that when its almost directly to our left is where we start turning. These are very rough estimations.
The problem with using a 2D image that LFS or a sim generates is that it is 2D. The algorithm to reverse engineer that entire image would be very complex, slow and umm, a challenge a lot harder than what I wanna achieve...
As far as your position on track, you don't know it exactly, as I mentioned above. I waited to write this here though: More importantly your exact position is quite useless. Your position compared to these reference points are everything. It is all the brain uses to, as you said triangulate your exact position. So with that, yes you know your position relative to the reference points, but its not your position that tells you to turn - its the reference points. This was an exercise that I did, and am writing in more detail in my paper:
Think of the two corners after the long stretch in BL1 (normal direction). Without starting LFS I can invision this perfectly, and I would bet you can too. You know you have a right hand turn coming up because you remember the bridge and the hill telling you a right comes after the straight. (With never playing LFS with no mini-map you have no idea what comes next.) That, combined with knowledge of the wide corner approach tells you to get to the left of the track. You see the small meter signs counting down, and start braking hard at the appropriate spot - which again is from those ref points. then you see the tires, and turn in towards them.
Now, imagine the world being completely empty; no track, tires, distance markers or bridge. Drive the corner knowing your exact position, but not knowing anything else. You want to get from position <X,Y> to <X+10, Y+10> but you can't drive straight there. You can't do it, well with math you can. But it isn't how you drive. Driving is all based on reference points, and estimations.
The Math.Random() will be called in the Pre-AI step. It will be in the vision sensor where the AI is estimating the distances to each object. I am hoping these estimations will allow the AI to brake at a slightly different spot each time. Have you watch the super 'judgment' of an AI in LFS or 90% of the games? They turn-in, brake and accelerate at the same spots on the track, not making a mistake - (until you enter traffic which is not being talked about yet so irrelevant here).
My goal, if pursued, is to make artificial intelligence circle a track using only the known reference points. That doesn't mean there won't be sub-goals but I am leaving it as that for now, since maybe my posts keep hiding what I say.
Just to be clear, yes I want to traverse the track with only information a human can get. And also with only the controls the human can get. Now that you know what I am doing, the reason is because I want to. I talked with a few friends asking what is lacking from games these days - graphics certainly has become an area that far too many people use to chose the new games and it is extremely annoying. The general consensus was AI. With further thought on what I had been told it hit me, what the entire problem with AI in games actually is. However, it also hit me that that problem doesn't exist in racing AI, but the problem with racing AI is simple, the human generally feels cheated.
Catchup; Where the AI goes fast when you're in front, and slow when you're behind. Great for arcade, console and pick'em up racing, but cheesy for a simulator because real people don't slow down for their competitors . . .
AI Controlled Physics; This is when the AI has different physics that the player car. The players input travels through the steering column, to the wheels and eventually turns the car via physics, while the AI just rotates their car in the direction they want. Sometimes it works by hitting them and they don't budge while you fly out of control. Not to be confused with AI Super Control
AI Super Control; [i]The AI can calculate 'exactly' where they want to place the controller at an 'exact' point in time, and they are capable of doing it. The fastest human can't do this. It takes at least a tenth of a second to shift, with an h-shifter and both hand starting from the wheel, unless you prepare for it. And if you're prepared for shifting it takes at least a tenth to turn the wheel over 180 degrees since it requires the second hand... The AI has no delays.
There are a few other things, and if you have any additional feed back on how AI cheats in racing games, please bring them forth I would like to read them and perhaps put them in the paper I have written. Also you may understand my intentions better when I finish the other paper. I will be sure to post it on here when finished.
Now of course I will play around with the AI after getting it to traverse a track with the human inputs and outputs. It would be nice to see what type of performance the AI can actually achieve, I have high hopes for their level of performance.
Not at all, even if I can't get the AI to traverse, I will have learned something. To me, learning is an invaluable tool that humans are capable of, and you can't learn without being prepared to fail. After all, learning why something didn't work is sometimes more important than doing something correct on the first try and taking it for granted.
Two ways to answer the question.
First as you, and everyone should now know, my goal isn't the most realistic AI possible though it would be an amazing place to end up...
By using these reference points it should make more realistic AI because the AI should be able to drive, NEAR, their same track line each time. But they won't drive the EXACT track line each time. [i]I get that this might not make them fast[/i]. But the point here, is the AI shouldn't have the exact same lap time each lap, they will tend to misjudge where a reference point is now and again. Want harder AI? Just make the reference points more accurate. I think this part of the question will be answered in a lot more detail by my write up.
I really hope this helps clear up some details. Anyone wanna join the cause of the project? Might wanna ask yourself if you are interested, and answer truthfully. It is new. Why be scared?
Last edited by blackbird04217, .
Reason : Spelling Errors
Heh, I do know the scale of what I am diving into. Where as I don't have experience with AI exactly, I do have experience designing code and solving problems with said code. I have a fair understanding of what I am asking of myself, yes I am skeptical about the project, but more because I don't want to waste time making the environment and physics. I am far more concerned with the world and physics than I am about the AI challenges. Even a 2D world, still needs to be made, same with the physics - its required. No matter how basic they are, they need to be written before the AI, and that is actually my main concern, and reason that I have not started the project.
Like I said, the goal here isn't for AI that you would look at and say "OMGWTFBBQ" it more about tackling a situation in a different way. Most games allow the AI to control their car completely thus adding hacks or cheats (in my opinion).
And Vain, your right about the easy part is aquiring the data, the hard part is using that data; made especially easy in this case since there is less data. But the idea here is to make an AI using a human like approach. I sat and envisioned myself driving a few laps, figuring out what is needed and what goes on in our little brain. Besides having FAR more reference points than the AI will get, we actually get very little information. Sounds of the tires represent stages of traction, and even then its not an exact number. But its the reference points I am after.
The only single problem I am having with the AI, mostly because I haven't looked further into it - nor have I developed the code to start trying ideas, is to take said reference points and make use out of them. As said in all the other posts, I haven't commited to the project quite yet. But I am not afraid of the math, and problem solving that it presents me. Actually I look at it as a nice challenge to see what comes. It could totally fail, but then I know I tried, and I know why it failed. I just don't feel motivated to work on the world/physics - which are required for the AI to be tested.
I assume that the concerns displayed here are to be sure I am aware of the challenges, and that you don't want to see someone set themselves up for failure - and I appreciate that concern, thank-you. But do understand, I wouldn't look at failure as a bad thing, I would have learned exactly what about the technique does not work. I've actually started writing an article on the problems I see with *most* current AI approaches, and how the system I wanna try would address these concerns.