TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    Can AI Players without Capitals Purchase/Place Units?

    Scheduled Pinned Locked Moved Map Making
    17 Posts 6 Posters 4.0k Views 6 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.
    • ElreighE Offline
      Elreigh @Elreigh
      last edited by Elreigh

      @elreigh said in Can AI Players without Capitals Purchase/Place Units?:

      I found an alternative solution, wherein I set the impassible territories to be the player capitals, thus accomplishing a "player without a capital" situation, but this feels like a sloppy workaround to fix a feature that is, according to POS2, already in the game.

      I just tried this; everyone can place units and the game no longer crashes, hooray! But the AI still doesn't place units. It is able to, it just chooses not to. Even in the Bid phase, it doesn't buy units. The AI just stockpiles its resources indefinitely.

      EDIT: I let the game run for a few more rounds, eventually the AI (easy) started building units, but on different rounds. It's round 6 and one AI still hasn't bought anything, sitting at 300+ PUs.

      EDIT2: Have just tried a game with "Fast" AI, which seems to work fine. Ideally I would like a true no-capitals situation, but I think I can live with what I've got as it is.

      1 Reply Last reply Reply Quote 1
      • ElreighE Offline
        Elreigh
        last edited by

        Alright, after some playtesting I've found that the AI can, and consistently will, place units in impassable territories during the "bid place" and "random start" phases. Even if I put unitPlacementRestrictions on all units to keep them from being placed in the impassable territories, the AI can still put them there. I guess the bid and random start phases don't check for placement restrictions.

        I'm thinking that I'll have the impassable capitals under neutral control at game start, and then give ownership to the players after all of the bid placements have occurred, thus preventing the AI from placing units in their impassable capitals. But that opens a whole other can of worms and I'm pretty sure that if they don't have capitals in the first place then they won't be able to place units at all.

        wc_sumptonW General_ZodG redrumR 3 Replies Last reply Reply Quote 1
        • wc_sumptonW Offline
          wc_sumpton @Elreigh
          last edited by wc_sumpton

          @elreigh
          I'm almost certain that 'bidPlace' does not follow 'unitPlacementRestrictions' and I am not sure how 'randomStartDelegate' does thing. And a territory with a 'territoryAttachment' '<option name="isImpassable" value="true"/>' should stop both types of placement. If it does not then maybe you'll need to create a bug report.
          But its hard to say what is happening without some idea of whats in the xml.

          Sorry I can't be of more help.

          Cheers...

          1 Reply Last reply Reply Quote 0
          • General_ZodG Offline
            General_Zod Moderators @Elreigh
            last edited by General_Zod

            @elreigh

            Take a look at ww2v3 1941. The china there has no capital but still places units based on territories it owns. This can be altered to collect income and purchase for factories too.

            Also some AI's don't function well. Hard AI usually is ok when it comes to this.

            C 1 Reply Last reply Reply Quote 1
            • C Offline
              Cernel Moderators @General_Zod
              last edited by

              @general_zod In "World War II v3 1941" "Chinese" has 1 capital (Mongolia).

              1 Reply Last reply Reply Quote 0
              • FrostionF Offline
                Frostion Admin
                last edited by Frostion

                As @General_Zod says, there are small differences in how the AI handles maps.

                The Easy AI is kind of outdated. I don't think that anyone is updating the Easy AI code anymore. It can't handle players without capitals as far as I know, not even small players not meant to be played. I had this problem when making Dragon War with all the small AI nations, like pirates, trolls, barbarians etc. I also did the trick with fake capitals in impassable territories, but I eventually removed them again.

                The Hard and Fast can handle no capitals. In most of the maps I have writen in the notes that the map is not compatible with Easy AI, but needs Fast or Hard AI.

                Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

                C 1 Reply Last reply Reply Quote 3
                • C Offline
                  Cernel Moderators @Frostion
                  last edited by

                  @frostion Years ago Veqryn said that Fodder used to work with no capitals (but I don't recall it did), and this bug should be fixed. This is the ticket I made almost 3 years ago:
                  https://sourceforge.net/p/triplea/bugs/1125/

                  1 Reply Last reply Reply Quote 0
                  • FrostionF Offline
                    Frostion Admin
                    last edited by

                    @Cernel Yes it is an old problem, and I don't know if it is fixed with the Easy AI. It may have been. Here is the discussion about it from 3 years ago (you also join the discussion on page 45):
                    http://tripleadev.1671093.n2.nabble.com/AI-Development-Discussion-td7585227i860.html#a7589083

                    Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

                    1 Reply Last reply Reply Quote 1
                    • redrumR Offline
                      redrum Admin @Elreigh
                      last edited by redrum

                      @elreigh Easy AI is essentially deprecated at this point and I eventually plan to remove it. Please use Fast AI, Hard AI, or Does Nothing AI when testing maps.

                      TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                      C 1 Reply Last reply Reply Quote 0
                      • C Offline
                        Cernel Moderators @redrum
                        last edited by

                        @redrum I guess with "Fodder" you mean "Does Nothing"? I believe "Fodder" is just the old way weak AI was called, before being renamed "Easy".

                        redrumR 1 Reply Last reply Reply Quote 0
                        • redrumR Offline
                          redrum Admin @Cernel
                          last edited by

                          @cernel Yeah, fixed it.

                          TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                          1 Reply Last reply Reply Quote 0
                          • ElreighE Offline
                            Elreigh
                            last edited by

                            @redrum Ah, that's a shame. Fast AI and Hard AI run far too slowly on my computer, although I have tested using them it usually takes around five minutes per player. Easy AI runs much more quickly so that's been my go-to for testing.

                            C redrumR 2 Replies Last reply Reply Quote 0
                            • C Offline
                              Cernel Moderators @Elreigh
                              last edited by

                              @elreigh This has been already discussed, and some may remember I agree with this point. The other item may be that some maps, like Feudal Japan FFA for the Minor Clans, require a randomish AI, but I don't think that was ever supported; just a few mapmakers using it such (also TWW used to mention to use Fodder for the AI players).

                              1 Reply Last reply Reply Quote 0
                              • redrumR Offline
                                redrum Admin @Elreigh
                                last edited by

                                @elreigh You'll want to make sure you have enough memory set and Fast AI should be considerably faster than Hard AI. I'd have to test your map to see what is slowing it down.

                                TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                                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 / 1
                                • First post
                                  Last post
                                Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums