Thread Tools
Old March 11, 2003, 20:11   #1
DaveMcW
Prince
 
DaveMcW's Avatar
 
Local Time: 16:29
Local Date: November 1, 2010
Join Date: Aug 2002
Posts: 699
Walls still work in cities
Tacit_Exit of CFC ran some tests on city walls. It seems that walls still give their defense bonus in cities even though you can't build them anymore!

Code:
Test: 5000 Warriors vs. 5000 Warriors

Defense           Attacker Wins
Town/None/None    0.4616 
Town/Wall/None    0.2816
Town/None/GWall   0.4532
Town/Wall/GWall   0.1868
City/None/None    0.2870
City/Wall/None    0.1852
City/None/GWall   0.2822
City/Wall/GWall   0.1360


Combat Calc: Warrior vs. Warrior

Defense   Attacker Wins
10%       0.456
60%       0.291
110%      0.194
160%      0.134
DaveMcW is offline  
Old March 11, 2003, 20:24   #2
Konquest02
InterSite Democracy Game: Apolyton TeamPtWDG Vox ControliApolyton University
Prince
 
Konquest02's Avatar
 
Local Time: 16:29
Local Date: November 1, 2010
Join Date: Jun 2002
Location: The Physics Guy
Posts: 977
Interresting result... I might build the GW once in a while after all!

Is it a bug or a feature?

--Kon--
Konquest02 is offline  
Old March 11, 2003, 21:18   #3
Theseus
PtWDG Gathering StormApolyton UniversityApolytoners Hall of FameBtS Tri-LeagueC4DG Gathering StormApolyCon 06 Participants
Emperor
 
Theseus's Avatar
 
Local Time: 17:29
Local Date: November 1, 2010
Join Date: Apr 2002
Location: The warmonger formerly known as rpodos. Gathering Storm!
Posts: 8,907
I build a lot of walls.

This is good.
__________________
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.
Theseus is offline  
Old March 11, 2003, 22:09   #4
Dis
ACDG3 SpartansC4DG Vox
Deity
 
Dis's Avatar
 
Local Time: 14:29
Local Date: November 1, 2010
Join Date: Feb 2000
Location: Las Vegas
Posts: 17,354
hmm

I once tried building walls. But my vet spearman were still defeated by archers.
__________________
Focus, discipline
Barack Obama- the antichrist
Dis is offline  
Old March 11, 2003, 22:26   #5
alexman
PtWDG Gathering StormCivilization IV CreatorsInterSite Democracy Game: Apolyton TeamApolyton UniversityIron CiversCivilization IV: MultiplayerApolytoners Hall of FameCivilization IV PBEMApolyCon 06 Participants
Firaxis Games Software Engineer
 
alexman's Avatar
 
Local Time: 17:29
Local Date: November 1, 2010
Join Date: Mar 1998
Posts: 5,360
Woa! Thanks for the heads up!

This is definitely a bug, probably introduced when they added the civil defense for PTW.
alexman is offline  
Old March 11, 2003, 23:02   #6
Brizey
Civilization III PBEM
Prince
 
Brizey's Avatar
 
Local Time: 16:29
Local Date: November 1, 2010
Join Date: Apr 2002
Location: The Republic of Texas
Posts: 305
Hmmm. I've wondered about this. I can recall a few cities that just seemed unnaturally tough to take.
__________________
Got my new computer!!!!
Brizey is offline  
Old March 11, 2003, 23:33   #7
Catt
PtWDG Gathering StormApolyton University
King
 
Catt's Avatar
 
Local Time: 14:29
Local Date: November 1, 2010
Join Date: May 2002
Location: California - SF Bay Area
Posts: 2,120
Quote:
Originally posted by alexman
This is definitely a bug, probably introduced when they added the civil defense for PTW.
I agree - definitely a bug. I have no quarrel with the concept, but, unless I am hopelessly mistaken, the game materials (manual and civilopedia) and a Firaxian quite clearly stated that walls meant nothing to a City.

Firaxis should either fix the bug or clarify when Walls are effective.

Catt
Catt is offline  
Old March 11, 2003, 23:58   #8
vmxa1
PtWDG Gathering StormC4DG Gathering Storm
Deity
 
vmxa1's Avatar
 
Local Time: 17:29
Local Date: November 1, 2010
Join Date: Nov 2001
Location: Oviedo, Fl
Posts: 14,103
Get the testers to run the test with 1.29f no PTW and see if it still behaves the same way (I suspect not).
vmxa1 is offline  
Old March 12, 2003, 07:17   #9
Ribannah
Queen
 
Ribannah's Avatar
 
Local Time: 22:29
Local Date: November 1, 2010
Join Date: Aug 2000
Location: The Netherlands, Embassy of the Iroquois Confederacy
Posts: 1,578
We'll have to redo all the Tank v Spearman calculations ....

While it is probably a bug, the walls of the city of Paris protected them well in the Middle Ages.
__________________
A horse! A horse! Mingapulco for a horse! Someone must give chase to Brave Sir Robin and get those missing flags ...
Project Lead of Might and Magic Tribute
Ribannah is offline  
Old March 12, 2003, 09:15   #10
Hurricane
Warlord
 
Hurricane's Avatar
 
Local Time: 23:29
Local Date: November 1, 2010
Join Date: May 2001
Location: Arctic Hill
Posts: 266
Code:
City/None/None    0.2870
City/Wall/None    0.1852
City/None/GWall   0.2822
City/Wall/GWall   0.1360
Now this is strange. Look at the effect of the Great Wall in cities. A city without walls but with the GW gets no bonus, but a city with both walls and GW get a higher bonus than a city with walls only. In other words, the GW works in cities only if they also have city walls.
Hurricane is offline  
Old March 12, 2003, 09:49   #11
theNiceOne
Warlord
 
theNiceOne's Avatar
 
Local Time: 22:29
Local Date: November 1, 2010
Join Date: Dec 2002
Posts: 121
Quote:
Originally posted by Hurricane
Now this is strange. Look at the effect of the Great Wall in cities. A city without walls but with the GW gets no bonus, but a city with both walls and GW get a higher bonus than a city with walls only. In other words, the GW works in cities only if they also have city walls.
But this is as expected. The Great Wall has two effects. One is to increase your effectiveness against barbarians, and the other is to increase the effectiveness of walls. If you don't have any walls in a city, then there's nothing to improve either.
__________________
If you cut off my head, what do I say?
Me and my body, or me and my head?
theNiceOne is offline  
Old March 12, 2003, 10:16   #12
Arrian
PtWDG Gathering StormInterSite Democracy Game: Apolyton TeamApolyton UniversityC4DG Gathering StormPtWDG2 Cake or Death?
Deity
 
Arrian's Avatar
 
Local Time: 17:29
Local Date: November 1, 2010
Join Date: Jul 2001
Location: Kneel before Grog!
Posts: 17,978
Interesting.

It should be fixed. Either that, or one should be able to build walls at any time, instead of only before the city hits size 7.

-Arrian
__________________
grog want tank...Grog Want Tank... GROG WANT TANK!

The trick isn't to break some eggs to make an omelette, it's convincing the eggs to break themselves in order to aspire to omelettehood.
Arrian is offline  
Old March 12, 2003, 11:04   #13
CerberusIV
lifer
C4WDG United Dungeon DwellersC4BtSDG Templars
Emperor
 
CerberusIV's Avatar
 
Local Time: 22:29
Local Date: November 1, 2010
Join Date: Oct 2002
Location: on the Emerald Isle
Posts: 5,316
What prevents a player from building walls in a size 7 city? The reason I ask is that I once tried to add bombardment defence to the civil defence improvement and found I could not build it in cities above size 6. If bombardment defence is removed from walls does this allow them to be built in size 7 and above cities?

I actually changed the Great Wall to give walls in all cities on the same continent. I am now beginning to question if this was as good an idea as it first looked, as those walls disappear with metallurgy. I thought they would be obsolete by that time but it seems not.
__________________
Never give an AI an even break.
CerberusIV is offline  
Old March 12, 2003, 11:53   #14
Hurricane
Warlord
 
Hurricane's Avatar
 
Local Time: 23:29
Local Date: November 1, 2010
Join Date: May 2001
Location: Arctic Hill
Posts: 266
Ok, I did a small test scenario. 4 cities (size 9)

Antium: no walls, no GW
Cumae: walls, no GW
Memphis: no walls, GW
Heliopolis: walls, GW

Each city was defended by 2 units. I attacked the first city with 2 swordsmen (all regs), noted the exact combat (for example hit, hit, wound, hit and wound, hit, wound, hit, wound). I then reloaded and did the same for the next city. With random seed on, the combat outcomes should be EXACTLY the same, no matter which city you attack, IF the walls and GW work like inteded. BTW, this is in 4000bc, so the GW is not obsolete.

I did the test 5 times (each with 4 reloads), and each and every reload had identical results. The effect of the GW should definitely appear. I don't know what Tacit_Exit did, but my game sure as hell works like it should.

My test is attached. Play as Greeks.

EDIT. This is on v1.29. Maybe it's a PTW bug?
Attached Files:
File Type: zip gw test.zip (21.1 KB, 0 views)

Last edited by Hurricane; March 12, 2003 at 12:02.
Hurricane is offline  
Old March 12, 2003, 12:03   #15
Hurricane
Warlord
 
Hurricane's Avatar
 
Local Time: 23:29
Local Date: November 1, 2010
Join Date: May 2001
Location: Arctic Hill
Posts: 266
Quote:
Originally posted by vmxa1
Get the testers to run the test with 1.29f no PTW and see if it still behaves the same way (I suspect not).
Hurricane is offline  
Old March 12, 2003, 12:15   #16
vulture
PtWDG Gathering StormPtWDG2 Mohammed Al-SahafC4DG Gathering Storm
King
 
vulture's Avatar
 
Local Time: 22:29
Local Date: November 1, 2010
Join Date: Jun 2001
Location: Leeds, UK
Posts: 1,257
I'm not sure that that's enough of a test Hurricane. Firstly, how sure are you that the 5 tests are independent, or is there are a chance that each test also has the same random seed (so you are doing 20 sets of combats all with the same random seed)? Secondly, what is the defensive unit? Not that it makes much difference, but I'm curious.

Thirdly, the presence or absence of walls in a city only makes a difference if the PRNG throws up a random number in the narrow(ish) range where it makes a difference. For swordsmen attacking spearmen in a city without walls (or as the game is supposed to work) the swordsman wins when the PRNG is < 0.4829 (if it returns values in the range 0...1), whereas with walls (if this bug is real) the swordsman wins when the PRNG is < 0.4167. So only PRNG values that fall in the range 0.4167...0.4829 are going to give different results in the two cases - the rest of the time the result of that round of combat is the same regardless. With a small number of rounds of combat - worst case scenario you have 2 combats, with around 8 random numbers - it is quite plausible (55%) that the PRNG never throws up a number in the relevant range, so the combat results should be the same. If you saw the same sequence in each case with 20 swordsmen in each attack against 20 spearmen (with around 80 rounds of combat) then the odds that none of them fall in the significant range are more like 0.3%, which would be a significant result. If you can do it with a greater number of combats I'd be interested to see what turns up (not in a position to do it myself right now).
vulture is offline  
Old March 12, 2003, 14:49   #17
Hurricane
Warlord
 
Hurricane's Avatar
 
Local Time: 23:29
Local Date: November 1, 2010
Join Date: May 2001
Location: Arctic Hill
Posts: 266
I wrote down the combat results from the different saves, and they were different. So the seed had changed.

The defender was a spearman.

Quote:
Thirdly, the presence or absence of walls in a city only makes a difference if the PRNG throws up a random number in the narrow(ish) range where it makes a difference. For swordsmen attacking spearmen in a city without walls (or as the game is supposed to work) the swordsman wins when the PRNG is < 0.4829 (if it returns values in the range 0...1), whereas with walls (if this bug is real) the swordsman wins when the PRNG is < 0.4167. So only PRNG values that fall in the range 0.4167...0.4829 are going to give different results in the two cases - the rest of the time the result of that round of combat is the same regardless. With a small number of rounds of combat - worst case scenario you have 2 combats, with around 8 random numbers - it is quite plausible (55%) that the PRNG never throws up a number in the relevant range, so the combat results should be the same. If you saw the same sequence in each case with 20 swordsmen in each attack against 20 spearmen (with around 80 rounds of combat) then the odds that none of them fall in the significant range are more like 0.3%, which would be a significant result. If you can do it with a greater number of combats I'd be interested to see what turns up (not in a position to do it myself right now).
This is a good comment, and I also thought about it. The 5 different games were unique, so I think it was enough. As you probably noted in Tacit_Exit's test, a city with both walls and the GW would give an even higher defence than a city with just walls, so the change should show up in more cases than you mention. But if anybody feels they need more confirmation, please try out the test map I made.
Hurricane is offline  
Old March 12, 2003, 14:56   #18
Hurricane
Warlord
 
Hurricane's Avatar
 
Local Time: 23:29
Local Date: November 1, 2010
Join Date: May 2001
Location: Arctic Hill
Posts: 266
It was actually 44 rounds of combat. I'm not statistics expert, but what is the chance that none of 44 rounds fall into the gap 0.4167...0.4829 ?

Here is the actual combat results, BTW. H means that the attacker scored a hit, w that the defender scored a hit.
Attached Thumbnails:
Click image for larger version

Name:	walls_gw.gif
Views:	96
Size:	4.7 KB
ID:	39454  
Hurricane is offline  
Old March 12, 2003, 17:02   #19
MrWhereItsAt
Alpha Centauri Democracy GameCivilization II Democracy GamePtWDG RoleplayAlpha Centauri PBEMSpanish CiversCall to Power Democracy GameCivilization II Democracy Game: Red FrontPtWDG2 Latin LoversACDG The Cybernetic ConsciousnessCivilization III PBEMC3C IDG: Apolyton TeamACDG Planet University of TechnologyACDG3 GaiansC3CDG The Lost BoysCivilization III Democracy GameInterSite Democracy Game: Apolyton Team
Deity
 
MrWhereItsAt's Avatar
 
Local Time: 09:29
Local Date: November 2, 2010
Join Date: Nov 2001
Location: That's DR WhereItsAt...
Posts: 10,157
Assuming that inteval is out of a potential 1, the chance of no favourable results is nearly 5%. Not infinitesimal by any stretch, but still relatively unlikely. I think the key is that all your results were EXACTLY the same. That smells a bit fishy to me.
__________________
Consul.

Back to the ROOTS of addiction. My first missed poll!
MrWhereItsAt is offline  
Old March 13, 2003, 02:15   #20
Hurricane
Warlord
 
Hurricane's Avatar
 
Local Time: 23:29
Local Date: November 1, 2010
Join Date: May 2001
Location: Arctic Hill
Posts: 266
Quote:
Originally posted by MrWhereItsAt
Assuming that inteval is out of a potential 1, the chance of no favourable results is nearly 5%. Not infinitesimal by any stretch, but still relatively unlikely. I think the key is that all your results were EXACTLY the same. That smells a bit fishy to me.
Yes, 5% for ONE roll. But now we have 44 rounds. So shouldn't it be 0,95^44, which is roughly 1%?

And the point is that the expected result is that the results are exactly the same. That happens if the walls and GW work like they are supposed to. That is that they don't work at all in cities.
Hurricane is offline  
Old March 13, 2003, 04:56   #21
theNiceOne
Warlord
 
theNiceOne's Avatar
 
Local Time: 22:29
Local Date: November 1, 2010
Join Date: Dec 2002
Posts: 121
You're right Hurricane - it's less than 1% for the 44 rounds.

Assuming that both Hurricane and Tacit_Exit have done their calculations right (and I have no reson to doubt that), it means that this has been changed from civ 1.29 to ptw, and my guess is that it is a bug.
__________________
If you cut off my head, what do I say?
Me and my body, or me and my head?
theNiceOne is offline  
Old March 13, 2003, 07:37   #22
vulture
PtWDG Gathering StormPtWDG2 Mohammed Al-SahafC4DG Gathering Storm
King
 
vulture's Avatar
 
Local Time: 22:29
Local Date: November 1, 2010
Join Date: Jun 2001
Location: Leeds, UK
Posts: 1,257
Actually MrWIA is right with the 5% value - the probability that you see no difference even though the odds are different, is the probability that none of the random numbers fall in the specified range 0.4167...0.4829, which is 0.9338^44 = 0.049, or pretty close to 5% (0.95^44 is around 10%, not 1%).

For regular swordsmen attacking regular spearmen in a city with walls, great wall, and bug, the chance of the swordsman winning a round of combat is 0.3659. The odds in the other extreme (no walls) are 0.4839 (I mis-typed earlier). The 'sensitive' range is 0.118, and the odds that none of the 44 rounds of combat have a random number in this range is 0.0040, or 0.4%. So this is pretty strong evidence that the bug isn't present in Hurricane's version, which is 1.29f, not PtW (if I recall correctly).
vulture is offline  
Old March 13, 2003, 09:14   #23
Hurricane
Warlord
 
Hurricane's Avatar
 
Local Time: 23:29
Local Date: November 1, 2010
Join Date: May 2001
Location: Arctic Hill
Posts: 266
Thanks vulture. Like I said, I suck at statistics. Maybe I'll run the test a few more times when I get home, just to make sure. And yes, it is v1.29f, not PTW.
Hurricane is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 17:29.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team