# Dominion Strategy Forum

• October 23, 2019, 08:46:25 am
• Welcome, Guest

### News:

DominionStrategy Wiki

### Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

### Messages - DStu

Filter to certain boards:

Pages: [1] 2 3 ... 98
1
##### Variants and Fan Cards / Re: Fixing Dominion – returns
« on: March 06, 2016, 12:44:47 pm »
I'm not sure Donald made Chapel as strong with a plan. A lot of cards in base are grossly mispriced (looking at you, Adventurer). But i guess he knew that, even if Chapel was extremely strong, it wouldn't ruin the game, as trashing on its own isn't a strategy. It's like Alms in that respect.
Quote from: Donald http://forum.dominionstrategy.com/index.php?topic=115.0
This started out "trash any number of cards" and went to the ever-so-slightly weaker "trash up to 4 cards." I tested a version with "trash up to 3 cards." It was horrible. Just, way slower than the current version, like you wouldn't believe.

2
##### General Discussion / Re: Maths thread.
« on: February 26, 2016, 01:23:22 am »
Why is it all spiky? It should change direction just once right? Just not enough trials?
the time it takes until some plant is drawn (which is mostly geometric with mean 16^3/3, slightly off from this because the 3 fields are not independent).
Due to linearity of expectation, it is exactly this for any given plant plot, right?
It's not exactly geometric, as the three chosen fields are not independent. You can't chose one field twice.

You can see this in the extreme case with only three fields , where you would always chose every field, so the time to chose field 1 is constant 1, and not geometric with mean 1.
But with 4k fields and just 100 targets the deviation should be quite small, and I also think I know how to make it exact.
Why does the distribution matter rather than just the mean? Wait, duh. Nevermind.

I think you are right they might really be exactly geometric, I had a wrong assumption before.

I'm not sure if just the expectation matters, as the distribution controls the spawning of new plants, and these again spawn plants, you have some exponential behaviour here, which is nonlinear. Not sure if this is relevant in this context.

:e I think basically the question is, is https://en.wikipedia.org/wiki/Wald%27s_equation applicable here. And I don't think it's obvious to see that condition 2) is satisfied.

3
##### General Discussion / Re: Maths thread.
« on: February 25, 2016, 04:47:58 pm »
Why is it all spiky? It should change direction just once right? Just not enough trials?
the time it takes until some plant is drawn (which is mostly geometric with mean 16^3/3, slightly off from this because the 3 fields are not independent).
Due to linearity of expectation, it is exactly this for any given plant plot, right?
It's not exactly geometric, as the three chosen fields are not independent. You can't chose one field twice.

You can see this in the extreme case with only three fields , where you would always chose every field, so the time to chose field 1 is constant 1, and not geometric with mean 1.
But with 4k fields and just 100 targets the deviation should be quite small, and I also think I know how to make it exact.

4
##### General Discussion / Re: Maths thread.
« on: February 25, 2016, 12:53:25 pm »
Why is it all spiky? It should change direction just once right? Just not enough trials?

Yeah, 300 is still a bit low, even if the coupling is already quite strong.

I think I greatly increase the number of trials I can simulate by not drawing the 3 fields every tic (which will miss most of the time), but just jumping over all these by simulating the time it takes until some plant is drawn (which is mostly geometric with mean 16^3/3, slightly off from this because the 3 fields are not independent).

Just don't have time at the moment, but I think one sees what one should do anyway, somewhere around 100 stop planting...

5
##### General Discussion / Re: Maths thread.
« on: February 25, 2016, 04:57:08 am »
However I see no point in ever going past 138.
Obviously.

However, seems like the the optimum is somewhere around 100.

(100 samples each, coupled until the first one starts harvesting to reduce variance and improve speed)

Code: [Select]
import numpy as npimport numpy.random as rndimport pandas as pdimport matplotlib.pyplot as pltdef iterate(field, planted, harvested, stop):    def grow(planted, i):        if planted > i:            field[i] = field[i] + 1            if field[i]==16:                field[i]=0                return 1        return 0            i = rnd.randint(N)    j=-1    k=-1    while (j<0) or (i==j):        j = rnd.randint(N)    while (k<0) or (i==k) or (j==k):        k = rnd.randint(N)        new_plants = 0    new_plants += grow(planted, i)    new_plants += grow(planted, j)    new_plants += grow(planted, k)    harvested += max(0, planted + new_plants - stop)    planted = min(planted + new_plants, stop)        return field, planted, harvestedrep = 100res = 2goal = 138start = 90end = 150result = pd.Series(index=range(start, end, res))samples = pd.DataFrame(columns = range(rep), index=result.index)stops = np.asarray(result.index)count = np.zeros(len(result.index))for i in range(rep):    burn_in = 0    planted = 1    harvested = 0    field = np.zeros([N], dtype=int)    avg = np.zeros(len(result.index))    stop = result.index.min()    while planted<stop:        burn_in += 1        field, planted, harvested = iterate(field, planted, harvested, stop)    #until here the same for everyone    save_field = field.copy()    save_planted = planted    for stop in range(len(stops)):        s = stops[stop]        count[stop] += burn_in        while (harvested<goal):            field, planted, harvested = iterate(field, planted, harvested, s)            count[stop] += 1                field = save_field.copy()        planted = save_planted        harvested = 0    avg = pd.Series(count/rep, index=result.index)avg
:edit Went a bit further with the coupling, and did 300 samples

Code: [Select]
...rep = 300res = 2goal = 138start = 60end = 140result = pd.Series(index=range(start, end, res))samples = pd.DataFrame(columns = range(rep), index=result.index)stops = np.asarray(result.index)count = np.zeros(len(result.index))for i in range(rep):    print(i)    burn_in = 0    planted = 1    harvested = 0    field = np.zeros([N], dtype=int)    avg = np.zeros(len(result.index))    for stop in range(len(stops)):        s = stops[stop]        while planted<stop:            burn_in += 1            field, planted, harvested = iterate(field, planted, harvested, s)        #until here the same for everyone following        np.copyto(save_field, field)        save_planted = planted        save_harvested = harvested        count[stop] += burn_in        while (harvested<goal):            field, planted, harvested = iterate(field, planted, harvested, s)            count[stop] += 1        np.copyto(field, save_field)        planted = save_planted + save_harvested        harvested = 0    avg = pd.Series(count/rep, index=result.index)avg

6
##### General Discussion / Re: Maths thread.
« on: February 24, 2016, 01:05:43 pm »
Do you know the age of the plant? That would change things a bit...

Basically you would want to stop earlier, because your expected time to grow 138 cones given the ages is smaller than without knowing the ages.

Not unless you're cheating. Of course, you could estimate them, since you know when you planted it.

Of course this is very theoretical, because in real Minecraft life you just plant all of them since you can retrieve them after you've planted them.

I think it's even true if you don't know the age.  Liopoli assumes that it takes on average 16^4/3 ticks to spawn a cone for every plant. That's only true if the time to spawn is geometrically distributed, here it's the sum of 16 geometric distributions.  Basically, for a random plant far enough in the future, you would guess that on average it has age 8, so it does only need 8*16^3/3 ticks to spawn a new cone.
It now get's a bit more complicated, because at the time you want to start harvesting probably most of the plants a quiet young (because you just planted them, but anyway even if they have age 2 they produce a new cone a but faster compared to the geometric situation), and only the older ones can be assumed to have a random age.  But basically I would guess because of this you want to start harvesting a bit earlier, as the first new cones spawn a bit faster, so you have less time for a new plant to earn back its investment (which now really takes 16^4/3 ticks on average).

:e also, if my simulations are correct, it doesn't really matter. Stop somewhere between 100 and 150, the variance is much larger than the difference in expectation values...

7
##### General Discussion / Re: Maths thread.
« on: February 24, 2016, 12:30:10 pm »
Do you know the age of the plant? That would change things a bit...

Basically you would want to stop earlier, because your expected time to grow 138 cones given the ages is smaller than without knowing the ages.*

* This might be wrong, but in this case liopoils approach is also wrong. There is a small ( I think) inaccuracy in it, but if * is wrong it is too larger to ignore.

8
##### General Discussion / Re: Maths thread.
« on: February 24, 2016, 05:57:37 am »
They don't grow when that 164/3 chance happens, they only age by one.  When the age reaches 16, they grow.  One thing I forgot to mention that's important, is that then the age goes back to zero.  So, each one doesn't have a chance to grow on each tick, each is a part of the way through.

What do you mean by "wait until the last one finished growing"?  I feel like something's not right there.
They age with 16^3/3, and they need 16 ages to grow, that makes it 16^4/3, or?

9
##### Dominion General Discussion / Re: Interview with Donald X.
« on: February 10, 2016, 05:06:13 am »
Does this mean you stopped testing online halfway through Empires or that you moved too 3/4 player testing online on Empires. If so, that's a very interesting decision.
Doug found better things to do with his time midway through Empires. So, he stopped updating isotropic, so we couldn't test new cards on it anymore.
Does that mean isotropic is going down?

10
##### General Discussion / Re: Maths thread.
« on: February 07, 2016, 04:44:49 am »
I think your variance argument is basically Jensen in the special case k=2, so not really more gimmickly, more like a bit more on point...

Edit: I think my inequalities above are the both in the wrong direction, probably you can them get right in the case c>1 (and using k+2 instead of k+1), but not in c<1.

11
##### General Discussion / Re: Maths thread.
« on: February 07, 2016, 04:20:08 am »
Without absolute values and with real moments, you
get any 0<c<1 just by Bernoulli(c)...

Edit: Hmm, no negative values in here, somehow my reasoning for 0<c<1 above does not work. Not completely surprising though, didn't completely think it through, was more an analogy for c>1, might have some wrong sign or inequality in there....

12
##### General Discussion / Re: Maths thread.
« on: February 07, 2016, 04:18:35 am »
Yeah, I think my proof was for with absolute values. So E[|X|^k].

Otherwise, x^\alpha is not really concave for \alpha<1.

c>1 should still work on first glance.

13
##### General Discussion / Re: Maths thread.
« on: February 07, 2016, 03:45:47 am »
More of a probability question, but I wondered about this randomly, and think I actually solved it.

For what values of c does there exist a non-constant random variable X such that for all positive integers k, E[X^k] = c?

I would guess just 1 and 0

With Jensen's inequality (as x->x^\frac{k+1}k is convex), you have E[X^{k+1}] >= E[X^k]^{\frac{k+1}k}, that excludes c<1.  For 0<c<1, you take E[X^{k-1}] <= E[X^k]^\frac{k-1}k.  0 and 1 are constant under this mapping, so no problem there. Negative c can't be because of even k's.

Edit: Of course 0 also doesn't work because of non-constant X, so at least second moment is larger than 0.
Edit2: and of course 1 obviously works with 2*Bernoulli(1/2).
Edit3: Ok moments, not centralized moments. Then take a slightly different distribution, but still a Bernoulli variant, just center it yourself

14
##### General Discussion / Re: Maths thread.
« on: February 06, 2016, 04:47:12 pm »
The problem is that the question is ambiguous, since variance can mean two different things, either sN-12 or sN2. See Wolfram Mathworld.

WW assumed that the variance is sN2, and in that case he is right: with n=6 you can get sN2 arbitrarily close to 6, but not exactly 6. His solution for n=7 is correct under this interpretation

Tables and DStu assume the variance is sN-12, and in this case n=6 is possible and optimal.

I used VARIANCE in LO, it seems to be s_N, and I would argue that this is what should be used.  s_{N-1} you take if you have a random sample from a distribution, to get an unbiased estimator. This is not what we want in this case, we talk about the variance of a list.  This is as if the list is the complete distribution, to get the variance of this one you must take s_N.

Which confuses me now a bit, as I nevertheless "proved" that N=6 is possible. Might have some mistake in there...

Edit: A fuck it, I'm too drunk for this shit. Was s_{N-1} all along in my formula, at least this clears that. My above post is wrong because wrong definition of variance, WW is right, use s_N!

15
##### General Discussion / Re: Maths thread.
« on: February 06, 2016, 01:10:46 pm »
What do you mean by the smallest list? By definition the list must have n elements, so they will all be the same size.
Unless I am looking for the smallest n that you can do this for?

Yeah, I mean the smallest n. Sorry, it was late at night while I worded it.

WW: Your solution to part 1 is correct, part 2 is not. Hint: Don't assume the list must be "symmetric" around the mean

I can prove that 6 is possible .

2.75, 3.8, 6, 6, 8.7, 8.75
have mean value 6 and variance 6.051
2.75, 4, 6, 6, 8.5, 8.75
have mean value 6 and variance 5.675

so we have the numbers 2.75,6,6,8.75 and 3.8+h,  8.7-h. For h in [0,0.2], the range doesn't change, nor does the mode or median.  Mean doesn't change for any h.  The variance is continuous in h, so by mean value theorem there exists an h \in (0,0.2) such that variance is 6. (The h is probably quite easy to find as variance should be monotonous in h, too (but what for a mathematician would I be if I wouldn't be satisfied with proving the existence, and would continue to find out what the value is. Especially if it already stated that the solution is not unique anyway)

16
##### General Discussion / Re: Maths thread.
« on: February 01, 2016, 01:25:56 pm »
I see. Although you don't have to "upload", In case of lio's calculation, all I had to do was to copy the code into a wiki page, add [itex] tags, and it complied flawlessly (then you can copy the image codes), which is why I wondered if maybe you use a tool that generates the code.

It seems a bit strange to me, because I don't find TeX sourcecode pretty to look at, and isn't it easier to say SR(4) than \sqrt{4}?

I would not assume SR(4) means square root without some context.  It looks like the name of some group or something.  But \sqrt{} is pretty unambiguous.

http://www.thesrgroup.com/

17
##### General Discussion / Re: Maths thread.
« on: February 01, 2016, 10:58:27 am »
I see. Although you don't have to "upload", In case of lio's calculation, all I had to do was to copy the code into a wiki page, add [itex] tags, and it complied flawlessly (then you can copy the image codes), which is why I wondered if maybe you use a tool that generates the code.

It seems a bit strange to me, because I don't find TeX sourcecode pretty to look at, and isn't it easier to say SR(4) than \sqrt{4}?

probably depends on how often you have written \sqrt{4}.

18
##### General Discussion / Re: Math and lotto stuf
« on: January 13, 2016, 03:58:21 am »
Or as my kid likes to count: 1 million trillion infinity which is obviously > 1 infinity.

You might want to take them to a trip to the Hilbert Hotel.

19
##### General Discussion / Re: Math and lotto stuf
« on: January 11, 2016, 02:10:29 pm »
Yeah, but does anyone use that definition anymore? I've only seen it used to explain the origin of the word.
There are countries that do, so might be translation error

20
##### General Discussion / Re: Math and lotto stuf
« on: January 11, 2016, 02:04:03 pm »

Lottery $1.3 Billion Population 300 Million =$4.33 Million per person!

...

I'm thinking they messed up some mundane detail.

https://en.wikipedia.org/wiki/Long_and_short_scales probably.

21
##### General Discussion / Re: Math and lotto stuf
« on: January 11, 2016, 11:13:20 am »
It's not hard to get positive expectation; the tricky part is how long it takes to pay off. The lottery itself won't be around long enough; the country hosting it won't be around long enough.

More importantly, you also need infinite captial to be able to stick to your strategy, which makes winning a finite amount a bit of an edge case...

Well, presumably you have a steady income throughout the infinite time you'll need. I can't see this being an issue.

True. So let's do it!

22
##### General Discussion / Re: Math and lotto stuf
« on: January 11, 2016, 11:04:25 am »
It's not hard to get positive expectation; the tricky part is how long it takes to pay off. The lottery itself won't be around long enough; the country hosting it won't be around long enough.

More importantly, you also need infinite captial to be able to stick to your strategy, which makes winning a finite amount a bit of an edge case...

23
##### Goko Dominion Online / Re: Four Weeks Without Dominion ...
« on: November 11, 2015, 05:15:00 am »
Interesting that this also applies to the Google Play Store and Amazon Store, so werothegreat's troll post above is incorrect when he claims there's no restriction on Android.

That might apply to the play store, but that doesn't apply it to Android automatically, as you can easily get apps from other stores to your Android device. Afaik, this is not true for ios.

24
##### Goko Dominion Online / Re: Be careful when installing Dominion Online
« on: November 08, 2015, 04:09:35 pm »
hopefully no one accidentally points the Dominion Online installer at C:\Windows\System32

or C:\

25
##### Goko Dominion Online / Re: Be careful when installing Dominion Online
« on: November 08, 2015, 04:07:00 pm »
rm -rf \$STEAMROOT/*

Pages: [1] 2 3 ... 98

Page created in 0.104 seconds with 19 queries.