Decimals and rounding? (Full Version)

All Forums >> [Current Games From Matrix.] >> [Napoleonics] >> Crown of Glory: Emperor's Edition



Message


and2 -> Decimals and rounding? (7/17/2009 7:09:55 AM)

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




06 Maestro -> RE: Decimals and rounding? (7/17/2009 7:33:43 AM)

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




and2 -> RE: Decimals and rounding? (7/17/2009 7:40:50 AM)

Thanks Ill look them through once I'm back from work




morganbj -> RE: Decimals and rounding? (7/17/2009 2:10:49 PM)

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





ericbabe -> RE: Decimals and rounding? (7/17/2009 5:43:58 PM)

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.




morganbj -> RE: Decimals and rounding? (7/17/2009 5:53:13 PM)

Well, that's news to me.




ericbabe -> RE: Decimals and rounding? (7/17/2009 6:18:22 PM)

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.




and2 -> RE: Decimals and rounding? (7/17/2009 6:53:40 PM)

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*




morganbj -> RE: Decimals and rounding? (7/18/2009 5:20:04 AM)

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.




and2 -> RE: Decimals and rounding? (7/18/2009 7:20:46 AM)

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.






Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.65625