Brainstorming: Stronger vs. Faster?

Re: Brainstorming: Stronger vs. Faster?

Postby hiker » 01 Aug 2011, 02:40

Hi,

ok, I am adding more stats. Now the output is:
{l Code}: {l Select All Code}
Number of frames: 10113 time 186.836014, Average FPS: 54.127680
Name            start   end     time    av.speed        top     skid    rescue  rescue  expl.   expl.
                                                        speed   time    time    count   time    count
emule           1       5       163.37  34.81           0.05    17.43   0.00    0       6.83    14     
chinchila       2       7       164.77  32.01           0.05    18.35   1.20    1       1.67    21     
suzanne         3       2       157.77  27.04           0.04    16.03   0.00    0       2.85    14     
beastie         4       4       162.99  32.18           0.05    19.78   0.00    0       2.77    16     
wilber          5       8       165.75  28.68           0.05    13.92   0.00    0       7.83    18     
beagle          6       3       159.99  30.00           0.04    13.50   1.20    1       1.78    14     
mozilla         7       6       164.64  28.19           0.05    22.00   1.20    1       1.75    18     
pidgin          8       9       168.55  35.27           0.05    18.82   0.00    0       3.85    18     
nolok           9       1       156.06  31.13           0.04    16.37   0.00    0       1.80    20     
min 156.056015  max 168.552963  av 162.654405

So it also counts how often a kart was rescued/exploded (and how much time it spent in those animations), and also the overall skid time (the speed of the kart would be lower while skidding). And I just realise that something is still not entirely correct, top speed of 0.05, and 18 rescues taking 7.83 seconds ;) I am fixing this tomorrow, but thought it's still worth giving you all a preview.

Let me know if you want anything else (or even better, just patch karts/kart_with_stats and modes/profile_world appropriately and send in a patch ;) )

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Brainstorming: Stronger vs. Faster?

Postby Kinsu » 01 Aug 2011, 03:56

Nice stats :D

Just a suggestion, but this is only in prevision of the AI improvements thus not very urgent :
- How many bonuses were taken,
- how many bananas were taken,
- how many small nitro tanks, how many big nitro tanks.
User avatar
Kinsu
 
Posts: 476
Joined: 15 Mar 2011, 14:28

Re: Brainstorming: Stronger vs. Faster?

Postby Funto » 01 Aug 2011, 20:35

Just a note, I recently discovered the AntTweakBar library, that lets programmers add very simply graphical interfaces for changing values used in the game in real-time.
Maybe this could be useful in this case, so that the parameters could be tuned without having to restart the game...
Funto
 
Posts: 459
Joined: 09 Dec 2009, 13:47
Location: Bordeaux, France

Re: Brainstorming: Stronger vs. Faster?

Postby hiker » 03 Aug 2011, 02:55

Funto {l Wrote}:Just a note, I recently discovered the AntTweakBar library, that lets programmers add very simply graphical interfaces for changing values used in the game in real-time.
Maybe this could be useful in this case, so that the parameters could be tuned without having to restart the game...

Well, feel free to add, just make sure you #ifdef that it's not necessary for 'normal' coders. Then again, I am not sure if this is worth the effort - I would hope that once the physics are updated, there wouldn't be much need for this anymore.

I've fixed the code, and also (in r9412) removed the artificial throttling of the FPS which was still applied even though I was running without graphics. This gave a decent speed up (so it simulated 2739 frames per second ;) ). The numbers are more reasonable now as well:
{l Code}: {l Select All Code}
Profiling 20 laps
Number of frames: 44007 time 16.064001, Average FPS: 2739.479492
Name            start   end     time    aver.   top     skid    rescue  rescue  expl.   expl.
                                        speed   speed   time    time    count   time    count
adiumy          1       6       733.32  22.89   28.29   12.80   1.20    1       2.00    1
wilber          2       1       725.40  23.14   30.41   8.12    0.00    0       6.00    3
nolok           3       4       732.05  22.93   27.41   8.97    0.00    0       2.00    1
elephpant       4       5       732.52  22.92   32.47   10.92   0.00    0       16.00   8
tux             5       2       727.37  23.08   32.12   7.75    0.00    0       8.00    4
beastie         6       3       729.93  23.00   28.03   11.88   2.40    2       2.00    1
min 725.400330  max 733.315063  av 730.096375

We have a new contributor (coug36) who will pick this up, and add more stats. This is done atm on a separate branch (http://supertuxkart.svn.sourceforge.net ... statistics). Just one comment: too many stats might not be useful, since you might spend long hours just trying to deduce certain things from the stats. Also it might just be that with many karts the results are just too random(?). I had adiumy coming out first, last, first, fifth, ...

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Brainstorming: Stronger vs. Faster?

Postby Funto » 03 Aug 2011, 12:51

Cool coug36 joined :)

For AntTweakBar, the thing is its integration process is made to be very straightforward, and it could be used for all kinds of parameters, not just the physics that are being tuned now. Think of AI parameters, distances for weapons, etc etc etc.
Funto
 
Posts: 459
Joined: 09 Dec 2009, 13:47
Location: Bordeaux, France

Re: Brainstorming: Stronger vs. Faster?

Postby hiker » 03 Aug 2011, 23:45

Funto {l Wrote}:For AntTweakBar, the thing is its integration process is made to be very straightforward, and it could be used for all kinds of parameters, not just the physics that are being tuned now. Think of AI parameters, distances for weapons, etc etc etc.

Sure - just be aware that some parameters are more difficult to change while the race is on, since they might be set somewhere in the physics. Also be aware that the number of parameters is rather huge, so you have to sort them properly.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Brainstorming: Stronger vs. Faster?

Postby coug36 » 05 Aug 2011, 01:43

Yes, I am here! Unfortunately I have been under the weather since I started work on this, hopefully I'm feeling better over the weekend and can add your requests. I'd also be willing to take suggestions on the format of the profile data, if you have thoughts about that.
coug36
 
Posts: 16
Joined: 30 Jul 2011, 11:13
Location: Seattle, WA, USA

Re: Brainstorming: Stronger vs. Faster?

Postby coug36 » 06 Aug 2011, 08:43

Counts for items picked up (bonus, banana, small nitro, large nitro, bubblegum) are now on the statistics branch. Clearly, printing it in lines to the command line isn't the most flexible output, especially if your tabs aren't 8 characters wide.
coug36
 
Posts: 16
Joined: 30 Jul 2011, 11:13
Location: Seattle, WA, USA

Re: Brainstorming: Stronger vs. Faster?

Postby Funto » 06 Aug 2011, 09:29

You can simply make an HTML table and log it to a file :)
Funto
 
Posts: 459
Joined: 09 Dec 2009, 13:47
Location: Bordeaux, France

Re: Brainstorming: Stronger vs. Faster?

Postby hiker » 07 Aug 2011, 10:01

Funto {l Wrote}:You can simply make an HTML table and log it to a file :)

Please no html. A simple text file is much easier to post-process - e.g. you can use it immediately in gnuplot (which could be useful to see correlations between various columns).

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Brainstorming: Stronger vs. Faster?

Postby Maxxametar » 07 Aug 2011, 10:10

How can I use the non-grafik mode?
Maxxametar
 
Posts: 8
Joined: 03 Jul 2011, 15:22

Re: Brainstorming: Stronger vs. Faster?

Postby Funto » 07 Aug 2011, 11:08

Yup but with an HTML output you can have directly the graphs in the result, without any post-process...
Both could be supported anyway, right?
Funto
 
Posts: 459
Joined: 09 Dec 2009, 13:47
Location: Bordeaux, France

Re: Brainstorming: Stronger vs. Faster?

Postby Kinsu » 07 Aug 2011, 16:31

coug36 {l Wrote}:Counts for items picked up [...] are now on the statistics branch.

Nice ! I think with all these stats, we will be able to make precise tests :)

Maxxametar {l Wrote}:How can I use the non-grafik mode?

In the terminal :
{l Code}: {l Select All Code}
./supertuxkart --no-graphics
User avatar
Kinsu
 
Posts: 476
Joined: 15 Mar 2011, 14:28

Re: Brainstorming: Stronger vs. Faster?

Postby Tuxfan » 08 Aug 2011, 22:35

Drivelines & tweaked karts: If the physics of light, medium and heavy karts differ to much, the driveline system has to be adopted.
Example: Heavy ai karts seem to have trouble to climb the steep hill on the hillside track (addon).
In fact climbing the hill with heavy karts is quite challenging for human players, too :)
I see two solutions:
a) solution by testing: if there appear significant differences between heavy/medium/light karts while testing, the testers should give feedback to the modelers to improve the driveline layout. // maybe it would be useful to show red dots on the minimap where ai-karts have been rescued, in stk-developer-mode.

b) solution by analysing: maybe the "driveline engine" can be improved. e.g: heavies bots should react faster, if they are about to leave a driveline. Or probably bots could consider forces, which appear while driving through curves.
Tuxfan
 
Posts: 92
Joined: 09 Mar 2010, 21:16

Re: Brainstorming: Stronger vs. Faster?

Postby coug36 » 09 Aug 2011, 02:05

hiker {l Wrote}:
Funto {l Wrote}:You can simply make an HTML table and log it to a file :)

Please no html. A simple text file is much easier to post-process - e.g. you can use it immediately in gnuplot (which could be useful to see correlations between various columns).

Cheers,
Joerg

What about CSV? That could easily be translated to any XML-based format, and from what I understand, is supported by gnuplot as well.
coug36
 
Posts: 16
Joined: 30 Jul 2011, 11:13
Location: Seattle, WA, USA

Re: Brainstorming: Stronger vs. Faster?

Postby Auria » 09 Aug 2011, 02:41

CSV would be good, easy to open in Excel/Calc
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Brainstorming: Stronger vs. Faster?

Postby Kinsu » 09 Aug 2011, 04:06

Tuxfan {l Wrote}:Heavy ai karts seem to have trouble to climb the steep hill on the hillside track (addon).
In fact climbing the hill with heavy karts is quite challenging for human players, too :)

This is the biggest problem I found with this configuration : I made the beginning of the acceleration of heavy karts slow, and the one of light karts really nervous, and this effect is increased on a slopped road (going up)...
Ideally, light karts should accelerate slower in this situation, and heavy karts should accelerate just as on a horizontal road (small engine vs. big engine).

If someone finds values that enable this behavior, please tell :D

Tuxfan {l Wrote}:If the physics of light, medium and heavy karts differ to much, the driveline system has to be adopted. [...]

I agree. The AI will need a refresh when kart parameters will be changed, so that the kart systems can take in account physics parameters. Heavy karts will also be more likely to try to bump light karts than the contrary :p
User avatar
Kinsu
 
Posts: 476
Joined: 15 Mar 2011, 14:28

Re: Brainstorming: Stronger vs. Faster?

Postby Funto » 09 Aug 2011, 08:33

Kinsu {l Wrote}:Ideally, light karts should accelerate slower in this situation, and heavy karts should accelerate just as on a horizontal road (small engine vs. big engine).

Well, we could also cheat in code...:p
Funto
 
Posts: 459
Joined: 09 Dec 2009, 13:47
Location: Bordeaux, France

Re: Brainstorming: Stronger vs. Faster?

Postby hiker » 09 Aug 2011, 14:17

Auria {l Wrote}:CSV would be good, easy to open in Excel/Calc

Fine. Mostly people here on the thread should reply, since they are the ones using the stats ;) Just don't spent too much time on this, I don't consider important enough to spent time on fancy output formatting.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Brainstorming: Stronger vs. Faster?

Postby hiker » 09 Aug 2011, 14:52

Funto {l Wrote}:
Kinsu {l Wrote}:Ideally, light karts should accelerate slower in this situation, and heavy karts should accelerate just as on a horizontal road (small engine vs. big engine).

Well, we could also cheat in code...:p

There is a reason why I was postponing this till after the physics improvements in 0.8 ;) But one idea: we could add a parameter that would define how much a kart is affected by gravity (or better: direction of gravity) ... hard to explain: atm the gravity for a kart is always pointing down. We could define the direction of the gravity of a kart to be a weighted average of 'down' and the normal of the track. So no difference while driving on a flat surface, but if you are driving uphill, it would have the desired effect of feeling more like driving on a flat (i.e. more acceleration). In the extreme case (direction of gravity of kart = direction of normal), karts would actually stick to the ground (and in a looping they could park upside down ;) ). On the other hand, when driving downhill you might be a bit slower (no component of gravity is pulling you forward), but you might actually be able to drive better (since you will have better contact with the track).

Modifying the direction of gravity is something I want to have a look at at 0.8, so besides defining this per texture we could easily make this dependent on kart as well.

Just an idea ;)

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Brainstorming: Stronger vs. Faster?

Postby Funto » 09 Aug 2011, 18:32

A good idea indeed, I am really looking forward to this as it opens a lot of possibilities I think :) (think of the game Rollcage, if you know it...).
One suggestion more: make the final gravity vector depend on the current speed of the kart, so that in a looping, you could not just stop in the middle and not fall, but if you go fast enough it all works good :)
Funto
 
Posts: 459
Joined: 09 Dec 2009, 13:47
Location: Bordeaux, France

Re: Brainstorming: Stronger vs. Faster?

Postby Kinsu » 10 Aug 2011, 03:32

This gravity change depending on the speed would simulate a kind of centrifugal force, which is exactly what we need for loopings Image

I must admit I was originally a little bit reluctant to this kind of trick, but apparently so far it worked for STK, so I am changing my mind ^^ (also I already tried to make a car with the NewtonSDK physics engine -- which I found very powerful -- with realistics forces, i.e. wheels that turn and their friction with the ground makes the car move, etc. and this did not work very well... so maybe it's simpler to add artificial forces when and where we need them)
User avatar
Kinsu
 
Posts: 476
Joined: 15 Mar 2011, 14:28

Re: Brainstorming: Stronger vs. Faster?

Postby hiker » 10 Aug 2011, 09:23

Kinsu {l Wrote}:This gravity change depending on the speed would simulate a kind of centrifugal force, which is exactly what we need for loopings

Afaik conso tried to do looping, and they already worked fine with the current physics (assuming enough zippers to bring you up to speed ;) ).

I must admit I was originally a little bit reluctant to this kind of trick, but apparently so far it worked for STK, so I am changing my mind ^^ (also I already tried to make a car with the NewtonSDK physics engine -- which I found very powerful -- with realistics forces, i.e. wheels that turn and their friction with the ground makes the car move, etc. and this did not work very well... so maybe it's simpler to add artificial forces when and where we need them)

At this stage we don't have too many tricks - some tweaks to ensure that the wheels are on the ground as often as possible. And some artificial friction to stop karts from going to steep uphill (without enabling real skidding, which was found to be too difficult to handle).

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Brainstorming: Stronger vs. Faster?

Postby coug36 » 13 Aug 2011, 06:50

hiker {l Wrote}:
Auria {l Wrote}:CSV would be good, easy to open in Excel/Calc

Fine. Mostly people here on the thread should reply, since they are the ones using the stats ;) Just don't spent too much time on this, I don't consider important enough to spent time on fancy output formatting.

Cheers,
Joerg

This is done in the statistics branch - CSV output to wherever you have your output directed (stdout/log file). I'm going to check the feasibility of running no-gfx mode without a window appearing, and work on some optimizations (i.e. the kart models don't need to be loaded in no-gfx mode)
coug36
 
Posts: 16
Joined: 30 Jul 2011, 11:13
Location: Seattle, WA, USA

Re: Brainstorming: Stronger vs. Faster?

Postby coug36 » 13 Aug 2011, 09:50

Kinsu {l Wrote}:
coug36 {l Wrote}:Counts for items picked up [...] are now on the statistics branch.

Nice ! I think with all these stats, we will be able to make precise tests :)

Maxxametar {l Wrote}:How can I use the non-grafik mode?

In the terminal :
{l Code}: {l Select All Code}
./supertuxkart --no-graphics

In the statistics branch, I disabled the creation of a new window when running --no-graphics from the command line. I did a fair amount of testing, but let me know if you run into any instability. I'll leave it to the discretion of the leads as to if/when this gets merged into the trunk.
coug36
 
Posts: 16
Joined: 30 Jul 2011, 11:13
Location: Seattle, WA, USA

Who is online

Users browsing this forum: Bing [Bot] and 1 guest