user11609: 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.

user825: I don't think it's a good idea to write a new framework. You should use Cutechess. CuteChess is free, stable, fast and reliable.
I'll answer your questions anyway:

You should not clear the hash, it's the engine job to fill it and replace it
You don't have to send FEN, you can also give a move list
By default, multipv is 1 so you don't need to do anything


11609: <p>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.</p>

<p>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:</p>

<p><strong>How should I setup hash and when should I clear it</strong>? After each move, after reaching certain amount of nodes searched from last clearing to defend against hash colisions?</p>

<p><strong>Is there a better way than sending FEN after each move to UCI?</strong></p>

<p><strong>Should I setup multipv to 1 and always wait for "bestmove"?</strong></p>

<p>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.</p>
 825: <p>I don't think it's a good idea to write a new framework. You should use <a href="https://github.com/cutechess/cutechess/tree/master/docs" rel="nofollow noreferrer">Cutechess</a>. CuteChess is free, stable, fast and reliable.</p>

<p>I'll answer your questions anyway:</p>

<ul>
<li>You should not clear the hash, it's the engine job to fill it and replace it</li>
<li>You don't have to send FEN, you can also give a move list</li>
<li>By default, multipv is 1 so you don't need to do anything</li>
</ul>
