User talk:ParadiseAdi

Welcome
Hi, welcome to Paradise island hd Wiki! Thanks for your edit to the User:ParadiseAdi page.

Please leave a message on my talk page if I can help with anything! -- CMONYALL (Talk) 21:25, July 23, 2011

Repair function
Hey Adi,

This function you found for the repairs might bring an early end to our research for the repair rate! Is this function the only one in the entire game code that controls the repairs?

Btw, is randomInt(randomInt(7,14),23) not the same as randomInt(7,23)? And if so, would that not mean an average probability of 1 in 15? I am starting to fear that my knowledge of math has sunken away too deep already, and it is just the second week of the holidays.... :')

CMONYALL 12:35, July 24, 2011 (UTC)


 * Hey CMONYALL, I am pretty sure that this is the only function. There are many indications for it. I examined version 1.0.21, but I guess they didn't change it.


 * Those two functions aren't the same at all: Consider a scenario where the first function generated 7. The next function will generate a number from 7 to 22. In the second scenario, the first generated 10, therefore, the next function only generates numbers from 10 to 22. As you see, 10 can be generated in both scenarios, whereas 7 only in the first.


 * ParadiseAdi 17:17, July 24, 2011 (UTC)

CMONYALL 18:04, July 24, 2011 (UTC)
 * Yes I know 7 cannot be generated anymore when the nested randomInt returns 10, but the randomInt(randomInt) function as a whole will return anything between 7 and 23, same as a randomInt(7,23) function will do. I am a information science student so I did some programming myself, but I just cannot see what the reason is to include a randomInt inside a randomInt. I was hoping you could explain that to me? Is it maybe increasing the probability for a number between 7 and 14 to be returned?

ParadiseAdi 21:41, July 24, 2011 (UTC)
 * You're partially correct. randomInt(randomInt) and randomInt have both the same image (integers from 7 to 22) and the outputs have different distributions (randomInt has a uniform, the nested one a weighted distribution). That's why randomInt(randomInt) can't be replaced by the simpler randomInt. But 7 is the least probable number and 13–22 uniformly the most probable ones.