Cosmic Supremacy Forum » Game Mechanics » Percentage comparison math in governors » Hello Guest [Login|Register]
Last Post | First Unread Post Print Page | Recommend to a Friend | Add Thread to Favorites
Post New Thread Post Reply
Go to the bottom of this page Percentage comparison math in governors
Author
Post « Previous Thread | Next Thread »
StarkRavingSage Player-Rank: 2 StarkRavingSage is a male
Invades without Troop Ships


images/avatars/avatar-1216.jpg

Registration Date: 06.09.2010
Posts: 304

Percentage comparison math in governors Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

I have my governors set to behave differently if there is something to produce.

I try to have them behave as if nothing is being produced when production progress is above 100% (i.e.: production surplus for the previous item in the queue was greater than necessary for next item in the queue).

That's simple, I just set the rules in a group that states:
If Production Progress is higher than 100%          or If currently no production

For the alternative case I could say:
If Production Progress is lower than 101%

My question is, will these overlap for 100.5% or is there rounding?

Would >99% and <100% overlap for 99.5%?
02.07.2018 18:42 StarkRavingSage is offline Send an Email to StarkRavingSage Search for Posts by StarkRavingSage Add StarkRavingSage to your Buddy List
War_Cross Player-Rank: 3 War_Cross is a male
Rules with an Iron Pinky


images/avatars/avatar-1326.jpg

Registration Date: 20.06.2014
Posts: 1,472
Location: New York

RE: Percentage comparison math in governors Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Smile You've got some deep thinking going on there. I think only Erwin would know if there is rounding or if fractional % is ignored. If there is rounding ... would 1/2 % round up or down randomly ? If fractional % is not ignored then I would think that a statement like ... more then, or less then 99.999 % would have a slightly more refined outcome.
03.07.2018 12:23 War_Cross is offline Send an Email to War_Cross Search for Posts by War_Cross Add War_Cross to your Buddy List
StarkRavingSage Player-Rank: 2 StarkRavingSage is a male
Invades without Troop Ships


images/avatars/avatar-1216.jpg

Registration Date: 06.09.2010
Posts: 304

Thread Starter Thread Started by StarkRavingSage
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Decimals are not acceptable as input.

I should test it in the Test-Bed, but I haven't ever taken the time to do so in the past.
03.07.2018 14:37 StarkRavingSage is offline Send an Email to StarkRavingSage Search for Posts by StarkRavingSage Add StarkRavingSage to your Buddy List
War_Cross Player-Rank: 3 War_Cross is a male
Rules with an Iron Pinky


images/avatars/avatar-1326.jpg

Registration Date: 20.06.2014
Posts: 1,472
Location: New York

Decimals are not acceptable as input. Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Oh ... if decimals are not acceptable as input then you can't use 99.5 % anyway. Wink
03.07.2018 17:07 War_Cross is offline Send an Email to War_Cross Search for Posts by War_Cross Add War_Cross to your Buddy List
chrisadamley Player-Rank: 3
Wins even when not in your Galaxy


images/avatars/avatar-384.gif

Registration Date: 18.01.2007
Posts: 2,852
Location: Fargo ND

RE: Percentage comparison math in governors Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

quote:
Originally posted by StarkRavingSage

For the alternative case I could say:
If Production Progress is lower than 101%



Maybe i am not fully understanding. Why can't you have the alternative case be If production progress is lower than 100%?

If you have it lower than 101%, then something could be at 100% and it wont switch.

I think you should make them behave that if something is at 100% or over, then it will behave as if nothing is being produced.

So it would be

If production progress is Higher than 99% or if currently no producion

If production progress is lower than 100%

I think That will do what you want. If you are worried it will switch away from production if something is at 99.5% then you could also do it this following way will work for sure, just run a duplicate rule to cover both scenarios. Just run one equal to 100% then it will switch, and run one saying if its over 100% it will do the same thing you wanted.

Example:

While Production Progress is lower than 100%
     Convert a Citizen to a Worker

While Production Progress is equal to 100%
     Convert a Citizen to a Banker

While Production Progress is higher than 100%
     Convert a Citizen to a Banker

__________________
----Its better to die on your feet than live on your knees----
05.07.2018 20:21 chrisadamley is offline Send an Email to chrisadamley Search for Posts by chrisadamley Add chrisadamley to your Buddy List
StarkRavingSage Player-Rank: 2 StarkRavingSage is a male
Invades without Troop Ships


images/avatars/avatar-1216.jpg

Registration Date: 06.09.2010
Posts: 304

Thread Starter Thread Started by StarkRavingSage
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Right, but I don't want to repeat rules if I can avoid it. If I knew how the math works I could make better decisions.
05.07.2018 20:35 StarkRavingSage is offline Send an Email to StarkRavingSage Search for Posts by StarkRavingSage Add StarkRavingSage to your Buddy List
chrisadamley Player-Rank: 3
Wins even when not in your Galaxy


images/avatars/avatar-384.gif

Registration Date: 18.01.2007
Posts: 2,852
Location: Fargo ND

Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

quote:
Originally posted by StarkRavingSage
Right, but I don't want to repeat rules if I can avoid it. If I knew how the math works I could make better decisions.


Then the first way i stated would work just fine.

Run:

If production progress is higher than 99% or if currently no production (then go to whatever you want)

after that run:

If production progress is lower than 100% (keeps on building)


..........

If you run in that order, it will never get stuck. If it happens to calculate 99.5%, then the next rule will switch it back to production. If its 100% or over, than it will switch to what you set it to.

__________________
----Its better to die on your feet than live on your knees----
05.07.2018 20:45 chrisadamley is offline Send an Email to chrisadamley Search for Posts by chrisadamley Add chrisadamley to your Buddy List
Tree Structure | Board Structure
Jump to:
Post New Thread Post Reply
Cosmic Supremacy Forum » Game Mechanics » Percentage comparison math in governors

Forum Software: Burning Board 2.3.6, Developed by WoltLab GmbH