michaelm75au
Posts: 13500
Joined: 5/5/2001 From: Melbourne, Australia Status: offline
|
quote:
ORIGINAL: Numdydar Sorry to be dense but it has been a while since I last did any programing Random(30)/30 means a random number between 1-30 is generated and then that result is divided by 30. Do I have that right? So 1/30 times you are able to get a 'bonus' of an extra plane produced? If that is true, 29/30 times this will have 0 as a result as you only have a 1/30 chance of getting a 1. Unless you always round up. If you round up, then you always get 1 as a result. So a 2(0) production factory whould have 2 points produced + a 1/30 chance of a +1. Then the Production routine would modify this to see if an actual plane was produced or not. A 2(0) R&D factory would still be 2 points produced + a 1/30 chance of a +1 as for production factories Then another random number based on the most likey outcome of the above which would be 2, would produce either a 1 or 2 as there were two devices. If the 1/30 'bonus' point was generated then this numbe could be 1,2, or 3. Correct so far? As all these results would be 0 when divided by 10, (2/10= 0 rounded down) no R&D points would be generated. However because the R&D factory was fully repaired, it gets a 'bonus' of 1 point So ANY R&D factory that has less than 9 factories fully repaired could never exceed getting 1 point towards acceleration. If you had 9 then you would have a 1/30 chance of getting 2 points. ([9 factories + 1/30 chance of +1]/10 =1 + 1 'bonus' for fully repaired =2) To complete the picture, 2 cities with 1 2(0) R&D factory each would generate 2 points/day. So every 50 days this plane would accelerate. While 2 cities with 1 30(0) factory each would most likely produce 6 points/day. This would allow an acceleration every 16-17 days. And if you can do it, 3 cities with 3 30(0) factories each could produce 27 points/day (3 cities * 3 factories * 3 points generated = 27). Evey 4 days or so you would accelerate. Of course getting the R&D factories repaired is the key to all of this Once that is done and you have factories spread out in different cities, things can really speed up Thanks for ALLyour help Michael. Hopefully I have it right now. Finally, right Using the correctly restored initial formula for R&D, which is the same formula used for daily production. active devices + random(30)/30 However I can see that the way it is written in not mathematically correct. it should be written as "(active devices + random(30))/30". And it just uses integer arithmetic which is truncating fractions. A 30(0) factory would produce on a day "(30 + random(30))/30" planes - a number from (30+1)/30 to (30+30)/30; ie 1 to 2 with '1' more common. (a) If a production factory, it would go off and build the number of planes from above. (b) If a R&D factory with no damaged devices and the number above was >0, it would follow my original formula: (i) divide by 10 -> 1 or 2 divided by 10 would be '0' (ii) add 1 as there are no damaged devices -> above (0) + 1 would be '1' If the factory was 2(0), the calculation for the initial number per day would be '0' for most days of the month. This is why I say that 30(0) is a good size factory as it ensures some R&D per day. To gain more from (b)(i) would require that the daily production be 10+ which would equate to a 300+ factory.
< Message edited by michaelm -- 9/18/2011 2:55:53 AM >
_____________________________
Michael
|