Crops Broken?

The worst monsters in the Hearthlands warp the fabric of space and time...

Re: Crops Broken?

Postby magisticus » Wed Jan 18, 2017 8:35 pm

sMartins wrote:
loftar wrote:I've considered making so that instead of quality capping at different levels at different places, different crops would grow at different speeds at different places (not a huge amount of difference, but perhaps some ±25-50% or so). That way, locations would still matter after everyone has passed the quality cap, and it would easier to see the local variations more quickly.

Loftar may I ask you if is possible or not to estimate which number of tiles you need for your crop on NON quality field to make sure to replant always only +0,+1,+2 so to increase their quality without rolling back?
Cause theoretically if you have infinite tiles of crops you have 37,5% x 3 seeds = 112.5% .... this let me think it's possible, but i'm not sure at all.


From my understanding of the mechanic you would need an infinite number of tiles to 'make sure', if you want a certain percentage of certainty then that can be calculated but there will always be a small probability of failure which reduces on larger sample sizes.

To get reasonably good results you shouldn't need more than 10-15 crops though really if it is going to work similar to legacy.
magisticus
 
Posts: 268
Joined: Sat Aug 30, 2014 2:57 am
Location: Tavistock, Devon, UK

Re: Crops Broken?

Postby azrid » Wed Jan 18, 2017 8:53 pm

loftar wrote:I've considered making so that instead of quality capping at different levels at different places, different crops would grow at different speeds at different places (not a huge amount of difference, but perhaps some ±25-50% or so). That way, locations would still matter after everyone has passed the quality cap, and it would easier to see the local variations more quickly.

This would be cool.
Image
Image
User avatar
azrid
 
Posts: 3302
Joined: Mon Oct 17, 2011 11:33 pm

Re: Crops Broken?

Postby MagicManICT » Wed Jan 18, 2017 11:23 pm

magisticus wrote:From my understanding of the mechanic you would need an infinite number of tiles to 'make sure',


Even with an infinite number of tiles you can't make sure. However, as you approach infinity, the average quality you're going to harvest is going to approach n, n being the mean quality increase per generation. There's still that X in infinity chance of getting an overall quality loss in a generation.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
User avatar
MagicManICT
 
Posts: 18436
Joined: Tue Aug 17, 2010 1:47 am

Re: Crops Broken?

Postby sMartins » Thu Jan 19, 2017 12:07 am

magisticus wrote:From my understanding of the mechanic you would need an infinite number of tiles to 'make sure', if you want a certain percentage of certainty then that can be calculated but there will always be a small probability of failure which reduces on larger sample sizes.

To get reasonably good results you shouldn't need more than 10-15 crops though really if it is going to work similar to legacy.


Yeah I think so, me too....but I'm not totally sure.
I was thinking at this.....(but it's not the right way to think at this problem)

On NON quality field you have 8 values (-5,-4,....0,+1,+2) so, how many chance you have to get a certain value? => 1/8, how many average rolls you need to get that value? => 8
So, the average number of rolls you need to get a certain value is 1/p where p is the probability (1/8 in our case), so:
1° roll = you have 8/8 chance to get any value and the average number of roll you need to get any value is 1
2° roll =you have 1/8 chance to get the same value or 7/8 chance to get any other value, and the average number of rolls you need to get a diffrent value is 8/7 (1/probability) = 1,14 rolls to get a different value
3° roll ......etc...
...
8*....you have again only 1/8 to get the last value, so you need an average number of rolls of 8

So the total average number of rolls you need to get any value is: 8/8+8/7+8/6+8/5+8/4+8/3+8/2+8 = about 22 (21,74).....this means on the average of 22 rolls (22 tiles of your crop) you should be able to have all the value (-5.....+2)....

Btw this tell me nothing about how many rolls I need to make sure my good rolls will be 37,5% +or- 4%.....to be sure to have always more than 33,33% of good crops x 3 seeds to cover the whole 100%.
So , maybe if what i'm trying to say has any sense....we should think at how many rolls we need to have an average value around the 4% of the odds....oh god, I still think there is a solution, I cannot sleep tonight :D Damn Math

P.S. Loftar I don't want the solution, I would like to know if there is or not the solution, thx ;)
Make friends with the other crabs or try to escape the bucket.
I'd hardly call anything the Bible of our times. » special thanks to MagicManICT
I only logged in to say this sentence. by neeco » 30 Oct 2018, 02:57
Default Client, Best Client!
User avatar
sMartins
 
Posts: 3046
Joined: Wed Nov 11, 2015 10:21 pm
Location: Italy

Re: Crops Broken?

Postby loftar » Thu Jan 19, 2017 3:45 am

magisticus wrote:Loftar may I ask you if is possible or not to estimate which number of tiles you need for your crop on NON quality field to make sure to replant always only +0,+1,+2 so to increase their quality without rolling back?

Theoretically, there is of course always a non-zero possibility that all of the crops would give negative outcomes. Generally speaking, given n planted crops and the probability p (in this case, 3/8) that each crop gives a non-negative result, the probability that exactly m crops grow up with positive results is
eq1.png

Given, then, that you need at least ⌈n/3⌉ such successful crops to replant the entire field with non-negative results (assuming 15 harvested seeds per crop), the probability that no tile on the field has to be replanted with negative gain is
eq2.png

I'm not aware of any way to evaluate this expression non-iteratively, but here's a brute-force evaluation for field sizes up to 1000 tiles (note that the X axis is log-scaled, and also keep in mind that it reflects the area of the field, not the length of its side):
field.png

Of course, none of this matters anymore, but just thought I'd leave it there. :)

For reproduction, if necessary:
Code: Select all
from math import ceil, factorial as fac
def choose(a, b):
    return fac(a) // (fac(b) * fac(a - b))
def bin(n, m, p):
    return choose(n, m) * (p ** m) * ((1 - p) ** (n - m))
def fieldp(n, p):
    return 1 - sum(bin(n, k, p) for k in range(ceil(n / 3)))
with open("/tmp/field.dat", "w") as fp:
    for i in range(1, 1001):
        fp.write("%i %f\n" % (i, fieldp(i, 3/8)))

And GnuPlot:
Code: Select all
set terminal pngcairo transparent enhanced size 1024,360
set output "/tmp/field.png"
set logscale x
plot "/tmp/field.dat" using 1:2 title "P(m)" with lines
You do not have the required permissions to view the files attached to this post.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: Crops Broken?

Postby MagicManICT » Thu Jan 19, 2017 7:25 am

Thanks for the analysis, loftar. This is what I've been trying to say without making such a post. (It's been too long since I've done statistics and probability to recall the math without hours of digging through old textbooks.)
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
User avatar
MagicManICT
 
Posts: 18436
Joined: Tue Aug 17, 2010 1:47 am

Re: Crops Broken?

Postby Ejnekor » Thu Jan 19, 2017 10:05 am

loftar wrote:
Potjeh wrote:Though I do think the crop nodes are a cool idea, even if we do badly need a way to prospect for them.

I've considered making so that instead of quality capping at different levels at different places, different crops would grow at different speeds at different places (not a huge amount of difference, but perhaps some ±25-50% or so). That way, locations would still matter after everyone has passed the quality cap, and it would easier to see the local variations more quickly.


As a farmer myself, who spends 90% of the time on farming and creating goods from them (and who enjoys it a lot), I hate the idea of impossibility to create farms that would be convenient to use for my needs. An idea of some random areas that have better chance to grow certain plants makes me not only uncomfortable but quite angry, to be honest. Too much of RNG and inconvenience in my book. I would hate to have my farming speed crippled just because I would like to make a farm in a certain way. I pretty sure there are more farmers that do share that opinion too.

Instead of adding punishment for us, why won't you add something that we can overcome through a hard labor? And I don't mean "just create bigger fields and get bored through need of sorting tons of seeds" kind of labor, but something that would allow us to make ground for crops as those quality fields in the end. Terraform for a need, let's put it like that. Create "heat shields" or "muddier" ground which needs certain maintenance. Whatever you would like us to have. Give us an ability to build up farms of our dreams, not force us to a boring gameplay of "sort 1000 seeds by their quality and then replant". That way you have those quality fields that would be amazing to randomly find (but you do need to have a way for us to search for those places, please), but also you will give those of us who loves to build their workzone a lot to do to improve our spots as well.
Ejnekor
 
Posts: 133
Joined: Thu Mar 11, 2010 4:41 pm

Re: Crops Broken?

Postby sMartins » Thu Jan 19, 2017 10:25 am

loftar wrote:Theoretically, there is of course always a non-zero possibility that all of the crops would give negative outcomes.....


Thx a lot :D . I knew you would be able to replicate the all thing at least graphically, now I'll try to think a bit about that ( not too much cause my little brain could explode :D ) ....It's an hard question, but there is a solution, very cool :D
Make friends with the other crabs or try to escape the bucket.
I'd hardly call anything the Bible of our times. » special thanks to MagicManICT
I only logged in to say this sentence. by neeco » 30 Oct 2018, 02:57
Default Client, Best Client!
User avatar
sMartins
 
Posts: 3046
Joined: Wed Nov 11, 2015 10:21 pm
Location: Italy

Re: Crops Broken?

Postby loftar » Thu Jan 19, 2017 5:07 pm

sMartins wrote:now I'll try to think a bit about that

Further reading: Binomial distribution
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: Crops Broken?

Postby loftar » Fri Jan 20, 2017 2:49 am

MagicManICT wrote:It's been too long since I've done statistics and probability to recall the math without hours of digging through old textbooks.

Consider it a good opportunity, instead. ;)
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

PreviousNext

Return to Bugs

Who is online

Users browsing this forum: Claude [Bot] and 122 guests