don't count every single unknown square all the time
unified `desperate` counter flag and fixed error factor count