See if anything here helps - no guarantees, but sometimes any one of the suggestions has been known to work:
WiFi Problems:
Wifi problems seem to crop up a lot on here and unfortunately there doesn't seem to be a 'one fix' solution.
However, sometimes any one of the following can help although, unfortunately, not always. In no particular order:
Check wifi security - if it's WEP change it to WPA or WPA2 (preferably, as it's more secure)
Change the wifi channel on the router
Create a new Network Location: http://support.apple.com/kb/HT5289
Reboot the router
Also take a look at this link and the links within the article for other ideas. They mainly reference Lion, but still seem to be relevant to Mountain Lion and possibly Mavericks:
http://osxdaily.com/2011/11/06/lion-wi-fi-problems-solution-mac/?utm_source=feed burner&utm_medium=feed&utm_campaign=Feed%3A+osxdaily+%28OS+X+Daily%29&utm_conte n t=FaceBook
...and this link:
http://osxdaily.com/2012/11/30/resolving-stubborn-wi-fi-connection-problems-in-m ac-os-x/
Getting WiFi to automatically join the correct network:
System Preferences>Network>WiFi>Advanced Button
Delete all networks you don’t want to join
Tick the box ‘Remember networks this computer has joined’
Tick the box ‘Change networks’ under ‘Require administrator authorisation to…’
OK the changes
Tick the box ‘Ask to join new networks’
Apply the changes