< BACK TO BLOGS

2025-12 Robot Javelin

DATE:2025-12-14

2025-12 ~ Jane Street Puzzle ~ Robot Javelin

Puzzle Prompt

It’s coming to the end of the year, which can only mean one thing: time for this year’s Robot Javelin finals! Whoa wait, you’ve never heard of Robot Javelin? Well then! Allow me to explain the rules:

  • It’s head-to-head. Each of two robots makes their first throw, whose distance is a real number drawn uniformly from [0, 1].
  • Then, without knowledge of their competitor’s result, each robot decides whether to keep their current distance or erase it and go for a second throw, whose distance they must keep (it is also drawn uniformly from [0, 1]).
  • The robot with the larger final distance wins.

This year’s finals pits your robot, Java-lin, against the challenger, Spears Robot. Now, robots have been competing honorably for years and have settled into the Nash equilibrium for this game. However, you have just learned that Spears Robot has found and exploited a leak in the protocol of the game. They can receive a single bit of information telling them whether their opponent’s first throw (distance) was above or below some threshold d of their choosing before deciding whether to go for a second throw. Spears has presumably chosen d to maximize their chance of winning — no wonder they made it to the finals!

Spears Robot isn’t aware that you’ve learned this fact; they are assuming Java-lin is using the Nash equilibrium. If you were to adjust Java-lin’s strategy to maximize its odds of winning given this, what would be Java-lin’s updated probability of winning? Please give the answer in exact terms, or as a decimal rounded to 10 places.

My Solution

Robot Javelin Puzzle – Final Proof

1. Nash Equilibrium of the Original Game

Assume both players use a threshold strategy with threshold tt. Let the opponent’s final score be YY, and define

FY(y)=P(Yy).F_Y(y) = \mathbb P(Y \le y).

Distribution of YY

  • If yty \le t, the opponent must have rerolled:
FY(y)=P(Y2y)P(Y1t)=ty.F_Y(y) = \mathbb P(Y_2 \le y)\mathbb P(Y_1 \le t) = t y.
  • If yty \ge t, either:
    • the first throw is kept (Y1[t,y]Y_1 \in [t,y]), or
    • the first throw is rerolled and Y2yY_2 \le y

Thus,

FY(y)=y(1+t)t.F_Y(y) = y(1+t) - t.

So

FY(y)={ty,0yt,y(1+t)t,ty1.F_Y(y)= \begin{cases} t y, & 0 \le y \le t, \\ y(1+t)-t, & t \le y \le 1. \end{cases}

Expected Value of YY

Using the tail integral formula,

E[Y]=01(1FY(y))dy.\mathbb E[Y] = \int_0^1 (1 - F_Y(y))\,dy.

Compute:

E[Y]=12+t2t22.\mathbb E[Y] = \frac{1}{2} + \frac{t}{2} - \frac{t^2}{2}.

Indifference Condition

At equilibrium, keeping or rerolling at x=tx=t must give equal win probability:

t2=1E[Y].t^2 = 1 - \mathbb E[Y].

This yields:

t2+t1=0t=5120.618.t^2 + t - 1 = 0 \quad\Rightarrow\quad t = \frac{\sqrt5 - 1}{2} \approx 0.618.

2. Optimal Strategy of the Cheating Player (Stage II)

The cheating player (Spears) observes whether

J1cwithc=512.J_1 \ge c \quad\text{with}\quad c = \frac{\sqrt5 - 1}{2}.

Case 1: J1<cJ_1 < c

Java must reroll, so her final score is uniform on [0,1][0,1]. Spears compares:

  • Keep ss: win probability =s= s
  • Reroll: win probability =12= \frac12

Thus,

t0=12.t_0 = \frac12.

Case 2: J1cJ_1 \ge c

Java keeps her first throw, so

JU[c,1].J \sim U[c,1].

CDF:

F(x)={0,x<c,xc1c,xc.F(x) = \begin{cases} 0, & x<c, \\ \frac{x-c}{1-c}, & x \ge c. \end{cases}

Reroll win probability:

01F(u)du=1c2.\int_0^1 F(u)\,du = \frac{1-c}{2}.

Indifference gives:

sc1c=1c2t1=c+(1c)220.690983.\frac{s-c}{1-c} = \frac{1-c}{2} \quad\Rightarrow\quad t_1 = c + \frac{(1-c)^2}{2} \approx 0.690983.

3. Java-lin’s Optimal Counter-Strategy

Focus on the branch J1<cJ_1 < c, where Spears uses t0=12t_0 = \frac12.

Spears’ Final Distribution

H0.5(x)={0.5x,x<0.5,1.5x0.5,x0.5.H_{0.5}(x)= \begin{cases} 0.5x, & x<0.5, \\ 1.5x - 0.5, & x \ge 0.5. \end{cases}

Reroll Win Probability

P(reroll wins)=01H0.5(u)du=38.\mathbb P(\text{reroll wins}) = \int_0^1 H_{0.5}(u)\,du = \frac38.

Indifference Condition for Java

Let a0a_0 be Java’s threshold in this branch. Indifference:

H0.5(a0)=38.H_{0.5}(a_0) = \frac38.

Since a0>0.5a_0 > 0.5,

1.5a00.5=38a0=712.1.5a_0 - 0.5 = \frac38 \quad\Rightarrow\quad a_0 = \frac{7}{12}.

Thus Java keeps iff J1712J_1 \ge \frac{7}{12}.


4. Java-lin’s Final Winning Probability

Partition J1[0,1]J_1 \in [0,1]:

A. J1[0,712)J_1 \in [0,\frac{7}{12})

Java rerolls:

I1=38712.I_1 = \frac38 \cdot \frac{7}{12}.

B. J1[712,c)J_1 \in [\frac{7}{12}, c)

Java keeps, Spears uses t0=12t_0 = \frac12:

I2=7/12c(32j12)dj.I_2 = \int_{7/12}^{c} \left(\frac32 j - \frac12\right) dj.

C. J1[c,1]J_1 \in [c,1]

Spears uses t10.690983t_1 \approx 0.690983:

I3=ct1t1jdj+t11((1+t1)jt1)dj.I_3 = \int_c^{t_1} t_1 j\,dj + \int_{t_1}^1 \big((1+t_1)j - t_1\big)\,dj.

Final Answer

P(Java wins)0.4939370903646491\boxed{ \mathbb P(\text{Java wins}) \approx 0.4939370903646491 }

That is,

49.3937%.\boxed{49.3937\%}.

Downloads