FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login
    The current pre-release of the client ("pioneer" in the version) is only compatible to itself. So you can only play with other testers. Please be aware!

    Build order optimization simulation? Possible?

    Scheduled Pinned Locked Moved Modding & Tools
    6 Posts 5 Posters 73 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      c0rtex
      last edited by c0rtex

      I am an Astro whore, nay glutton and I constantly try to improve build order optimization/speed depending on certain roles/situations/skills of team members. I imagine this could be useful for other maps too. I am wondering if it would be possible to build a mod that allows a player to setup a private lobby, add a "Builder Order Optimization AI" and let it build based on certain criteria that the user sets. Or maybe the build model could be simulated another way outside of faf?

      Curious if this is a thing? Maybe it has been done before?

      1 Reply Last reply Reply Quote 0
      • N Offline
        Nomander Balance Team
        last edited by

        It's definitely possible but it's not easy. The biggest hurdle would be the game's performance stopping you from doing general-purpose machine learning approaches. I think on zulip someone reverse engineered a basic simulation of the game but I'm not knowledgeable on the matter.

        There's some work towards build-order infrastructure:
        @seraphim-noob has worked on a build order recorder mod ("BO Logger" by Seraphim-Noob). The description says the data is for use in a BO analyzer which I found on his github here: https://github.com/TimMasalme/Bo-Analyzer
        @sheppy has a website with build orders in text form manually input from players. https://fa-companion.services.atlantishq.de/maps

        In my personal opinion build orders are solvable almost analytically. Your context would be mass costs and mass-seconds (for travel time). The target builds would be a sequential list of builds to achieve at what timing, since splitting focus between 100% the target or eco should always be the fastest way to build something. Once a target is achieved you can add its impact on mass/energy production to your economy's state and continue ecoing to the timing of the next target.

        S 1 Reply Last reply Reply Quote 2
        • S Offline
          Seraphim-Noob
          last edited by

          I had an approach that looked like this:
          A sim mod with two modes.

          1. Record Mode: It simply recorded all my movements, orders, positions, etc., and saved them to a .txt file. This .txt file could then be used by the BO Executioner, an external application that was able to display all the eco stats and also toggle the Record Mode to the second mode: Execution Mode.
            With Execution Mode activated, you didn't have to click anything. The engineers would execute exactly the orders you had previously recorded, at +10 sim speed. The idea was that if you wanted to make a change at minute 5, you wouldn't have to replay the first 5 minutes over and over again at -10 speed.
            It was never designed to be fully automated, but rather as a helpful tool to increase the speed at which you could manually improve the build order yourself.
            I feel like, at the moment, humans are simply too good at finding the right solutions compared to AI. AI needs thousands of errors to eventually find something good, whereas a human can narrow it down to maybe 5–10 possible approaches and then just try them out.
            Anyway, I eventually hit a wall because, after a few minutes, the engineer orders would start drifting apart, and the simulation was no longer deterministic. That caused me to transform the whole project into a smaller little helper. This helper is what eventually became what Nomander posted.
          1 Reply Last reply Reply Quote 0
          • S Offline
            Seraphim-Noob @Nomander
            last edited by Seraphim-Noob

            @c0rtex said:

            Or maybe the build model could be simulated another way outside of faf?

            in theory yes - in practice no
            the issue is that you'd need to simulate the whole engine. the engie doesnt go at its max speed and then stops. it accelerates and brakes. and 1000 other minor things like that will add up which then will cause a massive diff between your simulation and a real game

            but you can pick up my approach - the ai can read all the orders of each engie, it can now every metric (where which treegroup is and how much mass it contains etc) and it can read all eco stats - so in theory you could use the ai just for the work that originally i intended to do manually. if thats better...idk. especially for astro crater it is very simple to find the optimal bo

            1 Reply Last reply Reply Quote 0
            • SheppyS Online
              Sheppy
              last edited by Sheppy

              A tool that analyzes BOs automatically and suggests changes does not currently exist. But it is a long term goal of the FA-Companion, as is a minimal outside FA-engine simulator focusing on eco streaming, build times and path times (with very simplified pathfinding).

              SeraNoob has made a quite nice display for BOs which is currently on the dev-branch, which will show you your own BOs and where you stalled - but it's not gonna be a good fit for Astro or even Gap (nor am I personally interested in optimizing for these maps, sry :D).

              What you can already do, is transcribe BOs yourself in the Markdown Editor and safe them for yourself and other to use.

              1 Reply Last reply Reply Quote 0
              • ZLOZ Offline
                ZLO
                last edited by ZLO

                would be cool to just have AI repeat your inputs from previous game.
                So you can make a test map that has 16 copies of the map
                Then you test your build and export your commands
                then you test your build again but now you choose second spawn while you put AI on a 1rst spawn and make it repeat your prevous BO so you can see differences in real time.
                Then you repeat and you will be able to see 16 different BOs in one replay (as a disadvantage - all those BOs need to be manually played by you)

                Also would be cool to try to play against such AI
                You could take some pro build order and try to practice against it

                Edit: afaik currently people just record videos of their own builds so they can rewind around and play multiple videos at the same time

                TA4Life: "At the very least we are not slaves to the UI" | http://www.youtube.com/user/dimatularus | http://www.twitch.tv/zlo_rd

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post