Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Decimals and rounding?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Current Games From Matrix.] >> [Napoleonics] >> Crown of Glory: Emperor's Edition >> Decimals and rounding? Page: [1]
Login
Message << Older Topic   Newer Topic >>
Decimals and rounding? - 7/17/2009 7:09:55 AM   
and2

 

Posts: 79
Joined: 1/17/2009
Status: offline
Hi all new gamer here.

Ive been playing some games by now and Im wondering in the development screen when I fiddle with the sliders if COGEE works with decimals and where a rounding takes place.

Do ressources get produced in decimals, summed up and then rounded down?

Or in other words is it in a given province or at national level that rounding down takes place?

If at provincial level my inclination to tweak would increase quite a bit :)

Anyone playtested or better know the algoritm/can look under the hood?

Chindits
Post #: 1
RE: Decimals and rounding? - 7/17/2009 7:33:43 AM   
06 Maestro


Posts: 3989
Joined: 10/12/2005
From: Nevada, USA
Status: offline
Welcome and2

There was some very good info posted about the sliders and production. Here is a link to one.

http://www.matrixgames.com/forums/tm.asp?m=2161079

and, and2

http://www.matrixgames.com/forums/tm.asp?m=2161062

and one more
http://www.matrixgames.com/forums/tm.asp?m=2146882

< Message edited by 06 Maestro -- 7/17/2009 7:37:29 AM >


_____________________________

Banking establishments are more dangerous than standing armies.

Thomas Jefferson


(in reply to and2)
Post #: 2
RE: Decimals and rounding? - 7/17/2009 7:40:50 AM   
and2

 

Posts: 79
Joined: 1/17/2009
Status: offline
Thanks Ill look them through once I'm back from work

(in reply to 06 Maestro)
Post #: 3
RE: Decimals and rounding? - 7/17/2009 2:10:49 PM   
morganbj


Posts: 3634
Joined: 8/12/2007
From: Mosquito Bite, Texas
Status: offline
For each province, decimals are retained throughout the resource production calculations, then become probablities for getting an additional unit of the resource at the end.  So, if the final value is 3.25, you have a 25% chance of actually getting 4.  BUT, the development advisor screen always seems to round the numbers down, so you're very likely so see more than you expect from viewing that screen (but not very many more, especially when you subtract levy reductions).  Remember the development advisor screen figures are only "low-side" estimates; they're very close, but not always exact.

Don't forget that there are many things that can modify what the provice provides: enemy units, weather, unrest, waste, etc.

The adjusted numbers for all the provinces are then added up, the effect of levy level is considered, and the final resource amount is completed. (Well, there may be additions/subtractions for trade and privateers and such, but these are usually very small.)



< Message edited by bjmorgan -- 7/17/2009 2:14:53 PM >

(in reply to and2)
Post #: 4
RE: Decimals and rounding? - 7/17/2009 5:43:58 PM   
ericbabe


Posts: 11927
Joined: 3/23/2005
Status: offline
We got rid of the probabilities late in development.  The randomness of production was a source of confusion, and lead to too much variance in production.

In general, fractions are dropped at most of the discrete stages of economic calculations.  For instance, after feudal production loss is calculated, fractions are dropped.  In a few places, we do round to the nearest integer instead of dropping fractions.  We decided these on a case by case basis, with one eye on the final economic numbers to decide which way to do the rounding.


_____________________________



(in reply to morganbj)
Post #: 5
RE: Decimals and rounding? - 7/17/2009 5:53:13 PM   
morganbj


Posts: 3634
Joined: 8/12/2007
From: Mosquito Bite, Texas
Status: offline
Well, that's news to me.

(in reply to ericbabe)
Post #: 6
RE: Decimals and rounding? - 7/17/2009 6:18:22 PM   
ericbabe


Posts: 11927
Joined: 3/23/2005
Status: offline
Yeah, sorry.  I know when I wrote up the original economic whitepaper (and in the revised economic whitepaper!) we were still using variable production. When I actually looked into what the variance was in the game, there were many cases where it was just too dominant, made economic prediction too much guesswork.


_____________________________



(in reply to morganbj)
Post #: 7
RE: Decimals and rounding? - 7/17/2009 6:53:40 PM   
and2

 

Posts: 79
Joined: 1/17/2009
Status: offline
Hi thanks for the "under the hood" answer! :)

Supposing I understand your replies correctly it seems to me, that it makes sence to fiddle with the sliders in the provincial development screen to reach an optimum production setting, that just reaches the right side (positive) of the integer? for example 3.0-3.2 iron rather then 3.7-3.9 in X province.

I understand that occupation, weather, feudal, waste and so on can intervene along the production algorithm, but my first option as a gamer to make a difference, so to speak, in the algorithm, is at the provincial development screeen.

I realise it might be a black and white question, but it seems the dropping of fractions, rather then rounding to nearest integer, increases my inclination to "fiddle" the sliders at the development screen?

Chindits

*Edited for spelling lol*

< Message edited by and2 -- 7/17/2009 7:07:48 PM >

(in reply to ericbabe)
Post #: 8
RE: Decimals and rounding? - 7/18/2009 5:20:04 AM   
morganbj


Posts: 3634
Joined: 8/12/2007
From: Mosquito Bite, Texas
Status: offline
Fiddling with the sliders is essentially a waste of time. See the Advanced Economy Guide in the Manuals folder. By fiddling, you're only getting very small amounts of a resource, and that is more work than it's worth (especially since you're likely not to get what you think anyway).

I have the formulas coming for all the resources so you can see what I mean. It's in the final stages and should be ready sometime this weekend.

(in reply to and2)
Post #: 9
RE: Decimals and rounding? - 7/18/2009 7:20:46 AM   
and2

 

Posts: 79
Joined: 1/17/2009
Status: offline
Nice, I look forward to the formulas updated, thanks for all the addendums, I did read them all, particular the one about textiles I appriciated much.



(in reply to morganbj)
Post #: 10
Page:   [1]
All Forums >> [Current Games From Matrix.] >> [Napoleonics] >> Crown of Glory: Emperor's Edition >> Decimals and rounding? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.781