Page 1 of 1

Release: Tech Eval

Posted: 29 Jun 2011, 17:49
by CommanderSpice
Tech Eval:
This widget logs unit create/destroy events and resource data. The logs can be used to plot buildorders:

Image
Commander cannibalized at around 4:30 - 5:15

The logging part is the 'dbg_techeval.lua' widget. To plot the diagram 'techEval.py' is used, which requires python and matplotlib.

To create a logfile just enable the widget. The logfile is written to ${HOME}/.spring/TechEval on linux. If you are running a replay, it cranks the speed up to 20 and automagically exits at GameOver.
If you are not running a replay, obviously only the observeable players/units are logged.
The widget watches also for the first creation of certain BA units for each team. Theese are at the moment: adfus, krow, buzzsaw and vulcan.

To plot the diagramm run techEval.py in your python interpreter.
Usage: ./techEval.py <logfile> <teamname> [ [starttime]-[endtime] ]

Some examples:
  • Code: Select all

    ./techEval.py ${HOME}/.spring/TechEval/20110624_131905_DeltaSiegeDry_0.82.7_BA.log Lam0r -15:00
    Plots the first 15 minutes for team 'Lam0r' of the game.
  • Code: Select all

    ./techEval.py ${HOME}/.spring/TechEval/20110624_131905_DeltaSiegeDry_0.82.7_BA.log N00b
    Plots the whole game for team 'N00b'.
In the matplotlib window you can pan+zoom and there is an 'save as png' option.

Limitations:
Resource/unit donations i.e. coop tech strategies are not revealed.
TeamID sharing is untested.

Thanks to:
[RG]_Alex for the example data.

Changelog:
  • 1.0: initial release

Re: Release: Tech Eval

Posted: 29 Jun 2011, 18:02
by knorke
cool!
Can you explain a bit more how the graph is to be read?
Every building gets a line from time of creation to time of death?
dotted line means building in progress?

But you did the same mistake as me, creating a logfile and creating the graphic with an external programm.
Nobody knew how to use my external program and I fear your phyton script will have the same problem.

Re: Release: Tech Eval

Posted: 29 Jun 2011, 18:28
by CommanderSpice
knorke wrote:Can you explain a bit more how the graph is to be read?
Every building gets a line from time of creation to time of death?
dotted line means building in progress?
That is right.
  • small dot = started building unit
  • bigger dot = finished building unit
  • x = unit destroyed
knorke wrote:But you did the same mistake as me, creating a logfile and creating the graphic with an external programm.
Nobody knew how to use my external program and I fear your phyton script will have the same problem.
I know and the uglyness of this approach causes me physical pain. But for Linux users at least it will be as easy as 'sudo apt-get install python-matplotlib' or something like that. Windows users will be helped here. :twisted:

One could set up a webservice which takes a log and does the plotting, but I am not interested in setting that up.

Re: Release: Tech Eval

Posted: 29 Jun 2011, 18:50
by knorke
You should make it combine buildings of the same type.
Instead of a new line for every solar, have one line that gets thinner or thicker depending on number of solars.
One could set up a webservice which takes a log and does the plotting, but I am not interested in setting that up.
I did that with a bot that would lurk in the battleroom. It would notify the stats creation program when the game was over, make it create the stats, upload and then give a link in chat. But of course that was more for testing and for the lulz rather than a usefull solution.

Would be much better if those stats would be visible ingame.
(could maybe still save via http://springrts.com/phpbb/viewtopic.php?f=23&t=26270 or screenshot)

I think the main/only advantage of an external program is how you could compare multiple plots, ie find the quickest nuke-tech out of 1000 replays.

Re: Release: Tech Eval

Posted: 29 Jun 2011, 22:41
by CommanderSpice
knorke wrote:You should make it combine buildings of the same type.
Instead of a new line for every solar, have one line that gets thinner or thicker depending on number of solars.
Good idea. That would make visualizing spams possible. I wil look into that.
knorke wrote:I think the main/only advantage of an external program is how you could compare multiple plots, ie find the quickest nuke-tech out of 1000 replays.
I was aiming in this direction. What is the minimum time for adfus, and how is it done? Got krowed in the 11th minute? Plot it, optimize it and repay the favor in the next game. :wink:

Also AI training could be done on the data of many replays. SkynetAI would act and react like the player who got out of a situation classified as similar to the one at hand with an advantage. But it looks like i haven't time for that right now.