Improve performance when partially assigning moves
stock.move assign_try can execute 700 moves in ~20 seconds in my laptop if all moves are totally assigned and also if no moves are assigned at all.
However if most moves are only partially assigned, the copy() that is done in the loop makes assign_try to take 312 seconds.
I propose to replace the copy() in the loop by a copy()+write() at the end which makes the aforementioned example to go down to ~21 seconds.