Announcement

Collapse
No announcement yet.

The dangerous sea...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Actually, Thrawn05 makes a good point... I'm playing the Banana Island game that Sir Ralph designed (waaay fun, btw), and being willing to lose some Galleys is critical.

    (BUT, losing 2 Galleys and 4 Swordsmen in my first overseas attack was probably the most painful event in the history of Civ)

    Glad to see you hanging around, Soren.
    The greatest delight for man is to inflict defeat on his enemies, to drive them before him, to see those dear to them with their faces bathed in tears, to bestride their horses, to crush in his arms their daughters and wives.

    Duas uncias in puncta mortalis est.

    Comment


    • #32
      I appreciate the word Soren. If you've been forced to repeat yourself a million times across as many threads, I apologise for adding one to the list.

      Just curious was all. Anywho, I'm content and appreciative.
      Making the Civ-world a better place (and working up to King) one post at a time....

      Comment


      • #33
        Originally posted by Thrawn05


        So there is no AI fuction called: AmIFeelingLuckyThisTurn() ?
        I have a function called

        IF My galleys have looked at all the tiles they can

        AND its not a Pangea Map

        THEN its time to head STRAIGHT out near the equator.

        I once made a bundle that way when I was the only civ with contacts between the two major land masses. Its dangerous though. My first galley sank just as it spotted the boundry of one of the Civs. I got a bit luckier with the second galley I sent as it made it to the coast.

        Comment


        • #34
          Originally posted by N. Machiavelli
          Sure it does. For one thing, the random number sequence, is exactly that: a sequence, or list of random numbers created at the begining of each 'turn'.
          When the AI decides to move into the ocean, it could check the randomizer, but the next randomizer result is not the number that is used to determine whether the galley sinks or not. Rather, the AI completes its turn; then the human makes its turn, taking an indeterminant number of randomizer results from the top of the "stack." Finally, the randomizer is called to determine whether the galley would sink or not. There is no way the AI could know which result would be used because it can't predict how many calls to the randomizer will occur during the human's turn.

          Unless you send your galleys out on dangerous transoceanic missions you wouldn't necessarily know that the galley does not sink at the time you move it, but not until the next turn.



          Comment


          • #35
            Ah, I see. I was thinking that when the movement was concluded, the call was made, (i.e. galley moves to ocean square on final move, then triggering the call to the RNG which would mark it as 'fine' or 'lost'), then continuing with the rest of the turn. I didn't think about the call to the RNG for that specific function to be made at the begining of the individual Civ's turns. Good point Zach, thanks.
            Making the Civ-world a better place (and working up to King) one post at a time....

            Comment


            • #36
              Oh, nooo. That's not how it's done, Zach. The random number is done when you finish moving the galley, the number is reserved until the start of the next turn, when it takes effect!

              (JUST KIDDING (I hope))

              Comment


              • #37
                Originally posted by Jaybe
                Oh, nooo. That's not how it's done, Zach. The random number is done when you finish moving the galley, the number is reserved until the start of the next turn, when it takes effect!

                (JUST KIDDING (I hope))
                Now that you mention it. . . . I don't normally reload, so I don't know for sure. That is a very good point. I would be more than happy to admit my error.

                Does anyone know for sure?

                Comment


                • #38
                  Hm... speaking of "peeking" at future RNG numbers... I think you can't actually do that. As soon as you "peek" at the RNG number that is "to be generated next time" (i.e. as soon as you call the randomizer routine), the number at the top of the stack is actually generated and it is "used up"... the next call will return something different. So you can theoretically find out what would the next "useful" random number be, IF YOU HAVEN'T TAKEN A LOOK.

                  Of course, if you first call the RNG engine several times and make a table containing the results, then you can have a look without influencing the results. But I can't see a reason for implementing the randomness this way... other than allowing the AI to know... But then, it would be easier to completely avoid using RNGs for the AI...

                  Soren, am I right? Or is it - even if only theoretically - possible to "just have a look" at the next RNG number, without actually "using it up"?

                  Comment


                  • #39
                    First, I think we can all assume the people who claim to have seen AI Galleys on sea/ocean without proper tech or wonder have been smoking the pipe of peace with Hiawatha a little too often. Proving that you had seen this would be pretty easy - if you think you saw it, trade for the AI civ's map. Look at their diplomacy screen. Check the wonder screen. Take screenshots of all of them. Post them. Show where the AI's map has explored sea/ocean.

                    Of course, all this isn't necessary if someone would just post a shot of the AI galley on sea/ocean without tech/wonder - which NOBODY has done! Can we please, please, PLEASE put this topic to rest? Can we perhaps pick Soren's brain for some real info, rather than **** we all should already know?

                    Oh, and the ability of the player to traverse squares by taking the chance of sinking is a HUGE advantage over the AI. That's what makes all of these discussions even funnier. Rarely a game goes by where I don't end a turn (usually several) with a Galley on sea or ocean. Even if the AI could end turns there (WHICH THEY CAN'T!!!), I would just think, well, good for them. I do it all the time!
                    Wadsworth: Professor Plum, you were once a professor of psychiatry specializing in helping paranoid and homicidal lunatics suffering from delusions of grandeur.
                    Professor Plum: Yes, but now I work for the United Nations.
                    Wadsworth: Well your work has not changed.

                    Comment


                    • #40
                      There are times when creating a table of future random numbers is relevant. One of the physics software libraries I use includes a PRNG that returns an array of N random numbers (you tell it how many you want) instead of a single number. The reason for this is for speed though - lots of simulations get to spend a fair fraction of their time in the PRNG routines, 'cos they need random numbers by the bucket load, and generating an array of 1000 numbers involves a smaller overhead of time than calling a routine 1000 times to generate 1 number each time.

                      But since I really doubt that civ3 is spending most of its CPU time generating random numbers (it doesn't really need the more time consuming high-quality RNGs that some physics simulations do) then there is no reason to go beyond a standard PRNG which just returns the next value.

                      Comment


                      • #41
                        Originally posted by vulture
                        There are times when creating a table of future random numbers is relevant. One of the physics software libraries I use includes a PRNG that returns an array of N random numbers (you tell it how many you want) instead of a single number. The reason for this is for speed though - lots of simulations get to spend a fair fraction of their time in the PRNG routines, 'cos they need random numbers by the bucket load, and generating an array of 1000 numbers involves a smaller overhead of time than calling a routine 1000 times to generate 1 number each time.

                        But since I really doubt that civ3 is spending most of its CPU time generating random numbers (it doesn't really need the more time consuming high-quality RNGs that some physics simulations do) then there is no reason to go beyond a standard PRNG which just returns the next value.
                        Yep, I should have probably made more clear that I was speaking about Civ3 only in my previous post. I understand that having a large set of pre-generated pseudo-random values may sometimes be needed. My question for Soren was also meant in Civ3 context only - if there is any pre-generated pseudo-random number table used in Civ3... or if it is done the obvious way, by just calling the RNG routine every time...

                        Comment


                        • #42
                          Originally posted by vondrack
                          ... if there is any pre-generated pseudo-random number table used in Civ3... or if it is done the obvious way, by just calling the RNG routine every time...
                          When the seed isn't regenerated with every call, as is the default in Civ3, doesn't that directly imply that they are using the "pre-generated pseudo-random number table?"

                          Geez, I didn't mean to open a can of worms, I was just nitpicking!

                          Comment


                          • #43
                            Originally posted by Jaybe

                            When the seed isn't regenerated with every call, as is the default in Civ3, doesn't that directly imply that they are using the "pre-generated pseudo-random number table?"
                            [i]
                            No. Each result of the PRNG may be pre-destined, but not pre-generated.

                            Comment


                            • #44
                              Here is the guts of the standard PRNG (I don't know if Firaxis uses it or one of the many others available)

                              return(((holdrand = holdrand * 214013L + 2531011L) >> 16) & 0x7fff);

                              holdrand is the previous "random" number.
                              Seemingly Benign
                              Download Watercolor Terrain - New Conquests Watercolor Terrain

                              Comment


                              • #45
                                Originally posted by Hurricane
                                This is certainly NOT true. That statement is in fact ridiculous if you think about it. The AI has NO chance of knowing what the RNG will be. Remember, sinking is not determined when you enter the sea/ocean tile, but JUST BEFORE your next movement turn. Even if the AI knew exactly ALL random numbers coming up, it would have to know IN ADVANCE all AI moves, human moves as well as the exact result of the combats and diplomacy that happens after it ends its turn and before it begins its next.

                                As you can see, while the AI in theory could know which RNG numbers are coming up, it has no way of knowing which one of those will be used to determine if the Galley sinks or not.
                                Does NOBODY read my posts! Zachriel had to repeat this same stuff for people to get it.

                                Zachriel:
                                Now that you mention it. . . . I don't normally reload, so I don't know for sure. That is a very good point. I would be more than happy to admit my error.

                                Does anyone know for sure?
                                Galley sinking is determined JUST BEFORE your movement phase. This is easy to determine by seeing your galley sink, reload at the end of your previous turn, use up a random number and note that it didn't sink this time. It is also widely known that NO random numbers are used for ANY kind of movement. Including moving sea units into dangerous squares.

                                Comment

                                Working...
                                X