SeriousBO

Post here if you want to help developing something for FAF.

SeriousBO

Postby madformuse » 13 Nov 2014, 23:17

I've had an idea for a tool I could make which would help create / understand build orders while helping me learn Python (so I can contribute) and I thought it might be a good idea to see if there would actually be any use for such a tool within the community.

The idea behind the tool is to help you analyze how your resource consumption changed after issuing a bunch of commands along with the times taken to achieve certain goals. Stuff like how long does it take to build a PGEN, Air Factory, Bomber (assist with ACU) and what will my eco look like when I'm finished (probably dead in this case).

I realize you could just try it in game but I thought if there was a tool to help you could try out different sequences more easily to see what would work best.

Either way it would probably be a good starting project for me but does this stuff interest anyone apart from me? :-)
madformuse
Avatar-of-War
 
Posts: 91
Joined: 21 May 2014, 22:21
Has liked: 16 times
Been liked: 10 times
FAF User Name: madformuse

Re: SeriousBO

Postby Dragonfire » 13 Nov 2014, 23:30

Some comments:

The input data are lua tables.
So you must parse lua files.

Have you any experiences in other languages or programming?
My native language is not english, please correct me, because I want to improve my skills # Resource Overview
User avatar
Dragonfire
Evaluator
 
Posts: 559
Joined: 19 Dec 2013, 10:18
Has liked: 39 times
Been liked: 61 times
FAF User Name: Dragonfire

Re: SeriousBO

Postby madformuse » 13 Nov 2014, 23:40

Yes I have a fair amount of experience in c# and vbscript, I've done a few useful things with perl and java as well but not much. That being said, I've still got a lot to learn and I relish the prospect of getting my head around python.

Regarding the unit data, I hadn't decided yet how to keep the stats up to date (parse lua or page scrape unit db) but either way I think it'd probably be better to pre-compile them as they change infrequently. As that is the case I can manually populate the config for now and cross that bridge later.

Do you think the idea has merit?
madformuse
Avatar-of-War
 
Posts: 91
Joined: 21 May 2014, 22:21
Has liked: 16 times
Been liked: 10 times
FAF User Name: madformuse

Re: SeriousBO

Postby Dragonfire » 13 Nov 2014, 23:51

Unit DB is deprecated ...
And you must choose the right language for your purpose ...
You have the choice ^^
My native language is not english, please correct me, because I want to improve my skills # Resource Overview
User avatar
Dragonfire
Evaluator
 
Posts: 559
Joined: 19 Dec 2013, 10:18
Has liked: 39 times
Been liked: 61 times
FAF User Name: Dragonfire

Re: SeriousBO

Postby madformuse » 13 Nov 2014, 23:57

Bad times, when did that happen?

Yes I have a choice but as one of my objectives is to learn Python so I can contribute to the lobby I think I'll go with that.

If it would only be useful to me though it doesn't really make any difference :-)
madformuse
Avatar-of-War
 
Posts: 91
Joined: 21 May 2014, 22:21
Has liked: 16 times
Been liked: 10 times
FAF User Name: madformuse

Re: SeriousBO

Postby nine2 » 14 Nov 2014, 02:44

I'm interested.

I think it's too hard to do.

I can give you a tonne of C# to get you started.
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: SeriousBO

Postby Aulex » 14 Nov 2014, 03:33

You can just parse the faf unit files, like how the database does, but it's probably a lot of work
"Let's start beating ass and die" - drunk TA4Life

"Just because you have a d*** doesn't mean you need to be one...pussy" -Blackdeath

SCOUTING SAVES LIVES
http://imgur.com/YGk0W0o

How to play Sup Com by Ubilaz
http://goo.gl/je83z
User avatar
Aulex
Contributor
 
Posts: 1050
Joined: 17 Nov 2012, 05:29
Has liked: 299 times
Been liked: 225 times
FAF User Name: VoR_Aulex

Re: SeriousBO

Postby nine2 » 14 Nov 2014, 05:33

Or you could even execute the lua with a c# lua engine.

Another strategy is to export it from the game itself with a mod. Downside is you have to run the game but upside is you get everything without having to headscratch about merging
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: SeriousBO

Postby nine2 » 14 Nov 2014, 05:41

I had an idea in mind for a tool like this.
In the tool, you plan your base just like in the game.
The tool keeps track of eco, stalls, etc, over time - with graphs showing how much energy/mass/engies/tanks I have.

Here's the good bits:
1. There would be a time slider so that I could go back in time and make a tweak to the build order - and by observing the graph see how that would have effects five minutes down the track.
2. A way to extract build orders out of replays into the tool. Can evaluate the differences between 50x theta games. Although you can never have a 'best' build order, you can have a best one according to a certain metric (eg: # of t1 tanks produced at minute 5)
3. A way to share build orders online ... someone can fork your BO

This way I can mess around very quickly with 50 versions of the same build orders to learn very quickly what the consequences of things are.

There are heaps of challenges here... to do it awesomely you need to replicate so much of the engine ...
- how the acu will walk if you dont give it a move order
- how the engie reclaim speed will change depending on fac attack move / attack move / manual
- how an engie assisting will change things
- the individual wreck positions and values (i have this one)

You could approximate these things and make something okkkkkkay. But it's a tonne of work so I am working on other things.
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: SeriousBO

Postby madformuse » 14 Nov 2014, 12:46

Glad to hear that there is some interest. Let me see if I can do you responses justice...

partytime wrote:I think it's too hard to do.


I agree, there would have to be limits to make it feasible while hopefully keeping it useful. I think there's a simpler way it can be done though.

Location

What if the program didn't care about the location of Units? You could just tell the ACU to make 4 MEXs and it would dutifully record your instruction and assume that it was possible without walking. This would have the advantage of being able to make build orders that were not map dependent, or to demonstrate some abstract concept like "Is it more efficient to build support factories or assist HQ with engineers?" without usless details like map x, start y. Not to mention it eradicates the need to implement path finding etc. You would obviously still need to be able to include walks into BO but they could be added simply as walk commands for x seconds.

Reclaim

Again I think a simpler approach is required. If the program accepted as input the precise reclaim command or factory attack move it would be almost impossible to actually read the produced build order and very difficult for the program to keep up with the latest patch (would also negate my first point about location). Another option would be to simply have the program tell you how many resources you need to reclaim to prevent a stall by minute x. Possibly label the appropriate engineers as reclaimers or maybe give them some parameters like "reclaim 200 mass in 10 seconds" which the program allows for in the eco.

Adjacency

I think it would be really nice if the program told you how many resources had been saved through adjacency bonus. Without locations this would imply instructing the program where there was an adjacency. Shouldn't be too difficult if you told the ACU to make a PGEN and also selected any adjacent units (like land factory).

Interface

I'm sure this will change over time but I was planning to simply start with a command line that gives you a prompt like "800, 4000 (+1, +20) ACU > " where you'd enter the unit you wanted to make first with the ACU (say LF). The numbers are obviously the current eco information. It would then say something like (-7,-50) which would be consumption while factory is in production. It would print a message like "LF finished 00:30" and then give you the prompt "440, 2500 (+1, +20) LF > ". You get the idea. When you enter an empty line it prints the build order in text format along with total resource consumption, time taken and end eco information.

So general thoughts are that this tool would be to
- Help understand consequences of commands as regards to resource consumption
- Facilitate communication (which you alluded to with your online share example). I can imagine a text description of a build order like you see on the forums with instructions for 1st eng, 2nd eng etc.

Regarding the Unit build time, resource cost stats, I don't think it makes sense worrying too much about this without a program that can use the information. I don't think it will be a problem when the time comes especially if I just picked specific information from specific files but it could obviously become as complicated as it needed to be (being able to tell what can make what from LUA instead of hard coded).

partytime wrote:I can give you a tonne of C# to get you started.


I would love to take a look at what you came up with if you don't mind me having it, thanks.

Can you see any deal breakers with my approach?
madformuse
Avatar-of-War
 
Posts: 91
Joined: 21 May 2014, 22:21
Has liked: 16 times
Been liked: 10 times
FAF User Name: madformuse

Next

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest