Change timeout behaviour to cache and return the best move so far.

Optimize timeout for network latency issues.