Page 1 of 1
Posted: 27 May 2010, 08:03
Citywalker
Hey.

I'm trying to get MOH's Peterbilt to behave somewhat more logically on track, but I can't make much sense of the car AI in the parameters.txt file -- it's very vague.

The best I can currently do is to transplant the AIs of various stock cars, but this is such a hatchet-job! Besides, they're not capable of any improvements on their own, anyway.

If anyone knows anything about these parameters, let me know! This needs to be figured out. What my current hunch is, is that the Under... things are for distances and ranges before the next AI node in the track, and Over... things are for distances and ranges after such nodes. But it's crazily time-consuming to test them all like a monkey... Although if nobody knows anything more, I might just need to do that
:unsure:

Posted: 27 May 2010, 12:51
miromiro
Hm... try taking some parameters from a stock car and 'tune' it.
Good AI doesn't mean to drift or slow or bad handling.

Good AI means that the car must win on the places 1, 2 or 3 when the CPU uses it. It must beat you or at least it must stay close.

I know some good car AI guys like Manmountain, Aeon, TheMeandMe and Adamodell. Try asking these people, but still, I'd suggest reading about them right here.

Good luck! ;)

Posted: 27 May 2010, 15:37
MOH
from my experience, giving a car a faster "SteerRate" (somewhere around 3) and a high "SteerRatio" (around -0.45) makes the cars stay straight, and on the racing line.

my cars have lower steerrates to make the car drive smoother as a person driving it, as i think they are too twitchy, but thats just my opinion.

also inertia effects how revolt drives the cars, where more makes the cars sway offline.

edit: if you look at what i think are the two best ai cars, from other peoples tests, which i think are humma and volken turbo, they have the highest steerrates. i know this isnt the most important part of car ai, but ive noticed it makes lots of difference, without changing the car feel.

Posted: 27 May 2010, 18:20
jigebren
Citywalker wrote:What my current hunch is, is that the Under... things are for distances and ranges before the next AI node in the track, and Over... things are for distances and ranges after such nodes
Maybe this can help a bit in your investigation. Here are more explicit names (found in source code) that the ones used in "parameters.txt" in section "Car AI details". I think it helps having a better idea of the effect of each parameter.

Code: Select all

UnderThresh  understeerThreshold;
UnderRange  	understeerRange;
UnderFront  	understeerFront;
UnderRear    understeerRear;
UnderMax    	understeerMax;
OverThresh  	oversteerThreshold;
OverRange    oversteerRange;
OverMax      oversteerMax;
OverAccThresh  	oversteerAccelThreshold;
OverAccRange    oversteerAccelRange;     
PickupBias      // Bias for random priority choices (0-15)
BlockBias      	// Base desire to block
OvertakeBias    // Base desire to overtake
Suspension      ?
Aggression      looks like it is not used in the game...
Also, it seems that what they call "oversteer" is when "rear velocity is significantly larger than the front" (while I would have rather though it means that the car is turning too much, something like that).

Posted: 27 May 2010, 21:07
Citywalker
Oh-kay, this gives me a lot of more information. Thanks, guys!

Posted: 27 May 2010, 21:29
GWC
Thanks Jig - adding the missing word - 'steer' - makes sense of the car AI, if, like me, you think of the cpu cars as 'line-following-robots'.

What I do, if I think a car has particularly bad AI, is to open its parameters and move all the under and over figures a little bit closer to that of Humma. If I get to Humma's values, I then start moving towards Volken - the odd thing about these 2 sets of figures is that they are totally different.

Incidentally, from the end of 1999 to early 2000, I raced with all cars set up as rookies; this meant that, whichever car I selected to race, the comp chose from all the stock cars (I hadn't started using custom cars). I checked the finishing positions of the cpu cars and awarded points - 10, 6, 4, 3, 2, 1 - for the 1st 6 cars to finish. The points totals scored, for over 1,000 races, showed that Humma was the best cpu car, with Cougar in 2nd place; Volken was in the top 6, which, considering that it is 10MPH slower than the top cars, makes it a remarkable performance. I believe it is this result that MOH is referring to - I mentioned it here, a couple of years ago, when Aeon raised the subject.

Geoff

Posted: 29 May 2010, 10:03
Citywalker
Jigebren, I have looked and looked at the source code (revoltsource.awardspace.com), and I can't find where these parameters are used. What do you know that I don't? :)

Posted: 29 May 2010, 19:10
jigebren
It's quite simple: the source code you're talking about is for the PC version, and seems to correspond to the early stage of development of re-volt. The xbox source code looks very much close to the released re-volt version, once you've removed all the modifications done to adapt it from PC to xbox (quite all modifications were properly commented). Unfortunately, I don't know if it's available online...

Posted: 30 May 2010, 14:27
Citywalker
Urnemanden was so nice to provide me with a download of the source you talk about. <bows> Thank you, Urnemanden! :) On the other hand, it looks like Geoff’s efforts in determining Humma and Volken as the best AIs all around have paid off as well – HummAI is good! I think it will be easier in the short term to try Humma’s AI with all the various custom vehicles needing a whack upside their “heads”, and to leave the actual studies of the AI for when I have more time...

Posted: 20 Jun 2010, 21:15
Manmountain
jigebren @ May 27 2010, 01:50 PM wrote:
Citywalker wrote:What my current hunch is, is that the Under... things are for distances and ranges before the next AI node in the track, and Over... things are for distances and ranges after such nodes
Maybe this can help a bit in your investigation. Here are more explicit names (found in source code) that the ones used in "parameters.txt" in section "Car AI details". I think it helps having a better idea of the effect of each parameter.

Code: Select all

UnderThresh  understeerThreshold;
UnderRange  	understeerRange;
UnderFront  	understeerFront;
UnderRear    understeerRear;
UnderMax    	understeerMax;
OverThresh  	oversteerThreshold;
OverRange    oversteerRange;
OverMax      oversteerMax;
OverAccThresh  	oversteerAccelThreshold;
OverAccRange    oversteerAccelRange;     
PickupBias      // Bias for random priority choices &#40;0-15&#41;
BlockBias      	// Base desire to block
OvertakeBias    // Base desire to overtake
Suspension      ?
Aggression      looks like it is not used in the game...
Also, it seems that what they call "oversteer" is when "rear velocity is significantly larger than the front" (while I would have rather though it means that the car is turning too much, something like that).
The last 5 elements of the 'Car AI Details' are related to the AI Nodes(.Fan file) of the track and their assigned function.
The values are from 0 to 10 in chunks of 3276.6 rounded down to the nearest whole number.
The higher the value the more chance of that action taking place.
The Aggression element does indeed not seem to be active as not any value seems to show any obvious effects.
To add to Humma and Volken Turbo, I find the AI of Dr Grudge and Bertha Ballistics to be quite challenging.

Posted: 21 Jun 2010, 00:12
Huki
When I keep the Under/Over values of humma to very low values (below 30), the AI has no problem driving in nhood1, but in nhood2, it just keeps accelerating and braking repeatedly as if it is struck in a place.
Another thing is, how the AI wheels turn when they are stopped (when the race is finished). When the back of the car is hitting the wall, the wheels turn rapidly. So the Under/Over values could mean how cars react when someone is pushing from the back or front, how (fast) they recover from a crash, or how they turn.
And maybe these values are based on the speed and control of the car (based on the rest of the parameters), and that is why they are different for each AI?

About Volken comming in 6th place, the 7th and 8th cars probably have nearly equal speed and also bad AI :P

Posted: 27 Aug 2010, 07:33
Abc
there are some custom cars worse than player almost always worse :P