sweep.html: change Q algo