Tropical geometry, quantum affine algebras, and scattering amplitudes