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

    Handling of AI players not meant to be played - Github request.

    Scheduled Pinned Locked Moved Feature Requests & Ideas
    37 Posts 4 Posters 20.7k Views 4 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.
    • redrumR Offline
      redrum Admin
      last edited by

      @Cernel @Frostion So I thought a little more about this and realized we should probably have the option to set the default player to "Does Nothing AI" as well.

      So instead of:
      isAIDefault="true"

      Something like:
      defaultPlayer="AI" or defaultPlayer="DoesNothing"

      Thoughts?

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

      FrostionF C 2 Replies Last reply Reply Quote 0
      • FrostionF Offline
        Frostion Admin @redrum
        last edited by

        @redrum I have never used the does nothing AI for anything else then testing, as a way to get through the player list quickly to the point where I can take control of a specific player.

        But maybe your idea is good for any future versions of AI players? Like AggressiveAI, AirFocusedAI, MindlessAI? Just a thought 😁

        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 0
        • C Offline
          Cernel Moderators @redrum
          last edited by

          @redrum
          Beside testing, I only use does nothing in FFA as a quitter substitute. It also automatically accepts anything, and this is a behaviour that was set (by veqryn) after I requested it, for lost FFA players (initially, it used to refuse everything, which is the behaviour for unused players, but not really good when you want to turn some player passive in a FFA).
          I don't actually know why Does Nothing does an initial placement, instead of actually doing nothing.
          In TripleA, "Player" means the in-game one, not the one playing it, that it is the PlayerType, thus:

          playerTypeDefault="Does Nothing"
          playerTypeDefault="AI"
          playerTypeDefault="Human"

          Default to "Human" if not set.

          As said, my only problem with "Does Nothing" is that it does an initial placement instead of actually doing nothing, and this is a bit confusing and I don't get it. I'm not sure if maybe this was intended by Veqryn for Risk?

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

            @Cernel
            Basically, what I was saying, is that the most important gaming use I see for "Does Nothing" is when you play 3+ sides games and one or more of the players quit and they get turned to "Does Nothing" (that also accepts anything). Of course, this is of no relevance in 2 sides games, since they just end when one quits.

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

              @Cernel So TWW is an example of where "Does Nothing" is used for neutral nations. @Zjelcop Put in a feature request a while back requesting that as well: https://github.com/triplea-game/triplea/issues/457

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

              HeppsH 1 Reply Last reply Reply Quote 0
              • HeppsH Offline
                Hepps Moderators @redrum
                last edited by Hepps

                @redrum I was going to say something....

                If I remember correctly Do nothing buys... but does not move at all.

                "A joyous heart sours with the burden of expectation"
                Hepster

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

                  @Hepps It buys and it places but it also destroys all income, which implies that, normally, it can buy only on the first turn of the game for that player. I don't actually know what this behaviour is for; I suggest asking Veqryn in GitHub (as he doesn't read here).
                  As said, myself, beside testing, I only ever use Does Nothing for do what it says, assigning it to players of quitters in FFA (if we don't want to turn quitters to an actual AI, which I'm tendentially against to, for FFA meant not to be played with AI, to start with).

                  @redrum I would take that issue out of "ice box", based on the new directives, as it looks like this topic is on it.

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

                    I actually seem to vaguely remember that Veqryn created Does Nothing mainly for FFA, for some reasons, but maybe I'm wrong here, and not at all. I can see no other alternatives but asking Veqryn exactly what the behaviour of that AI is for, if he still remembers, unless there is some documentation somewhere, about it, or anyone wants to delve into the old forum, in case. Also remember that if you want just to disable a player, you can do it unticking its "use" (I don't do that for Napoleonic Empires FFA quitters (or other politic FFA), because that would set as refusing all politics, while I want neutralised players to accept all, which is the Does Nothing behaviour).

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

                      @Cernel Another item of the un-use vs set to Does Nothing is that un-use removes all phases; so you may have players you want them to do nothing, while not losing their phases, in case of triggers firing. Like a game presenting the option of having, either, some players active or neutral-like (for example, I could make the "Neutral" of 270BC into an "AI_Barbarian" player, and tell in notes to set it to "Does Nothing", if people wants it to be just like the old Neutral stuff).

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

                        @Cernel @Frostion I've made the latest changes to allow setting default player type in game XML: https://github.com/triplea-game/triplea/pull/2048. Once the next version is released then I will update Pact of Steel 2 XML.

                        So there are 2 new player properties:

                        • defaultType - optional, default is "Human"; options are "Human", "AI", "DoesNothing"; sets player to this type by default in the player selection window
                        • isHidden - optional, default is "false"; options are "true", "false"; if true doesn't show player in player selection window

                        Examples:
                        <player name="Germans" optional="false" defaultType="AI" />
                        <player name="Italians" optional="false" defaultType="DoesNothing" />
                        <player name="Japanese" optional="false" defaultType="DoesNothing" isHidden="true" />

                        @Cernel If you want to discuss "Does Nothing" purpose or changes then let's open a different thread so we can keep this focused on game XML settings for players.

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

                        C FrostionF 3 Replies Last reply Reply Quote 1
                        • C Offline
                          Cernel Moderators @redrum
                          last edited by

                          @redrum Cool. I suggest also explicitly informing that when you set isHidden true you are also usually (but not necessarily) supposed to set the same player not to Human. Otherwise some might get confused and think that if something is hidden then it is not selected or even disabled.

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

                            @redrum I want to add that I specifically like this for a map I'm making, where I have a bunch of neutral players that will be nice to be able to hide. Still, I'm thinking leaving them starting as "Neutral_" anyways.

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

                              @redrum
                              When will the latest build release have this? I guess version .5470 does not have this option yet?
                              PS: I will surly update my maps to use this feature when a new TripleA version is officially out.

                              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

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

                                @Frostion The changes are in the latest pre-release now so feel free to test it out. Hopefully we will have a target release date for the next TripleA version soon. I believe you should be able to add the new parameters now and they won't have any impact on the current TripleA release version as it should just ignore them.

                                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
                                • C Offline
                                  Cernel Moderators @redrum
                                  last edited by Cernel

                                  @redrum said in Handling of AI players not meant to be played - Github request.:

                                  In general, using hacky prefixes or suffixes on strings is something we want to move away from. If there are others please open an issue so we can look to create proper attributes for them.

                                  The fact that islands are handled by looking if their sea zones have names ending exactly in "Sea Zone" might be a good candidate...
                                  https://github.com/triplea-game/triplea/issues/1331

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

                                    @redrum
                                    I think there is something wrong with the feature you made. Things seem to work fine when I use a setup like this:

                                        <player name="Slovakia" optional="false" defaultType="AI" isHidden="false"/>
                                    

                                    In the above case the game starts / has a default setup with the AI controlling Slovakia. I can see this both before gamestart and in the game after startup. The AI controls Slovakia.

                                    But if I in the XML sets isHidden=true, then Slovakia is under human control when it is Slovakias turn. Is this not a flaw?

                                    When looking at the "game history – Game loaded", it seems that all hidden players are automatically set to human, even though they are, in my XML, defaultType=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

                                    redrumR 2 Replies Last reply Reply Quote 0
                                    • redrumR Offline
                                      redrum Admin @Frostion
                                      last edited by

                                      @Frostion Good catch. I broke this functionality when I added the "default" option to the set all player dropdown 🙂

                                      It should now be fixed with https://github.com/triplea-game/triplea/pull/2149. Please test with the latest pre-release.

                                      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
                                      • redrumR Offline
                                        redrum Admin @Frostion
                                        last edited by

                                        @Frostion Have you gotten a chance to test after I made the fix here?

                                        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
                                        • FrostionF Offline
                                          Frostion Admin
                                          last edited by

                                          @redrum Yes. I am testing it out in Iron War Europe and it seems to work now. I at least have not seen any problems. I like this feature 🙂 And will do an XML update on all my maps when the engine supports it.

                                          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

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

                                            @Frostion Cool. I still need to add it into the POS2 XML as well.

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