Given a black-box function `f(x)` which take a value `x` and output `true` for \$p(x)\$, an unknown continious monotone function(not knowing even whether it's increasing), probable; and `false` otherwise. Output an infinite sequence \$a_n\$ such that \$\lim_{n\rightarrow \infty}p(a_n)=0.5\$. You can assume that the result exists and \$\lim_{n\rightarrow \infty}a_n\$ lay in \$(0,1)\$.

A possible solution:

    for i=1..infty
        S = [i/2] * i
        for j=1..i
            for k=1..i
                if f(j/i)
                    S[j]--
        print minPos([t*t for t in S])/i

[tag:random] [tag:code-golf]