How Ancient Math Powers Modern Games and Neural Networks