Find where the wifi router is I wish to get the best possible signal from unknown Wi-Fi routers (i.e. ones you don't own, say public hotspots) - that is, getting as close to them as possible. However, just moving [let alone finding algorithms that optimize moves] and checking if the bars go up or down seems too slow and inefficient for me: so, what can be done?
If you move and the signal gets stronger, that doesn't mean you moved closer to the Wi-Fi hotspot. Because of shadowing and reflections, the signal strength varies unpredictably from place to place. The signal your phone receives is almost never a direct, line-of-sight signal, unless both you and the hotspot are in a huge, empty field.

You'd have to measure almost every point in the room to find the very best signal: any kind of "warmer, colder" method isn't going to work at all.

Your best bet is just to tune it like a TV: try all the places you can put the phone down, and just see which one gives you the best signal. You don't need to go by the indicator on the notification bar, though: there are many apps that will tell you the received signal strength of all the Wi-Fi networks in the area. Wi-Fi Analyzer is one ad-supported example, and there are lots more.