Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Archive > Civ3-General-Archive > The dangerous sea...
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread   
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
Theseus is offline Theseus

Emperor
The warmonger formerly known as rpodos. Gathering Storm! Apolyton Spirit!!
Apr 2002
time: 00:21
  Old Post 28-08-2002 04:15
Edit/Delete Message Reply w/Quote
#31 Report this post to a moderator
Full PM-box? Change here!

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.

N. Machiavelli is offline N. Machiavelli
Prince
THE Prince
Nov 2001
time: 06:21
  Old Post 28-08-2002 04:28
Edit/Delete Message Reply w/Quote
#32 Report this post to a moderator
Suffering from ads?

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.

Ethelred is offline Ethelred
King

Mar 2002
time: 21:21
  Old Post 28-08-2002 04:29
Edit/Delete Message Reply w/Quote
#33 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

quote:
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.

Zachriel is offline Zachriel
King
U.S.A.
Dec 2001
time: 00:21
  Old Post 28-08-2002 05:05 Visit Zachriel's homepage!
Edit/Delete Message Reply w/Quote
#34 Report this post to a moderator
Lose 30 kilos (of popups)

quote:
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.



http://www.zachriel.com/gotm9/ad0170-Exploration.htm

N. Machiavelli is offline N. Machiavelli
Prince
THE Prince
Nov 2001
time: 06:21
  Old Post 28-08-2002 05:24
Edit/Delete Message Reply w/Quote
#35 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

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.

Jaybe is offline Jaybe

King
Las Vegas, NV USA
Sep 2001
time: 21:21
  Old Post 28-08-2002 07:44
Edit/Delete Message Reply w/Quote
#36 Report this post to a moderator
Full PM-box? Change here!

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))

Zachriel is offline Zachriel
King
U.S.A.
Dec 2001
time: 00:21
  Old Post 28-08-2002 17:36 Visit Zachriel's homepage!
Edit/Delete Message Reply w/Quote
#37 Report this post to a moderator
Lose 30 kilos (of popups)

quote:
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?

vondrack is offline vondrack

Emperor
Praha, Czech Republic
Jan 2002
time: 06:21
  Old Post 28-08-2002 17:58
Edit/Delete Message Reply w/Quote
#38 Report this post to a moderator
Browse Apolyton AD-FREE

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"?

metalhead is offline metalhead
Warlord
USA
Apr 2002
time: 00:21
  Old Post 28-08-2002 18:15
Edit/Delete Message Reply w/Quote
#39 Report this post to a moderator
Enter the AD-FREE zone

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!

vulture is offline vulture
King
Leeds, UK
Jun 2001
time: 05:21
  Old Post 28-08-2002 18:18
Edit/Delete Message Reply w/Quote
#40 Report this post to a moderator
Support Apolyton, buy Call to Power 2

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.

vondrack is offline vondrack

Emperor
Praha, Czech Republic
Jan 2002
time: 06:21
  Old Post 28-08-2002 19:11
Edit/Delete Message Reply w/Quote
#41 Report this post to a moderator
Got spare money?

quote:
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...

Jaybe is offline Jaybe

King
Las Vegas, NV USA
Sep 2001
time: 21:21
  Old Post 28-08-2002 20:13
Edit/Delete Message Reply w/Quote
#42 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

quote:
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!

Zachriel is offline Zachriel
King
U.S.A.
Dec 2001
time: 00:21
  Old Post 28-08-2002 20:22 Visit Zachriel's homepage!
Edit/Delete Message Reply w/Quote
#43 Report this post to a moderator
Lose 30 kilos (of popups)

quote:
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.

WarpStorm is offline WarpStorm
King
Right down the road
Nov 2001
time: 00:21
  Old Post 28-08-2002 22:21
Edit/Delete Message Reply w/Quote
#44 Report this post to a moderator
Support Apolyton or Terrorists Win

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.

Hurricane is offline Hurricane
Warlord
Arctic Hill
May 2001
time: 07:21
  Old Post 28-08-2002 22:28
Edit/Delete Message Reply w/Quote
#45 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

quote:
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:
quote:
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.

Ethelred is offline Ethelred
King

Mar 2002
time: 21:21
  Old Post 28-08-2002 22:30
Edit/Delete Message Reply w/Quote
#46 Report this post to a moderator
Support Apolyton

quote:
Originally posted by vondrack


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"?


Well I am not Soren but the answer is YES.

All you have to do is keep track of the SEED you started with and the number of times you called the RNG. If you use the same seed and generate the same number of PSUEDO-random numbers you will always get the same result. Its just an algorithym and it does the exact same thing every time you give it the same seed. ALL computer generated random numbers are psuedo random rather than really random.

This is the same basic principle in data encryption. A complex algorythim is used to convert data into a psuedo random sequence. As long as you have the encryption key (SEED NUMBER) and the algorythim you can put all back together again exactly as it was originally.

Hurricane is offline Hurricane
Warlord
Arctic Hill
May 2001
time: 07:21
  Old Post 28-08-2002 22:32
Edit/Delete Message Reply w/Quote
#47 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

quote:
Originally posted by WarpStorm
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.


This is how the seed is calculated in Civ3 (Civ III uses a linear congruential RNG):

code:
seed = (seed * 1103515245) + 12345

WarpStorm is offline WarpStorm
King
Right down the road
Nov 2001
time: 00:21
  Old Post 28-08-2002 22:50
Edit/Delete Message Reply w/Quote
#48 Report this post to a moderator
Support Apolyton buy from Amazon

Hurricane, how did you find that Civ3 uses that function? The code I posted came from Microsoft's rand() function in the C Run Time Library. As you can see, it is also a basic linear congruential RNG with a 32 bit seed with a 15 bit positive output.

Zachriel is offline Zachriel
King
U.S.A.
Dec 2001
time: 00:21
  Old Post 28-08-2002 23:01 Visit Zachriel's homepage!
Edit/Delete Message Reply w/Quote
#49 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

quote:
Originally posted by Hurricane

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.


Thanks. I figured that was the answer, but I wasn't able to test it myself.

Hurricane is offline Hurricane
Warlord
Arctic Hill
May 2001
time: 07:21
  Old Post 29-08-2002 15:48
Edit/Delete Message Reply w/Quote
#50 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

quote:
Originally posted by WarpStorm
Hurricane, how did you find that Civ3 uses that function? The code I posted came from Microsoft's rand() function in the C Run Time Library. As you can see, it is also a basic linear congruential RNG with a 32 bit seed with a 15 bit positive output.


That code was discovered by hwinkels on the other forum. You can read it here: http://forums.civfanatics.com/showt...y=&pagenumber=2

 
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:21.
Apolyton Time is 00:21.
    top of page
Rate This Thread:
archivepost
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0602 seconds (91.42% PHP - 8.58% MySQL) with 31 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net