Hacker News new | ask | show | jobs
by barbierocks 2486 days ago
One of the developers here! Right now, we compare answers visually, so for example `n \choose k` and `\binom{n}{k}` will both be accepted. However, sometimes there are things that look similar to the human eye, but are rendered slightly differently -- this is usually due to alignment, spacing, or size. For example, `\not\in` (bad) vs `\notin` (good) is a pretty annoying example. Making the comparison / feedback mechanism better is a tough problem. It isn't as simple as increasing the pixel threshold: replacing a + with a - has an extremely small pixel difference (and the two characters have the same width, so it doesn't affect anything else), but we shouldn't accept both.

Right now, the website is a super simple static HTML page. If we have time, we'd also like to add some new features, like a leaderboard and (hopefully) better comparison logic. Feel free to contribute, and we appreciate the feedback!

5 comments

Nice idea for a game -- I use LaTeX quite a lot so it was fun testing that I could type everything. One small LaTeXing speed trick I was using is to drop curly braces for single-letter arguments, like

   \frac 1 n
instead of

   \frac{1}{n}
though even greater gains would be from having your own bespoke file-of-macros.

I feel like the game doesn't give enough time with respect to how long it takes to type certain expressions, so you'll get some high variance on scores just from this cutoff. If you get a big expression right at the end of the time limit, there's a chance you'll lose out on 11 points because it took a second to recognize what you typed --- I played three times, getting around 53 and 55 points the first two times, but then the third time I only got 42 because it didn't recognize the following expression:

   W(x,p)=\frac{1}{\pi \hbar}\int_{-\infty}^\infty\langle x+y|\hat\rho|x-y\rangle^{-2ipy/\hbar}dy
and I couldn't spot the difference in the few seconds I had left.

For some of the equations, I was tempted to fix the typesetting, but I figured if I did it wouldn't recognize it. For example, there needs to be a hairline space in integrals:

   \int u\,dv
Or for divisibility it should use \mid for the relation and not |.

A small frustration was the delay between typing an expression, recognition, then rendering the new expression, especially since this all counted toward the time limit. Maybe having MathJax pre-render the expressions could speed some of this up. Another option is instead of a trial of how many you can complete is having a small collection then timing how long it takes to complete that. Instead of having a sequence of expressions with different numbers of points, the page of expressions could all be of a similar level of difficulty.

Thanks for the feedback! In fact, you can even do stuff like $\binom nk$ or $\frac 1n$, you don't need the space.
(Sometimes when I'm particularly lazy, I've gone as far as \frac1n. Though usually I consider spaces to be cost-free.)
Oh my god, so much fun. I got a 36. I wonder if I could go as high as 50.

Thanks for making this!

Very funny how you link to Detexify. That site has been around for a long time and it's a fundamental resource. I think it's still just being run by some dude for fun. I hope it never goes away.

Some people have gotten above 90, but I haven't broken 60. :'(
`n \choose k` is for the heretics (or maybe hereTeX)

Just say NO! to plain TeX commands.

For the +\- problem, do some simple corner detection (2*2 squares where three pixels are black may be too simple, but you may not have to go much further)

It also may help to render the formula in different fonts, and require all renderings to pass your heuristics.

Right, along this line, the first one I hit was the kronecker delta - I couldn't see the comma between the \delta_{i,j}. It was only after going through until I found it again and zooming in I could see the problem. Fun thing though.