Laskos wrote:nimh wrote:Thanks, but what I had in mind is a formula that returns 0.5 when below, and 1.0 when above the boundary.
But that's easy to translate:
having
y[x] = eval(0) / (1 + eval(0)*log[move(0)] - eval(0)*log[x])
and picking the initial point on the boundary (say 30, 0.75), we get
y_b[x] on boundary = 0.75 / (1+0.75*log[30]-0.75*log[x])
x is the variable move number
And the needed formula is
0.5 + 0.5 * theta(y[x] - y_b[x])
I managed a good fit solvable in closed form. Here is how the fit to my worms looks like, only the small eval values need a correction, but introducing it makes the differential equation unsolvable (well, numerically it's solvable for given boundary conditions), at least by Mathematica.
The vector field is:
{x, 0.1*x^(1/2)*y^2}
The differential equation for the flow lines is:
y'[x] = 0.1*x^(-1/2)*y[x]^2
y[move(0)] = eval(0)
The solution to this (better) fit is even simpler than before:
y[x] = 5*eval(0)/{5 - eval0*sqrt[x] + eval0*sqrt[move(0)]}
From this family of flow lines, I picked the a particular boundary condition for the Win/Draw border line, and the border equation is:
y_b[x] = 5*0.75/(5 + 0.75*sqrt(30) - 0.75*sqrt(x))
x is the variable move number.
You probably need the same:
f[x] = 0.5 + 0.5 * theta(y[x] - y_b[x])
Keep in mind that the border is soft, there is no phase-transition between Wins and Draw, the border is simply showing where the probability of Draw is equal to probability of Win.