So far I used UCI only to make analysis of particular positions, sending FEN, showing multipv, analysing fixed depth/time, clearing hash for every next position.
Now I would like to make the same engine play against itself a blitz game and I guess this approach might waste a lot of CPU resources. Any information on this topic, ideally with example of UCI communication included, will be appreciated. Especially I want to ask:
How should I setup hash and when should I clear it? After each move, after reaching certain amount of nodes searched from last clearing to defend against hash colisions?
Is there a better way than sending FEN after each move to UCI?
Should I setup multipv to 1 and always wait for "bestmove"?
I'm not very concerned by slowdowns caused by fen parsing etc, but I would like not to make some huge mistake like clearing knowledge made on previous moves. Of course I want engine being able to reuse as much calculations as possible for both sides from last moves.