TripleA Logo TripleA Forum
    • TripleA Website
    • Recent
    • Popular
    • Register
    • Login

    Creating a (hopefully) competitive bot using Claude Code.

    Scheduled Pinned Locked Moved AI
    50 Posts 7 Posters 229 Views 7 Watching
    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.
    • TheDogT
      TheDog @Cernel
      last edited by

      @husky81
      You and Claude have been busy! 🤯

      So much info to absorb.

      So tempting to customise just for one map and very hard to keep it generic like the TripleA AIs.

      The list of tried and tested tactics is awesome.
      Having a list like that allows the Claude AI to 'try' the neutral tactics and for it to learn if they work on its new current map.

      For me a standout is

      Keeping tanks inside the main stack instead of one step behind: detrimental (a nice confirmation of the owner’s principle).

      On maps like 1941GCD, this is a valid Russian tactic. But for Germany , I cannot afford not to keep the German tanks out of the Attack stack. I guess its map dependant?

      Its fab to see the win ratio has increased, well done!

      https://forums.triplea-game.org/tags/thedog
      https://forums.triplea-game.org/topic/3741/curated-best-top-maps-triplea-guides

      H 1 Reply Last reply
      Reply Quote 1
      • RogerCooperR
        RogerCooper @Cernel
        last edited by

        @Cernel said:

        If you manage to create an AI which plays V5 better than Hard AI, that would be awesome. I would definitely try it out! Let us non-developers know when and how we can eventually test it.

        I'm wondering if using V6 might help you fine tuning V5 even more than using V5 itself. V6 is a very unforgiving map since the start, and I believe it is much easier to beat Hard AI on V6 than on V5.

        Minor note, there is the problem that the current best TripleA AI is called "Hard". If you make a better AI, how is TripleA going to inform users to use that as the first choice? Calling your AI "Very Hard AI" or changing the name of "Hard AI" to "Medium AI" something else? I wonder.

        It could be called the HuskyAI.

        B 1 Reply Last reply
        Reply Quote 1
        • B
          beelee @RogerCooper
          last edited by

          @RogerCooper

          Yea "Husky and Claude" 🙂

          1 Reply Last reply
          Reply Quote 0
          • C
            Cernel Moderators Lobby Moderators @husky81
            last edited by Cernel

            @husky81 said:

            One thing that worked well on the minimap, was showing it examples of "Good" play, and having it try to extract rules from what it saw. If you have any save files of completed games on world_war_ii_v5_1942, they could be useful.

            That's a great idea! Unfortunately, I've never played that map beside maybe once against the AI when @zjelcop was doing those AI challenges many years ago (and I don't kown anyone who plays it). I remember that it was one rare map which the Hard AI was playing quite well, whereas the same AI was much worse at playing V6 (which is the closest map to V5 by rules).

            To be clear, "world_war_ii_v5_1942" is a map, so you cannot play it unless in the sense of playing either of its games, but I know that you mean the "World War II v5 1942 SE TR" game of that map (not the other one) unless maybe you actually meant that you are interested in game-saves of either "World War II v5 1942 SE TR" or "World War II v5 1942 Second Edition" (probably not)?

            On a second thought, if this AI is optimized on V5, maybe it will be better to call it "WW2v5 AI" or something like that. Anyway, I'm overreaching.

            H 1 Reply Last reply
            Reply Quote 0
            • H
              husky81 @Cernel
              last edited by

              @Cernel said:

              optimized on V5, maybe it will be better to call it "WW2v5 AI" or something like that. Anyway, I'm overreaching.

              yes, you're right. I would be looking for games using the TR setup. However, at the level that I am working at now, examples of "good" play on either setup would be useful as data points.

              The way I am programming the bot is map and rules agnostic, so it can read in the rule set and territories from the triple A map file, then use its logic to play the given map. It values territories by: Capital status, IPC value, connectedness to other territories, factory slots. I do not tell it that India is valuable, it should find that out by looking at its central location and its 3 production slots.

              One caveat being that the bot is currently quite slow on WW2v5, so any larger map would really slow it down. Once I get it to be good, I will try to optimize more for speed, hopefully allowing for play on larger maps.

              1 Reply Last reply
              Reply Quote 2
              • H
                husky81 @TheDog
                last edited by

                @TheDog said:

                @husky81
                You and Claude have been busy! 🤯

                So much info to absorb.

                So tempting to customise just for one map and very hard to keep it generic like the TripleA AIs.

                The list of tried and tested tactics is awesome.
                Having a list like that allows the Claude AI to 'try' the neutral tactics and for it to learn if they work on its new current map.

                For me a standout is

                Keeping tanks inside the main stack instead of one step behind: detrimental (a nice confirmation of the owner’s principle).

                On maps like 1941GCD, this is a valid Russian tactic. But for Germany , I cannot afford not to keep the German tanks out of the Attack stack. I guess its map dependant?

                Its fab to see the win ratio has increased, well done!

                To clarify, it only keeps the tanks outside the main stack when safe (at least that's the intended behaviour), it may still mess up. That's trickier in the mid and late game as Germany on a normal map, because the rear tank stack has to contend with air plus naval units coming in. I still play like that in some positions though, a stack of tanks and new infantry in Baltics connecting Germany to Karelia, the Baltic tanks defend both landings in France and put pressure on Arch, Finland and West Russia. Of course once the Allies have enough Units in Finland, this becomes unenable.

                TheDogT 1 Reply Last reply
                Reply Quote 1
                • TheDogT
                  TheDog @husky81
                  last edited by

                  @husky81
                  For future maps. The current TripleA AI is poor at Naval strategy.

                  In particular one very big improvement would be the reuse of transports in Global maps.

                  In detail, this is the USA returning empty Transports from Europe/Normandy/Torch back to the USA for a refill, to be reused again.

                  https://forums.triplea-game.org/tags/thedog
                  https://forums.triplea-game.org/topic/3741/curated-best-top-maps-triplea-guides

                  H 1 Reply Last reply
                  Reply Quote 1
                  • H
                    husky81 @TheDog
                    last edited by

                    @TheDog said:

                    e current TripleA AI is poor at Naval strategy.

                    In particular one very big improvement would be the reuse of transports in Global maps.

                    In detail, this is the USA returnin

                    Transport logic is an active area that I'm working on, though it is far from solved. The challenge is to keep transports moving to useful squares, while remaining protected.

                    TheDogT 1 Reply Last reply
                    Reply Quote 1
                    • TheDogT
                      TheDog @husky81
                      last edited by TheDog

                      @husky81
                      Well 🙂

                      Another biggy is picket fodder/Destroyers.

                      Meaning that they screen Transports or a Carrier/battleship strike stack.
                      Placed 1 Sea Zone away from from the above so Surface fleets cannot easily attack the above.

                      https://forums.triplea-game.org/tags/thedog
                      https://forums.triplea-game.org/topic/3741/curated-best-top-maps-triplea-guides

                      TheDogT 1 Reply Last reply
                      Reply Quote 0
                      • TheDogT
                        TheDog @TheDog
                        last edited by

                        I only play my own global map 1941GCD, as Britain/USA I line my Transport route with Destroyers, meaning they dont have to move .

                        This tactic should work for most global maps?

                        Maybe this is a valid option for HuskyAI ?

                        https://forums.triplea-game.org/tags/thedog
                        https://forums.triplea-game.org/topic/3741/curated-best-top-maps-triplea-guides

                        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
                        • 1
                        • 2
                        • 3
                        • 2 / 3
                        • First post
                          Last post
                        Powered by NodeBB Forums