xkcd is a gold mine of insightful thoughts and cool ideas. Even posts that introduce original ideas like “Nerd Sniping” usually have thought-provoking STEM content as a bonus.
As an EE-adjacent nerd, I sometimes think about the original Nerd Sniping problem itself: What is the resistance between two nodes a knight’s move apart on an infinite resistor grid?

While I still don’t know how I’d go about getting a closed-form Solution to it (maybe you could set up a recurrence relation between rectangular rings of nodes?), it recently occurred to me that it wouldn’t take much math at all (just a moderately large amount of compute) to simulate such a setup at finite-but-large sizes. Create an (N+3) by (N+2) grid of nodes, where N is nonnegative. Each node is connected to its four Manhattan neighbors via an ideal resistance R (1 ohm in the original problem; I simulated it at 1k). Connect each node to Ground via a 1nF capacitor, with no initial charge. (The two source nodes have no ground capacitor.)
Place two source nodes a knight’s move apart (dx=2; dy=1) centered in this grid, with one held at +1V and the other held at -1V. (Using symmetrical voltages makes for a nice color map.) Once per small timestep, note the voltage differences between neighboring nodes, flow Q=(dV/R)*dt coulombs of charge between the two, and update the capacitor voltages accordingly. Top the source nodes back off so they remain at 1V and -1V, noting how much charge (and therefore current) it takes to do this.
Eventually, everything will more or less stabilize. At that point, measure how much current (charge per timestep, divided by timestep) is flowing in to the positive node. This should exactly match the current flowing out of the negative node. (If not, something is wrong.) Since 2V is applied between the nodes, the equivalent resistance is 2.0 divided by the current in amps. Simulate for a millisecond or so if using 1k resistors, and even large networks stabilize.
I’ve increasingly found LLMs to be amazing coding assistants, even in languages I speak fluently. I know how to make a simulation like this, but it would probably take several hours and would be a more-or-less naïve discrete-timestep model. Collaborating with GPT-5-Thinking to create a simulation of this in FreeBasic (I still understand the syntax nuances of FreeBasic better at least for now, but GPT-5 is far faster at coding), we came up with a discrete-time numerical simulation using Gauss-Seidel convergence and a visual heat map after two or three bugfix iterations. The code GPT-5 came up with even uses some FreeBasic graphics libraries I wasn’t aware of.

(The steady-state current is slightly lower here than for a larger — or infinite — grid.)
The steady-state current flowing into the network does increase as additional rectangular rings of nodes are added outside the original 3×2, but this quickly approaches a limit of about 2.587mA for a 4000×4000 grid, and only a slight bit more for larger grids (a 400×400 grid has the same current, to within about microamp).
Given the 2.0V voltage difference applied, this means that R is about 0.773 ohms in the original xkcd problem, or about 773 ohms if using 1k resistors.
